document updated 18 years ago, on Apr 5, 2006
seriali.jal that comes with jal is just a software implementation of a serial connection.
Pros:
Cons:
- No receive buffer. If you're not running asynch_receive() when data is being transfered, then that data is dropped. This is quite serious, as it prevents all multitasking.
- Takes up a timer.
So... we need a .jal wrapper around the real PIC USART.
Some references to doing this:
Some general notes on PIC USART stuff:
- 2 byte buffer... RCREG can be read twice, which will read two different values if both byte buffers are filled
- There is no parity bit implemented in hardware. If needed, use 9 bit receive, and check the 9th bit against the 8 bits yourself in software. So otherwise assume no parity.