Serial - to invert or not to invert...?


Closed Thread
Results 1 to 3 of 3
  1. #1
    barkerben's Avatar
    barkerben Guest

    Default Serial - to invert or not to invert...?

    Hi,

    Been getting a bit confused about the need or lack of need to invert the data to, and from my PIC.

    My setup is:


    PC---->MAX232------->PIC
    PC<----MAX232<-------PIC

    Looking at the data sheets, the MAX232 invertes the signal, but I have heard it suggested that the UART needs (and sends) an inverted level anyway, so the 2 cancel out and there is no problem.

    Would this then only be a problem if I was uning non-hardware serial pins, and would therefore need to artificially invert everything in software?


    Cheers,


    Ben

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Would this then only be a problem if I was uning non-hardware serial pins, and would therefore need to artificially invert everything in software?
    I use often PIC connected directly to RS-232 with resistors in serie (about 1K-4.7K) and i never have any problems with. SERIN,SERIN2,SEROUT,SEROUT2 allow you to drive true or inverted. BUT if your PIC have already an USART, it's more code efficient to use it. If you need to invert signal you can also use simple 10 cents combination of NPN transistor+2 resistors too instead of MAX232+cap
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    barkerben's Avatar
    barkerben Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks - that makes sense, and is what I had suspected.

    Cheers,


    Ben

Similar Threads

  1. Replies: 33
    Last Post: - 19th March 2010, 03:02
  2. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  3. Dynamic USB Serial Number (PIC18F4550)
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 16th July 2009, 17:03
  4. PIC18F4680 to PC via MAX232 (RS232 serial) no output
    By opticsteam1 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th April 2008, 20:39
  5. interfacing to the pc serial port
    By kelangfei in forum General
    Replies: 4
    Last Post: - 7th October 2007, 22:35

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