MeLabs support sent me this code today. It only works once. When I check the state of PIR1.5 before the HSERIN command it is a 1. When I check it after the HSERIN command it is a 0. It seems to reset itself. The problem is that it only interrupts 1 time. I never see the interrupt after the first time it fires. What am I missing? Also, how do I format the HSERIN command to keep reading characters until it sees a CR/LF?
Thanks,
Bob Hiller
Lifts for the Disabled LLC
main:
IF PIR1.5 = 1 THEN GOSUB receive_data 'check the flag
GOTO main
receive_data:
HSERIN [x, y, z] 'get data, flag is cleared automagically
RETURN 'back to business
Bookmarks