Pages: [1]   Go Down
Author Topic: RS232 (MAX232) shield with hardware handshaking  (Read 3596 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is my RS232 shield.  It uses a MAX232 chip to set the right signal levels for real RS232 communication.

This shield is fairly unique in that it allows you to implement hardware handshaking (CTS/RTS) through two standard digital pins.



http://hacking.majenko.co.uk/rs-232-shield
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 654
Posts: 50931
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
This shield is fairly unique in that
A thing is or is not unique. There are no degrees of uniqueness. Like pregnant or not. There is no in-between.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 227
Posts: 14048
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


I like the fact that it support hardware handshakes. I think it is fairly unique as there is so much place for prototyping that is left unused....

And that is a pity as it could be extended in such a way that I could choose the mapping of the pins with such a free prototyping area. Maybe an idea for V2.0 ?

Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can already select the mapping for the pins for the RTS/CTS, but not the TX and RX... Maybe that would be useful for use with NSS I guess.  A very slight mod to the board will allow the change.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 227
Posts: 14048
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Indeed I had NSS in mind, moreover it would be great if the shield could be extended to hold 2 hardware enabled RS232's . room enough...

That would enable to place the Arduino between two serial devices to monitor communication, optional to modify it. It would be neat if the CTS/RTS pins
Another application is the multiplexing of the serial signal especially TX, e.g. one Arduino sending to 2 PC's .



INstead of 2 RS232's I can imagine to have all 9 pins supported, including lines as Ring Indicator etc. prefeably with the option to do some loopback, like connecting the RTS and the CTS line so if a device sets the RTS it gets immediately/automatically a CTS. Sort of breakout box functionality.

1 DCD - Data Carrier Detect
2 RX - Receive
3 TX - Transmit
4 DTR - Data Terminal ready
5 GND - Ground
6 DSR - Data Set Ready
7 RTS - Request To Send
8 CTS - Clear to Send
9 RI - Ring indicator ==> to arduino interrupt pin smiley

e.g. see - http://www.lammertbies.nl/comm/cable/RS-232.html -

just thinking out loud ...
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I can see you wanting RI and DCD if you have it linked to a modem, but having DCD/DSR and CTS/RTS?  The two are kind of mutually exclusive aren't they?  Yes, you can implement both at once, but they both do the same job don't they?  I suppose if you have an aged system that only does DCD/DSR maybe...
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27425
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Why not beef it up some - add a dual SPI or I2C UART and the MAX232 to your Uno.

NXP Semiconductors SC16IS752 for instance.
Adds dual serial and 8 general purpose IO to your design.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That looks a nice chip.

However, nice as it is, I can see a few down sides:

1. It's SMD only - yes, I can handle SMD OK, but this shield is for others to build, not me, so simple-to-construct is a must.
2. It doesn't do the RS-232 level shifting, so you'll still need a MAX232 (well, MAX3232 as it's a 3.3v chip) per channel - that's a minimum of 2 - 4 if you want the full flow control.

It's starting to get a bit big now.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I've just ordered some samples of the MAX3111 chip - similar to the NXP one except:

1. Only 1 channel.
2. Only CTS/RTS handshaking
3. Includes the voltage pump for the true RS-232 signal voltages.

That would give a true hardware second RS-232 port on the Arduino without the overheads of running NSS.

Of course, I'd have to write a library for it and make it work identical to the built in UART, but that's no biggie.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Pages: [1]   Go Up
Jump to: