Ttl - Rs232


Closed Thread
Results 1 to 4 of 4

Thread: Ttl - Rs232

  1. #1
    Join Date
    Jul 2006
    Posts
    60

    Default Ttl - Rs232

    Hello All

    In my programm i not use the MAX232 inverter for serial communication to the PC, i use a 1k for tx and 22k resistor for rx Pic pin and the code like this

    bmode con 16780'
    ''''serin2' 16780 = 2400 inverted (without max232)

    instruction like this
    SERIN2 dinp,bmode,3000,main,[wait ("C"),HEX2 esp0,HEX2 esp1]

    now i need to connect my board to other board from a customer that communicate serial with TTL level

    My question is, must i change anything in my code to communicate in TTL level?

    Thanks for help

    Kind regards

    Pedro

  2. #2
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    You are using TTL levels. You might have to change polarity. RS232 is usually inverted but the other board may be non-inverted.

  3. #3
    Join Date
    Jul 2006
    Posts
    60


    Did you find this post helpful? Yes | No

    Default

    Hello

    The next questions is:
    Must i remove the 1k and 22k resistors from the circuit, i mean direct connecting the two processors?

    Thanks

    regards
    Pedro

  4. #4
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Sorry - I didn't see this earlier.

    The resistors are there to limit the current sourced or sunk by the PIC pins to a safe level. Assuming 5V logic, the 1K resistor limits the current to 5/1000=5mA. RS232 levels can be as high as 25V so the 22K resistor limits that current to 25/22000=~1mA. You can leave them as they are or you can replace the 22K with 1K. If there's any chance you'll connect it to RS232 levels, keeping the 22K is safest.

    Check the PIC datasheet to see the maximum current limits for each pin.

Similar Threads

  1. Universal remote and Rs232
    By Michael in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 7th February 2010, 17:55
  2. UART vs software RS232
    By Michael in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 5th September 2008, 18:27
  3. RS232 into 2 PC ports
    By manxman in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th August 2008, 13:33
  4. Software RS232 and wireless modules
    By Michael in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 17th August 2008, 05:27
  5. 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

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