View Full Version : Question regarding hardware serial and GPIO
Andy Wood
- 5th April 2013, 04:07
Hello,
I am receiving some serial data using HSERIN on a 16F88. I don't need to TX any data. Can I use RB5 (the UART TX pin) as GPIO or is it locked to serial TX function once the SPEN bit is set?
Regards,
Andy
Demon
- 5th April 2013, 12:17
Have you tried disabling TX function and blinking an LED on that pin?
Robert
spcw1234
- 5th April 2013, 20:48
I have never tried it with a 16F, but with 18F parts I could not make use on the other USART pin when only one was needed. I may have been setting something up wrong though. Best just give it a try.
timmers
- 5th April 2013, 22:45
When you enable SPEN it takes over both pins as you suspected.
Andy Wood
- 8th April 2013, 02:05
Thanks for the replies. The UART TX pin cannot be used fro GPIO in this case.
Andy
languer
- 8th April 2013, 10:00
From my experience, you can use the TX pin as an input. This same experienced is shared and discussed on the Microchip forum. However, I don't think you should do it if it can be avoided. Again, I have some prototypes which use it that way and they work without issues; but it seems like undocumented (likely unsupported).
Powered by vBulletin® Version 4.1.7 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.