Please see code below. I only get FF in the terminal window.
It is connected via a MAX232 circuit.
#chip 18lf14k22, 16 #config osc=int
#define port1 portc.1 #define port2 portc.2
#define sendAhigh set portc.2 on #define sendAlow set portc.2 off
dir portc.1 out dir portc.2 out
initser 1,r4800,1,8,1,none,normal
Main:
do set port1 on sersend 1, "hello world" wait 100 ms
loop
The 18lf14k22 has a hardware uart. You will get much more reliable results if you use the onboard uart rather than the SW driven uart.
Log in to post a comment.
Please see code below. I only get FF in the terminal window.
It is connected via a MAX232 circuit.
#chip 18lf14k22, 16
#config osc=int
#define port1 portc.1
#define port2 portc.2
#define sendAhigh set portc.2 on
#define sendAlow set portc.2 off
dir portc.1 out
dir portc.2 out
initser 1,r4800,1,8,1,none,normal
Main:
do
set port1 on
sersend 1, "hello world"
wait 100 ms
loop
The 18lf14k22 has a hardware uart.
You will get much more reliable results
if you use the onboard uart rather than
the SW driven uart.