Hi,
I've been struggling with this for around a week so I thought I'd check here to see if anyone's got any pointers.
I am collecting some data sent once per minute serially at 9600 baud. A startbyte is sent as $FD followed by 6 bytes representing SS:MM:HH DD:MM:YY
The following code works right at the start of my program
but implementing Darrel's Instant Interrupts and the RX_INT I only seem to capture 2 of the bytes of data being the MM and HH so if write:Code:hserin [wait ($FD), str databyte\6]
where timeout just re-enables the RX_INT and then returns. I would have expected the above snippet to save the $FD and then the SS data packet so I'm not sure why it skips these two and saves the MM and HH data bytesCode:@ INT_DISABLE RX_INT ; Disable RX Interrupt hserin 100,timeout [databyte(1), databyte(2)] @ INT_ENABLE RX_INT ; Enable RX Interrupt @ INT_RETURN
If I try to capture more than two bytes:
the hserin just jumps to timeout every time. I am ONLY enabling RX_INT at the moment so that I could eliminate interference by any other Interrupt but this has made no difference.Code:hserin 100,timeout, [databyte(1), databyte(2), databyte(3)]
Any help would be greatly appreciated
Thanks in advance
Rob





Bookmarks