dear all,
I have some problems dealing with interfacing between pic16f628a and pc's hyper-terminal. My code is as follow:
INCLUDE "modedefs.bas"
testvalue var byte
pause 3000
'
'other code
'
'
SEROUT PORTB.2,T2400,["hello"] 'sending the string "hello"
SEROUT PORTB.2,T2400,["123"]
SEROUT PORTB.2,T2400,["abc"]
main:
serin PORTB.1,T2400,testvalue 'waiting for 1 byte of data and store it
'in testvalue
SEROUT PORTB.2,T2400,[testvalue]
goto main
Whenever I power up my PIC, the 1st byte of data sent will be corrupted(which shown in hyper terminal), however the rest of the data are correct. I wonder why??? Anyone got solution???
ps: i'm using pic16f628's, tx and rx is connected to hin232
thanks,
cheer:>
Bookmarks