Shop OBEX P1 Docs P2 Docs Learn Events
Prop to MAX232 into another MAX232 — Parallax Forums

Prop to MAX232 into another MAX232

Zap-oZap-o Posts: 452
edited 2010-04-01 13:13 in Propeller 1
I was wondering if any one has used the propeller with a max232 ic and a male DB 9 connector. I have always used a max232 to receive data from a computer, but now I drew up a circuit that sends data through a max 232 (using the propeller) to a device that also uses a max232.Its not working correctly and wanted to know if anyone has a suggestion. Attached is the schematic of the max 232 chip that connects to the propeller.

Thanks
1327 x 669 - 135K

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-04-01 12:29
    You cannot use a MAX232 unless you include some kind of 5V to 3.3V interface between the MAX232 and Propeller. A 2.2K resistor will usually work although there are other techniques as well. You can avoid that by using a MAX3232 instead which operates off 3.3V and interfaces directly with 3.3V logic.

    The Propeller Professional Development Board (PPDB) has a MAX3232 and a DB9 connector. Have a look at the schematic and manual for it.
  • Zap-oZap-o Posts: 452
    edited 2010-04-01 12:31
    Thanks for the reply mike. I do have a 500 Ohm resistor in between the propeller and the max232. Ill put in a 2.2K and see what happens.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-04-01 12:42
    Other than the mismatch between the 5V and 3.3V logic levels, what you suggest should work and is used all the time.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-04-01 12:48
    Can you just clarify the pins on the D9 on the schematic? I see pins 3, 5 and 6.

    For a D9 3 wire connection, use pins 2,3 and 5.

    I remember a simple rule - male D9s output on pin 3. From that you can conclude that females output on pin 2. Pin 5 is always ground. Ignore the rest. Generally a PC has a male D9 (real D9 on the back, or a USB to D9 cable off ebay for $2). So this will go into a female D9 on pin 3. Which should then go into either pin 13 or pin 8 of the max232. Yours goes into pin 7 which is an output.

    Unless you are outputting to another device?

    I think you are very close. Maybe it is just the series resistors as mentioned above.

    Also another rule of thumb - all RS232 signals are 'resting' at negative volts, eg -9V or -12V. But the TTL equivalent of 'resting' is 5V. (3V on the propeller). So you should be able to trace through a resting signal
    +3V on the prop => -9V RS232 => wire => max232 at the other end => +5V => 1k resistor => 3V on a propeller.

    See my link below - that takes you to a page with a schematic showing a max232 to implement two serial ports on a prop.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller
  • LeonLeon Posts: 7,620
    edited 2010-04-01 12:50
    A MAX232 will probably work at 3.3V. I've used a MAX202 (5V) at 3.3V until I was able to get a MAX3232, before now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • John R.John R. Posts: 1,376
    edited 2010-04-01 13:09
    You may need to have a "null modem" cable between the two devices, in other words, Pin 2 to 3 and 3 to 2 (among other cross connections). If you have a "straight through" cable, there is a good chance that you are connecting the two receive lines to each other and the two transmit lines to each other. This doesn't work so well.

    I believe this is another way of saying what Dr_Acula is describing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.
    Click here to see my Nomad Build Log
  • Zap-oZap-o Posts: 452
    edited 2010-04-01 13:13
    Dr_AculA

    That rule of thumb works. Thank everyone for the help. So to conclude I put a 4K resistor in between the propeller and the max 232. And I had to re wire the pins as Dr_Acula mentioned.

    Thanks all
Sign In or Register to comment.