Loading a BIT array, losing my mind!
PIC18F2450
HC VAR BIT[16]
This code will load the HC bits correctly:
HC[0]=1
HC[1]=1
HC[2]=1
HC[3]=0
HC[4]=0
HC[5]=0
HC[6]=0
HC[7]=0
HC[8]=1
HC[9]=1
HC[10]=0
HC[11]=0
HC[12]=0
HC[13]=0
HC[14]=0
HC[15]=0
This code does nothing!
HC = %1111111111111111
HC will still have the bit pattern loaded in the first code.
I have 512 different 16 bit patterns I need to use. Using the first code requires 8192 lines of code. There has got to be a better way! I have tried every VAR type and none of them seem to load data into the HC array. Hoe can I accomplish this? Going crazy.