What I need it to do is to get a value from an encoder position, which will be 4 bits and put this out to the 595’s. Ultimately it will be two encoders, 4 bits each, making up a byte.
At the moment, the value is shifted left 9 places and is set to count to 255, however after it gets to 64, incorrect values are displayed on the 595 output.
Its being initialised like this:
// initialize AOUT module AOUT_Init(0); // configure interface // see AOUT module documentation for available interfaces and options aout_config_t config; config = AOUT_ConfigGet(); config.if_type = AOUT_IF_74HC595; config.if_option = 0xffffffff; config.num_channels = 8; // INTDAC: only 2 channels supported, 8 channels pre-configured for your own comfort config.chn_inverted = 0; AOUT_ConfigSet(config); AOUT_IF_Init(0);And sent to the 595’s on J19 like this:
AOUT_PinSet(1,value<<9); AOUT_Update();
Can anyone see what is going wrong?
Thanks all
Regards
S





