Replace MAX232CPE With FTD chip

Probably been covered a thousand times in this forum, but have been doing other things for quite a few years now. I designed many years ago some Serial interface boards using the MAX232CPE RS232 chip. I have been asked by the owners of the product to change these to USB connectivety. The FTD chips obviousley come to mind for such a task, but need some help please. We would like to replace the RS232 port with a USB port. What I would ideally like to do, is remove the MAX chip altogether and replace it with a FTD chip. The problem for me is that I did not write the Firmware for this project, so I am not in a position to change anything as far as the Microcontroller Programming is concerned (we do not have the source code). We use on the MAX chip Tx, Rx and the CTS, RTS lines. What we would like to achieve is for the end customer for the interface board, to be able to load the FTD drivers, connect using the USB port, and use the board like nothing had changed. Is this possible? any pointers please?

PS I did ask FTD, but they just sent a data sheet with a few different chips on, that I did not understand.

Mark in Spain.

Reply to
Anti-Spam
Loading thread data ...

that is kinda the point of using an ftdi chip, just skip the max232 and connect the ftdi chip instead.

only difference should be that because of the way usb work the timing might be slightly different.

it would be very easy to test, just buy an ftdi based rs232-usb converter and use that instead of a "real" serial port, might even consider that instead of doing a redesign

hmm.. might want to stick to buying a finished converter then .....

-Lasse

Reply to
langwadt

Blimey that was quick, thanks. The original product, still sells and I think that the end customers are probably doing what you suggest. It would be a less clumsy solution though, if they could plug straight into the interface board, the saving on the MAX chip, going some way to pay for the USB converter,

Reply to
Anti-Spam

Yes, this has been done many times.

Look at someone's project and just copy it.

formatting link

Its FTDIs design and code, so copy to your hearts content.

h
Reply to
hamilton

Maybe like this...

formatting link

It's a lengthy URL, so beware if it wraps in your reader. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

          Democrats are best served up prepared as a hash
           Otherwise my dogs will refuse to eat them :-)
Reply to
Jim Thompson

Yes, it is. It's also possible that it won't work at all.

If the RTS/CTS lines are used "as intended," that is, for serial flow control, then the probability that it will work correctly and transparently is very high, approaching 1.

If, however, the RTS/CTS pair are used as a "side channel" for signaling and if the signals are required to be synchronized with the serial data stream or with each other, then you may have a problem.

One other possible problem is that some applications limit the number of COM ports that they can "see." For example, the FlukeView software for their ScopeMeters will only connect up through COM8. USB serial ports, on the other hand, can be up in much higher-numbered ports depending on how many different USB-serial gadgets a given machine has used in the past.

It is possible to work around this, if necessary, by going into the Windows Device Manager and manually assigning a "visible" COM port number to a particular USB-serial instance. In this case, the change from a hardware RS-232 port to a virtual USB-serial port would work (subject to the RTS/CTS caveats above) but could require the end user to take an extra step or two to set it up.

--
Rich Webb     Norfolk, VA
Reply to
Rich Webb

The guy who wrote the Firmware for this project was an older, very serious Polish guy, so the CTS and RTS implimentation was more than probably, text book RS232 implimentation.

Reply to
Anti-Spam

No problem at all. There are many chips like these. I often use the CP210x series from Silabs.

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
nico@nctdevpuntnl (punt=.)
--------------------------------------------------------------
Reply to
Nico Coesel

In all likelihood, you'll be fine then -- just use an FT232R in place of your Max232 chip. If you don't bother changing the content of the FT232R's EEPROM, it'll just show up as a "generic serial port" (and Windows will dutifully assign a COM port to it) -- this is probably what you want, although if feel like it you can use FTDI's (free) FT_PROG program to change the FT232R's EEPROM so as to provide a custom description for your board or even use a non-standard product ID code so that it's easier to "find" from your PC-side application (...but leveraging this requires changing the PC-side software, of course).

If you want to test out the idea before comitting to a board spin, just buy an off-the-shelf USB to serial port converter cable that advertises itself as using the FTDI chips and heck things up a bit.

---Joel

Reply to
Joel Koltner

I'm assuming that your board is, in effect, the "target" of the USB connection. That is to say:

- Currently, it has a serial port on it. This has a MAX232CPE chip, sitting between your system's onboard microcontroller and the serial-port connector (DB-9). The onboard microcontroller has TX and RX line (and perhaps flow-control as well), operated with standard TTL/CMOS voltages and conventions, that are wired to the MAX232CPE. The MAX232CPE is converting these CMOS-level signals to standard RS-232 voltages and polarities, and feeding them to the DB-9 connector. If that's the case, you've got a pretty easy solution with the FTDI chips. Your on-board micro will not require any firmeware changes at all... in fact it won't realize that anything has changed.

All you need to do is replace the DB-9 and the MAX232CPU, with one of the FTDI chips and a USB jack (and you can buy modules which have both of these in a single unit). Simply connect TX, RX, and the flow-control signals from your on-board micro to the corresponding pins on the FTDI chip or module.

Your users will then need to install the FTDI USB driver on their PC (it's available as a built-in module on Linux, by the way). Once they plug in the cable to the FTDI, their system will recognize the chip and create a "virtual serial port" that the user's communication software can connect to. They'll need to set the baud rate, data encoding, flow control, etc. for this, just as they would already be doing for the "real" serial port.

--
Dave Platt                                    AE6EO
Friends of Jade Warrior home page:  http://www.radagast.org/jade-warrior
  I do _not_ wish to receive unsolicited commercial email, and I will
     boycott any company which has the gall to send me such ads!
Reply to
Dave Platt

SNIP

That's all well and good so long as the application software doesn't read/write directly to the legacy (ISA) com port addresses....

Reply to
TTman

The embedded side won't be a problem.

Does this board connect to a PC ??

If so, does the PC software toggle the CTS/RTS lines by writing the I/O ports on the PC buss ??

If this is true, you will not be able to use a USB serial port. You will need to re-write the PC software.

h
Reply to
hamilton

Some history, I at the time of the design, could not write firmware. So how exactly the CTS/RTS lines on the RS232 port is being used, I am not able to answer.

In answer to an earlier question, as far as I know, existing customers of this interface board, are using PC based equipment.

What we would like to achieve if possible, is for existing customers to carry on using the product without change to the software they have had written for their host PC (just load the FTD drivers). We also want any new potential customers, not to be put off trying the interface, just because it does not have a USB port.

Reply to
Anti-Spam

Your statement at the beginig of your post is correct, and yes it does use the CTS/RTS lines for flow control. I really need help on which FTD chip to use, and any examples of known working circuitry, I can copy, err sorry I meant emulate.

Reply to
Anti-Spam

Thanks, do you have any example circuits?

Reply to
Anti-Spam

Here are the software manuals the Firmware engineer wrote for the basic product, if it helps?

formatting link
formatting link
formatting link

Reply to
Anti-Spam

I do not think you understand my statement.

You will need to re-write your PC software.

There is no schematic for PC software.

In another post you said: "What we would like to achieve if possible, is for existing customers to carry on using the product without change to the software they have had written for their host PC."

The "if possible" is what I am telling you.

Its not.

Unless you know if the person who wrote the PC software did not use direct PC I/O port calls in his code.

By the sounds of it, you do not know.

With the information given, you can not just replace a hardware serial port on a PC with a USB serial port and expect it to work without problems.

sorry

h
Reply to
hamilton

Use the FT232R. Figure 7.4 on the datasheet

formatting link
shows an example USB to microcontroller interface circuit. You would not, of course, have to use the 12 MHz clock output as shown; the two can happily run from different clock domains.

As somebody else up the thread has recommended, you can pick up a USB to serial cable to try out the setup without needing to do extensive prototyping. Rather than USB to 232 level, though, you'll want to convert directly from USB to logic-level signals, just as the FT232R chip would do.

formatting link
has cables just for this (you're not the first one at this party). I'd recommend the wire-end, I/O-level sensing cable TTL-232RG-VIP-WE. It gives you the most flexibility with respect to where to connect on your target board and it uses its Vcc pin to drive its level converters so it's good for logic levels of 1.8 to 5.25 VDC.

If you can't find the TTL-232RG-VIP-WE model (it seems not to be at the usual distributors, yet) either the TTL-232R-5V-WE or TTL-232R-3V3-WE would do just fine with the indicated logic level. Note that their Vcc pins are low-current outputs.

--
Rich Webb     Norfolk, VA
Reply to
Rich Webb

Although it's certainly possible that the original PC-side application programmer was a crusty old DOS developer, it's very likely that the app controls the COM port through the Windows API. GetCommState() and SetComState() work through the hardware abstraction layer so Windows, the app, and the virtual COM port (via the FTDI DLL) should all work together as intended.

--
Rich Webb     Norfolk, VA
Reply to
Rich Webb

This is true.

h
Reply to
hamilton

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.