UART and SIO on interupts?
Is it possible to run SIO on interupts? Do you used a flag to enable 'RX' mode. I can't find any examples. Did I miss it?
details:
I have a piggy backed GPS unit and Bean's SD data logger. The SX20 on the GPS (via Sio, single pin) sends a custom output string, waits a short time (15ms) for a command back, then goes on to log to the SD data logger if time to do so, process the command, get new data from the radio etc.
The host board (SX28 right now, moving to SX48 I think), has LCD/Keyboard and the Sio from the GPS/logger. The LCD/keybrd are running under UART isr (thanks JonnyMac and Bean). My thinking is that because the second UART is mostly in the RX mode getting data from the GPS/logger and must send a command right after recieving the data burst, I can use a flag to set it to TX mode so the RX code won't receive it.
Will that work? I don't see why not, but "Newbie ALERT". Even more so with isr's. Still, this has been a very good 'first' isr program.
Thanks for Your Support, Chris
details:
I have a piggy backed GPS unit and Bean's SD data logger. The SX20 on the GPS (via Sio, single pin) sends a custom output string, waits a short time (15ms) for a command back, then goes on to log to the SD data logger if time to do so, process the command, get new data from the radio etc.
The host board (SX28 right now, moving to SX48 I think), has LCD/Keyboard and the Sio from the GPS/logger. The LCD/keybrd are running under UART isr (thanks JonnyMac and Bean). My thinking is that because the second UART is mostly in the RX mode getting data from the GPS/logger and must send a command right after recieving the data burst, I can use a flag to set it to TX mode so the RX code won't receive it.
Will that work? I don't see why not, but "Newbie ALERT". Even more so with isr's. Still, this has been a very good 'first' isr program.
Thanks for Your Support, Chris
Comments
Since this is a slave device and does more listening than talking the program does check to make sure it's not in the middle of transmitting a byte before configuring the Sio line as an input so that it can receive one.
Man, you're going to have more code in my project than me!
Thank you very much, Chris