How to tell there is a serial request
The voices in my head keep telling me there is something I don't get. How does the PIC know the PC wants to talk? Heres my situation: Using hardware USART, I want to be able to query the PIC from time to time. But the app is time sensitive, so it won't always be a good time to stop and talk to the PC. I would like to be able to see the request from the PC, then respond with a single character that the PC would know means no time to talk right now.
I can picture this if HSERIN were a command to say start a background type process and when a byte is received an int is generated. then I would jump to the int handler, check a flag to see if its a good time to talk. If not, send the no message back and return. If it is a good time, maybe set a flag to be polled in the main routine.
The main routine would then see the flag and gosub to the chat routine.