Hi,
You can't create an array of bits and then treat it as a word (as far as I know), you can however do the opposite - if you can have an array of words instead?
Code:
BitPatterns VAR WORD[512]
i VAR BYTE
BitPatterns[0] = %1010101010101010
BitPatterns[1] = %0101010101010101
BitPatterns[2] = 0
For i = 0 to 23
BitPatterns.0[i] = 1
NEXT
For i = 0 to 22 STEP 2
BitPatterns.0[i] = 1
BitPatterns.0[i+1] = 0
NEXT
Please see Melanies excellent write up.
EDIT: I'm not sure you can actually declare an array of 512 words, look that up in the manual as it differs between different PIC series.
/Henrik.
Bookmarks