Shop OBEX P1 Docs P2 Docs Learn Events
Communicate between Propeller and AVR MEGA16 (USART) — Parallax Forums

Communicate between Propeller and AVR MEGA16 (USART)

dr hydradr hydra Posts: 212
edited 2010-07-29 13:31 in Propeller 1
Can you directly hookup an AVR MEGA16 USART port (5V) to the propeller and use the fullduplex serial code to communicate between the devices ( three wires..RX/TX/Ground and 1K resistor for 5V)?· Or does the connection need some type of MAX3232 chip? ····Also would the RX or TX be inverted?·
Thanks

Comments

  • JonnyMacJonnyMac Posts: 9,208
    edited 2010-07-28 21:50
    You should be able to insert a 2.2K or higher resistor between the TX of the AVR and the RX pin on the Propeller and be good to go. Use True mode. I've connected the SX and BASIC Stamps to the Propeller this way many times.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA
  • dr hydradr hydra Posts: 212
    edited 2010-07-29 13:18
    Thank you for the reply. What is True Mode? I have never heard of True Mode
  • LeonLeon Posts: 7,620
    edited 2010-07-29 13:24
    Not inverted. You need the data to be inverted if you are using a MAX3232, or something like that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • Mike GreenMike Green Posts: 23,101
    edited 2010-07-29 13:31
    RS232 uses negative voltages for logic 1 and positive voltages for logic 0. This is the opposite of what most serial I/O chips provide (+Vdd for logic 1 and 0V for logic 0) so the RS232 conversion circuits (like the MAX232) invert the signal for you. The serial I/O chips (or processors like the Propeller) provide an un-inverted or true signal with the serial line idling at logic 1 (stop bit), the start bit at logic 0, and data with its "true" sense. Sometimes RS232 circuits will accept 0V for logic 1 and +5V or +3.3V for logic 0. In that case, you can sometimes connect a serial I/O chip to these "permissive" RS232 circuits directly, but you need to invert the sense of the signal to match, hence "inverted" vs. "true" mode.
Sign In or Register to comment.