Code for Send/Receive TTL/Comport Sample?


Closed Thread
Results 1 to 40 of 53

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,653


    Did you find this post helpful? Yes | No

    Default Re: Code for Send/Receive TTL/Comport Sample?

    according to data sheet
    • bit SPEN (RCSTA<7>) must be set (= 1)
    • bit TRISC<7> must be set (= 1)
    • bit TRISC<6> must be set (= 1)

    BAUDCON bits 4,5 control wether data is true or inverted

  2. #2
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Code for Send/Receive TTL/Comport Sample?

    My question was does YOUR circuit have an inverting driver like a MAX232, not the commercial product which typically does. Please post a link to the converter you bought - then we can look and tell you if it requires inversion or not. (Or you could do it yourself) The "invert / don't invert" thing is left over from a time when it was much easier to build an inverting output stage than a non-inverting one, and in order to work reliably you needed higher RS232 voltages than today. Unfortunately this has led to lots of confusion as something that "everybody knows" is no longer common knowledge, and not even taught to newbies.

    The PIC by default expects to have an inverting driver in it's circuit, so it sends stuff upside down, knowing it will be put right side up by the rest of the circuit before it goes off into the real world.
    SOME PICS (NOT all) can be told there is no external inverter.

    Related topic, setting TRIS for both will completely break the link. It has nothing to do with inverting data.

Similar Threads

  1. how to send and receive sms using vb?
    By shyhigh2002 in forum Off Topic
    Replies: 0
    Last Post: - 1st April 2009, 09:18
  2. please who can help me for sample code
    By jasem700 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 22nd February 2009, 20:41
  3. How to build modem for only send and receive the msg
    By PoTeToJB in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 7th April 2006, 13:37
  4. send and receive data using pic 16f84a
    By PoTeToJB in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th February 2006, 20:12
  5. send and receive data using pic 16f84a
    By PoTeToJB in forum Serial
    Replies: 1
    Last Post: - 25th February 2006, 14:47

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