Hello.
I have a question which probably (hopefully) has a simple solution but I'm out of ideas.
PIC = 18f87j10, 10MHz.
An assembly interrupt is being triggered by the reception of a data byte, and I want to put that byte into an array. The array is the 5th 'variable' in my declaration
W_TEMP var byte system ; interupt context save registers
BSR_TEMP VAR BYTE system
STATUS_TEMP var byte system
RX_BUF var byte ; Buffer for storing the incoming data from USARTS
RX_message var byte[127]; buffer to store received USART messages
I have tried
movlw HIGH(array_name)
movwf FSR0H
movlw LOW(array_name)
(add array offset)
movwf FSR0L
...and then putting the RX'd byte into INDF0
movff RX-byte, INDF0
It seemed to work for a while, but then I changed the size of my array from 20 bytes to 127 bytes. I guess I am crossing a boundary or is it something else ?
Should I try using Table write instead ?
Chris
(I can't do away with the assembler interrupt because I am running ethernet (Lantronix XPORT - tftp) on one USART, Zigbee wireless on the other USART, and an SD card on the SPI. I have checked for conflicts by removing the sd card code and variables)
Bookmarks