Question regarding hardware serial and GPIO


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2007
    Posts
    53

    Default Question regarding hardware serial and GPIO

    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

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,598


    Did you find this post helpful? Yes | No

    Default Re: Question regarding hardware serial and GPIO

    Have you tried disabling TX function and blinking an LED on that pin?

    Robert

  3. #3
    Join Date
    Apr 2007
    Location
    Pennsylvania, USA
    Posts
    158


    Did you find this post helpful? Yes | No

    Default Re: Question regarding hardware serial and GPIO

    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.
    Shawn

  4. #4
    Join Date
    Apr 2011
    Location
    Kent, UK
    Posts
    52


    Did you find this post helpful? Yes | No

    Default Re: Question regarding hardware serial and GPIO

    When you enable SPEN it takes over both pins as you suspected.

  5. #5
    Join Date
    Apr 2007
    Posts
    53


    Did you find this post helpful? Yes | No

    Default Re: Question regarding hardware serial and GPIO

    Thanks for the replies. The UART TX pin cannot be used fro GPIO in this case.

    Andy

  6. #6
    Join Date
    Jul 2003
    Location
    USA - Arizona
    Posts
    156


    Did you find this post helpful? Yes | No

    Default Re: Question regarding hardware serial and GPIO

    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).

Similar Threads

  1. 12F683: I change GPIO.5 but GPIO.0 also changes...why?
    By chicowoodhill in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 4th December 2012, 17:09
  2. Replies: 1
    Last Post: - 29th February 2012, 09:37
  3. OT: Hardware question
    By PlantBob in forum General
    Replies: 5
    Last Post: - 20th January 2011, 22:15
  4. Hardware PWM Question?
    By jhorsburgh in forum General
    Replies: 1
    Last Post: - 18th August 2008, 03:07
  5. Hardware Question
    By manwolf in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th August 2008, 00:08

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts