PDA

View Full Version : Need help on pic to pic flow control (simple problem I think)



khufumen
- 10th January 2006, 05:12
I have two 18F458s communicating with each other using flow control and for some reason my variables are losing their values. My code is as follows:


Baud384NoIvn CON 6
J var Byte

J = 0
MainLoop:
J = J + 1
Pause 1000
debug "Sending ", dec J, 13, 10
SEROUT2 PORTA.1\PORTA.3, Baud384NoIvn, 2000, Nada, [J]
Nada:
goto MainLoop

The output of this code is

Sending 1
Sending
Sending 3
Sending
Sending 5


As you can see, it's skipping a number. I been fooling with this for several hours. If I take out the flow control, it works fine. Any insight would be greatly appreciated.

Thanks
Eric

khufumen
- 11th January 2006, 00:34
Well folks, the support staff at Melabs answered my question. Version 2.45 has issues with flow control. Version 2.46 does not. So if anyone is reading this, you've found the solution to the problem.

Eric