I don't understand why I am getting errors on this. Is my array set up right?
If I replace BAUDIN with N2400 on SERIN2 line, I only get bad expresion during the compile
Why?
If I can get this to run at 9600, I would like to increase the input to 115200. What should I put in for the OSC? 20MHZ, and run a 22.1184MHZ xtal?
Would like to use a 16F84A or 16F873A with UART
Any Ideas?
Thanks,
ScottC
DEFINE OSC 4 ' 20MHz oscillator
RSDATA VAR BYTE[7] ' Data input array
BAUDIN CON 16468 ' 115200,8,N,1 Serial In
BAUDOUT CON 16468 ' 9600,8,N,1 for Serial Out
TX VAR PORTA.0 ' Pin for TX
RX VAR PORTA.1 ' Pin for RX
'********************************************
TRISA = %01000010
'***************************** READ SERIAL PORT
LOOP:
SerIn2 RX,BAUDIN,[WAITSTR RSDATA\7] 'serial data in on PortA.1
Bookmarks