Maker Pro
Maker Pro

PIC18 Serial Communications

Nlis12

Oct 10, 2017
7
Joined
Oct 10, 2017
Messages
7
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!
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
Or re assign the pins if it is not to hard to alter the code accordingly ?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
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