HSERIN and SEROUT2


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382

    Default HSERIN and SEROUT2

    I have an application where I want to use HSERIN and SEROUT2 on a 16F88. For this application TX needs to be inverted and HSEROUT won't do that without some type of inverter circuitry. I've set up the following I am able to RX but not TX. NOTE: Serout2 is not inverted for testing. Also I'm connected via a max232 TX functions noramlly if I swap Serout2 with Hserout.

    Is using Serout2 for TX even possible? If so where am I going wrong?

    DEFINE HSER_BAUD 9600
    DEFINE HSER_RCSTA 90h
    DEFINE HSER_TXSTA 04h ; Disable USART TX
    DEFINE HSER_CLROERR 1
    SerOut2 PORTB.5,84,["AT",CR] ; No data to PC via hyperterm

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hi Ben,

    The SPEN bit in the RCSTA reg, sets control of both the RX and TX pins to the USART. There's no way to use the TX pin as general I/O at the same time.

    You could put the SerOut2 on a different pin if you have a spare, but if Murphy's involved here, there probably aren't any.
    <br>
    DT

  3. #3
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    Hardware it is I guess

Similar Threads

  1. hserin and 16f876
    By novino in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 20th October 2009, 12:13
  2. SLOW Serin2 and Serout2
    By dragons_fire in forum General
    Replies: 3
    Last Post: - 26th June 2009, 02:38
  3. 8 data and parity using HSERIN, HSEROUT
    By Smity42 in forum Serial
    Replies: 2
    Last Post: - 3rd April 2006, 01:45
  4. Hserin not working...
    By robert0 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 22nd August 2005, 12:25
  5. Serin2 and Serout2 with or without level converter
    By fbestepe in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 31st May 2004, 07:10

Members who have read this thread : 0

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