Hi,
I need to get serial data from a PC, this serial data is a fixed print information that goes to a serial printer.
The picaxe will be in between the PC and the serial Printer, it will get the serial data output from the PC, then it will change some bytes, and then it will send it to the serial printer.
I am using a 40 X1 picaxe to capture the bytes. I want to use Background serial receive, and here is the question, I read the example code that Technical made in August, explaining how you have to do a loop and check if hserinflag = 1 to know data has arrived. OK. I suppose that when the first byte arrives, the hserinflag turns to 1, if you are receiving various bytes, then when you go to the scratchpad, resetting the pointer and looking at the byte received, there might be other bytes arriving at the same time you are doing this.
Does this matter ?, Will I mess the scratchpad and loose bytes ?.
Would it be a good idea to wait for some time after the hserinflag has been turned to 1, so I would be sure no more data has arrived before I go to the scrathpad?
Thanks,
Kakolon
I need to get serial data from a PC, this serial data is a fixed print information that goes to a serial printer.
The picaxe will be in between the PC and the serial Printer, it will get the serial data output from the PC, then it will change some bytes, and then it will send it to the serial printer.
I am using a 40 X1 picaxe to capture the bytes. I want to use Background serial receive, and here is the question, I read the example code that Technical made in August, explaining how you have to do a loop and check if hserinflag = 1 to know data has arrived. OK. I suppose that when the first byte arrives, the hserinflag turns to 1, if you are receiving various bytes, then when you go to the scratchpad, resetting the pointer and looking at the byte received, there might be other bytes arriving at the same time you are doing this.
Does this matter ?, Will I mess the scratchpad and loose bytes ?.
Would it be a good idea to wait for some time after the hserinflag has been turned to 1, so I would be sure no more data has arrived before I go to the scrathpad?
Thanks,
Kakolon