ngeronikolos
- 4th August 2005, 13:18
Hello Boys&Girls,
I hope you are well.It is time for holidays not for work but...money!!!
Let's talk about PicBasic Pro.
I have a problem with my code.I have a 16F628A which receives a rs485 stream.The device that transmit the stream is the master and it can <<talk>> with 128 slave devices.My pic is a slave device so it has a header(an address).
When I don't receive the stream my code loop MAIN it is working propertly.
When I receive my pic reads ok the stream but I can not go to MENU label while the conditions of porta.3 &porta.4 is 1.
Here is my code:
--------------------------------------------------------------------------
MAIN: IF PORTB.6 = 1 THEN STATIC
WHILE PORTA.3 = 1 AND PORTA.4 = 1 <--it does not work when I it receives
GOTO MENU
wend
DYNAMIC: IF RCIF = 1 THEN
HSERIN 300,MAIN,[WAIT(X),STR SERDATA\17] ;X = header - address
GOSUB OUT
gosub SERTALLY
ENDIF
GOTO MAIN
--------------------------------------------------------------------------
Thanks
Nikos Geronikolos
I hope you are well.It is time for holidays not for work but...money!!!
Let's talk about PicBasic Pro.
I have a problem with my code.I have a 16F628A which receives a rs485 stream.The device that transmit the stream is the master and it can <<talk>> with 128 slave devices.My pic is a slave device so it has a header(an address).
When I don't receive the stream my code loop MAIN it is working propertly.
When I receive my pic reads ok the stream but I can not go to MENU label while the conditions of porta.3 &porta.4 is 1.
Here is my code:
--------------------------------------------------------------------------
MAIN: IF PORTB.6 = 1 THEN STATIC
WHILE PORTA.3 = 1 AND PORTA.4 = 1 <--it does not work when I it receives
GOTO MENU
wend
DYNAMIC: IF RCIF = 1 THEN
HSERIN 300,MAIN,[WAIT(X),STR SERDATA\17] ;X = header - address
GOSUB OUT
gosub SERTALLY
ENDIF
GOTO MAIN
--------------------------------------------------------------------------
Thanks
Nikos Geronikolos