News:

;) This forum is the property of Proton software developers

Main Menu

PIC18F57Q43 and serial comms

Started by kcsl, Today at 10:38 AM

Previous topic - Next topic

kcsl

I'm trying to configure the 18F57Q43 for serial comms. Initially I tried and failed for UART1, but that's a complicated UART with lots of features and I only require basic serial, so I moved to UART2 and I just cannot get it to work either.

This is the code I have:

Declare HRSOut2_Pin = PORTE.1
Declare HRSIn2_Pin  = PORTE.0
Declare Hserial2_Baud = 9600

ANSELE.1 = 0
ODCONE.1 = 0
TRISE.1 = 0
RE1PPS = $23

loop:
    Toggle LED1
    HSerOut2["QWERTY "]
    DelayMS 500
    GoTo loop


I've tried without and with setting some of the configuration bits manually (as above) but that's not helped.
Can somebody spot what stupid mistake I've made please ?

Regards,
Joe
There's no room for optimism in software or hardware engineering.

▲