To use arrays, first you have to declare the array variable
Sample VAR BYTE[16]
X VAR BYTE
then if you want to write this array to eeprom you have to write one part (Byte) of the array at a time I do it with a FOR/NEXT loop
FOR X = 0 to 15
WRITE X, Sample[X]
NEXT X
and to read it back to the array do the same but use READ
FOR X = 0 to 15
READ X, Sample[X]
NEXT X
And to print the array on LCD
LCDOUT $fe, 1, STR Sample\16
And to send it with SEROUT you have to send the bytes one by one
SEROUT PORTA.7,T9600, [Sample[0],Sample[1],Sample[2],Sample[3],Sample[4],Sample[5],Sample[6],Sample[7],Sample[8],Sample[9],Sample[10],Sample[11],Sample[12],Sample[13],Sample[14],Sample[15]]




Bookmarks