SERIN to HSERIN and Inverted Logic


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jun 2008
    Posts
    4

    Default SERIN to HSERIN and Inverted Logic

    Hello All--

    I've been working on a program for the 16F627 that used one of the I/O pins with an inverted logic baud rate to successfully receive data from my computer through RS-232.

    I would now like to use hardware USART pin on this PIC due to buffering and whatnot. I know the HSERIN doesn't have an inverted option, so I've tried inverting the bytes that I send down the serial line on the computer hoping that the PIC would be able to pick them up. I've not had success with this and I believe its because my start and stop bits are not sent with inverted logic.

    Does this reasoning path seem logical? If so, how can I fix this problem completely from a software side, I'd like to avoid a MAX232 or the like if at all possible.

    Thanks

  2. #2
    skimask's Avatar
    skimask Guest

    Default

    Quote Originally Posted by Stubbie View Post
    Does this reasoning path seem logical? If so, how can I fix this problem completely from a software side, I'd like to avoid a MAX232 or the like if at all possible.
    I (and this is just me) think you're better off just getting a MAX232 or DS275 (?).
    That being said, you could use just a plain ol' transistor (or MOSFET) to invert your signal coming out of the PIC.

  3. #3
    Join Date
    Jun 2008
    Posts
    4

    Default

    That sounds like a resonable solution, I'm learning this as I go, do you have a good example?

    I've found this: http://www.physics.udel.edu/~watson/...L99/sld026.htm Hooked it up, and had no success.

    Thanks a lot

  4. #4
    Join Date
    Jun 2008
    Posts
    4

    Default

    Ok, I got it working with an inverter, but thats a long term solution due to its size, so an example with a MOSFET would be great stiil. At least it appears that the programming on both ends is valid.

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    The link you posted has a MOSFET example?

    But what is wrong with using a MAX232 or similar? This is what they are made for.
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Jun 2008
    Posts
    4

    Default

    Size and cost.

    Got it working with a transistor an a resistor:

    http://www.scienceprog.com/alternati...dget-projects/

Similar Threads

  1. Serial com PIC <> PC - what is best?
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd January 2007, 08:37
  2. HSERIN and SEROUT2
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd July 2006, 00:06

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