Shop OBEX P1 Docs P2 Docs Learn Events
Is the Propeller Chip compatible with the Max232 level shift IC? — Parallax Forums

Is the Propeller Chip compatible with the Max232 level shift IC?

Martin_HMartin_H Posts: 4,051
edited 2011-08-11 19:35 in Propeller 1
I have a CBA robot which is an RS232 serial board that hosts an OEM BS2E using a MAX232 chip for level shifting and logic inversion. Mike Davey designed the board so the tx and rx lines are available from the app mod socket. This allows a CPU upgrade via a plugin board to the app mod socket. A cool idea, but I'm not sure if anyone has used it.

It occured to me that Andrew Williams M44D40+ would be a pretty good candidate to use this upgrade feature as it is nearly self contained. I would need a 3.3V power supply, and deal with logic level issues, but that's about it.

There's just one nagging doubt. I have one of Brian Riley's P4 RS232 to TTL programmers (max232 based) which I used for my breadboard Arduino. I thought about using it with a propeller chip and Brian said it was incompatible and the issue was more than just voltage. He didn't specify exactly what the problem was, so I am not sure if it wass the Max232 chip or some other aspect of the P4.

Basically I would think that a tx and rx line are all alike, but I'm not an EE.

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-08-03 19:52
    Martin
    Use the MAX3232 (or ST3232) instead. It's pin compatible with the MAX232, runs at 3.3V and is logic-compatible with the Propeller.

    -Phil
  • Martin_HMartin_H Posts: 4,051
    edited 2011-08-03 20:05
    Phil thanks I just looked up that IC and it looks like it can switch between 3.3 or 5 volts. So that should defiinately fit the bill if I add a 3.3v regulator.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-08-03 20:28
    and Brian said it was incompatible and the issue was more than just voltage.

    The Max232 works fine with the propeller. Just use series resistors (2.7k) between the max232 and the propeller. If you already have a max232 board, your total cost here will only be two resistors.

    Strictly speaking, you only need one resistor, in the line that goes "from" the max232 "to" the propeller. But if you get the lines muddled up that might zap the propeller so it probably is safest to put in resistors in both the Rx and Tx lines.
  • M. K. BorriM. K. Borri Posts: 279
    edited 2011-08-04 04:30
    I have used max232's with no problem either (1k resistors), largely because I was given a 100-pack a couple years ago and haven't finished with those yet :)
  • Martin_HMartin_H Posts: 4,051
    edited 2011-08-04 06:29
    OK, it sounds like swapping the chip or using resistors will work. If I finish up the propeller backpack to BS2E project, I may prototype this on the CBA's breadboard this weekend.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-08-04 07:00
    Please let us know how it works out. Re the resistors, there has been debate in the past about the value, but in practice, any value between 1k and 3k3 will work, and possibly outside that range too. I've used 1k on the max232 for the past year and am changing over to 2k7, but in practice it probably does not matter.

    And max232 with resistors, vs max3232 without resistors, again it probably does not matter. Use what you have to hand.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-08-04 07:44
    Martin,

    If you use the MAX232, use at least 2.2K and, preferably, 3.3K series resistors. The reason is that the Propeller's input protection diodes are only rated to 500uA. (5V - (3.3V + 0.6V)) / 500uA = 2.2K. That's with the full 0.6V forward voltage drop of the diode. At only 500uA, it may not be that high. If the voltage drop were zero, the formula would be (5V - 3.3V) / 500uA = 3.4K.

    -Phil
  • evanhevanh Posts: 16,147
    edited 2011-08-05 06:27
    Martin_H wrote: »
    Phil thanks I just looked up that IC and it looks like it can switch between 3.3 or 5 volts. So that should defiinately fit the bill if I add a 3.3v regulator.

    There's something not right about this thread. Why are you talking about adding a 3.3 volt regulator when the Prop is already running on 3.3 volts?
  • Martin_HMartin_H Posts: 4,051
    edited 2011-08-05 07:28
    evanh, the CBA robot is a kit based robot that uses an OEM BS2 and a 5v regulator, but Mike Davey designed the board so you call remove the OEM BS2 and use the CBA's extended app mod socket to plug in a new CPU on a daughter board. He was thinking of using it with a Pic Axe, but never did it the last I talked to him.

    To use this feature with a propeller, your daughter board would need a 3.3v regulator, a propeller and its infrastructure components, and some way to make the 5 volt signals from the MAX232 compatible with the propeller. But the daughter board wouldn't need servo or wheel encoder headers, power switches, the line following module header, or the header for the bread board area.

    Given how this thread has gone I figure I'll stick with the existing MAX232 as that won't require any fiddling with the voltage supplied to that chip. I deal with the level shifting on the daughter board only. I plan to prototype this by putting a prop on the breadboard area with jumpers from the app mod socket to the pins on the prop. I have a 5 to 3.3 volt level shifter that Duane gave me to handle the transition.

    If that works then when I build the daughter board I may use that or the resistor approach. I already build a serial LCD daughter board, so I would redesign and rebuild that as a propeller/lcd board.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-08-05 12:14
    Whilst it is not official, I have used a few MAX232 chips with a supply of 3.3 Volts and have never had a problem.

    Obviously if guarenteed results are needed then the MAX3232 chip at 3.3 Volts is required or a MAX232 (on 5 Volts) with protection resistor(s), for the Prop's input.

    If the other end of the interface gives boni fidi voltages ( such as a PC ) then a couple/triple of transistors will do the level shifts.
  • QuattroRS4QuattroRS4 Posts: 916
    edited 2011-08-11 19:35
    Here is the Propstick Serial datasheet ..

    www.igniteautomation.com/old_docs/propstick-v1.2.pdf

    Regards,
    John Twomey
Sign In or Register to comment.