These three lines are in usart.bas
RCStatus = $90 // serial Port Enable, continuous receive
RCInput = True // receive pin Is Input
TXInput = False // transmit pin Is Output
For the 18F4620, only the first line seems necessary.
When RCSTA.7, or SPEN, is set by the first instruction, the directions of the RX/TX pins are configured. The 18F4620 data sheet says to leave TRISC.6 and TRISC.7 as 1 so that the proper configuration can happen.
So the following two instructions seem not needed, at least for this specific chip.
Are those two following instructions used by some other module or are they required to properly set RX/TX pins for some other chips?
usart.bas Why these two lines?
Moderators: David Barker, Jerry Messina