Try it without the DEC modifiers on your HSERIN lines.
And it's going to hang until all bytes it's expecting arrive unless you use a timeout/label option.
Try it without the DEC modifiers on your HSERIN lines.
And it's going to hang until all bytes it's expecting arrive unless you use a timeout/label option.
Last edited by Bruce; - 20th August 2010 at 18:42.
Bruce, thanks for the prompt reply.
I've tried commenting out all but the first vairiable so it is only expecting only one value, but that still caused the thing to run really really slowly... as does removing the DEC modifier
could you provide me with a quick example of how to to a time out to try?
Hi Malc,
There's an example in the manual, but it works like this;
HSERIN 100,Timesup,[B0]
Timesup:
do something here is data not received
If no character is received in B0 within 100mS it jumps to Timesup.
cheers Bruce...
Sorry, heat of the moment, quicker to ask than dig out the manual !
Bruce,
One other thing that has come to light is that I need clear the buffer after
I gather this is required so that it places the correct variable in the right location in the application.Code:HSEROUT [dec StopHour[0],dec StopMin[0],dec StopHour[1],dec StopMin[1],dec StopHour[2],dec StopMin[2],dec StopHour[3],dec StopMin[3]
Any ideas
I'm not 100% sure what you're asking Malc?
To be honest I'm not sure either - I thought if you sent A,B,C through the port it would just loop that over and over again... do PICs have buffers ? I thought they sent data straight out and in ? but then I'm really getting out of my depth with this.
Bookmarks