Maker Pro
Maker Pro

PIC18 Serial Communications

Greetings,

I have a PIC18F67K90 chip that I am trying to configure for serial communication with a computer.
For this particular chip, pins (TX/RX) 4/5 and 31/32 are dedicated to serial communication. (USART)
These pins are already used for other things.

I was wondering if I could configure an unused TTL/Digital I/O pin to read in serial data to the USART or do I have to use the dedicated pins?

Any insight is appreciated.
Thanks in advance!
 

Harald Kapp

Moderator
Moderator
I was wondering if I could configure an unused TTL/Digital I/O pin to read in serial data to the USART or do I have to use the dedicated pins?
Afaik it is not possible to route the signals from other I/O pins to the internal U(S)ART. You are bound to use the dedicated pins if you want to use the HW-UART of the chip.
As @HellasTechn proposed/asked: re-route the external wiring such that the RxD and TxD pins are free for use with the UART, use other I/P pins for the signals that previously occupied the RxD and TxD pins.

'Bit banging' as propsed by @Minder can be used on any I/O pin but requires some effort in software and uses possibly valuable processor ressources at runtime.
 
Top