I imagine many are thinking, "have you read the manual?".
Include "modedefs.bas"
Does nothing with SERIN2/SEROUT2.
T9600
Is for SERIN/SEROUT. "T" is for true mode anyways so if you are connecting directly to a PC you want INVERTED mode.
Appendix A from the manual has the modes for SERIN2. At 9600 baud the mode will be 16468. To see how that is calculated look here. http://www.picbasic.co.uk/forum/cont...SERIN2-SEROUT2
You will also want to specify a time for the GOTO LABEL "error".
Try this
Code:
SERIN2 PORTC.7, 16468,100, error, [WAIT("hello")]
The above will wait for 100 milliseconds, then GOTO "error" if "hello" is not received.
Bookmarks