Welcome! Log In Create A New Profile

Advanced

Sanguino RS232

Posted by annodomini2 
Sanguino RS232
October 10, 2009 02:34PM
Currently building a Sanguino dev board on breadboard

I have an RS232 on my pc and didn't want to shell out for a USB to TTL cable, the schematic of the dev unit on the sanguino site shows the RTS signal from the USB->TTL connected to the reset pin of the ATMega644 via a Cap, is this a component of the programming mechanism and required?

I have an ST202ECN connected up as described in their datasheet. I know for general RS232 its typically not used, but I want to be certain of its requirement.
Re: Sanguino RS232
October 10, 2009 04:57PM
Well the RS-232 chip you selected has two drivers and two receivers:

You could wire it like the following:

Driver #1 is TX
Driver #2 is CTS

Receiver #1 is RX
Receiver #2 is RTS

You do not have to use the RTS and actually in operation it has been problematic, most people learn the timing sequence of mashing the reset button.

Since you are building this up on a breadboard how are you getting the arduino bootstrap code loader loaded onto your chip?

If you buy the USB to TTL cable you can also use it to burn the bootstrap with instructions that are located here:

[exmrclean.blogspot.com]
Re: Sanguino RS232
October 10, 2009 05:42PM
Be very careful with RS232, as it has a tendency to blow things up, I don't know how high the Rx/Tx signals are but it may be worth checking up on.

I'm using the autoreset feature as programming by pushing a button often fails
Re: Sanguino RS232
October 11, 2009 10:07AM
So the RTS is the autoreset
Re: Sanguino RS232
October 11, 2009 01:48PM
Yup the RTS is the reset, and it is optional.

The capacitor you mentioned is in effect a differentiator. ie it produces a pulse on a transition of the reset line.

This allows the board reset to share the comms driven reset. Not necessarily the best option in all cases. It is possible to reset the processor et al mid print job under certain circumstances.

It is however great if you are doing a lot of code development as it automates the rest for you as you go through lots of trial and error runs with code.

Personally I put up with the pain of manual reset for the gain in control and reduced likely hood of accidents at critical points.

First RS232 interface I bodged together for my first sanguino (sorry no diagrams it was a data-sheet to strip board one off wonder) used a max202CPE. Worked great and was cheap and quick.

I have taken to hacking cheap Cell phone data cables now though for USB to serial (ttl). The clone Nokia DKU5 cable is cheap (2.65 UKP from amazon) and works great no additional level translation is needed.

Hope this helps

cheers

aka47


Necessity hopefully becomes the absentee parent of successfully invented children.
Re: Sanguino RS232
October 23, 2009 02:01PM
Do you have any details on the cable hack?
Re: Sanguino RS232
October 23, 2009 02:28PM
The cable chopping bit gets tricky to document.

But is easy enough to do.

The main problem is that the colour codes on the cable are rather random. ie they change from one clone to another and sometimes across batches of the same clone.

The trick is to google the pinout for the phone connector that the cable is for.

Most have the USB to serial bit in the usb connector end.

So if you know what the phone connections are you cut the phone connector off leaving about 3cm of cable on it. Peel back the cable outer and strip of the insulation. Then using a multimeter or continuity tester meter out which colours go to which pins.

Write them down.

Then strip the cable and insulation back on your cable with the USB connector on and using the colour code to function list you have written down connect these up to your board or a socket for the pin headers on your sanguino.

Ta Da, job done....

Hope this helps, any problems let me know I have done a couple and each had a different colour scheme but all worked OK.


Necessity hopefully becomes the absentee parent of successfully invented children.
Sorry, only registered users may post in this forum.

Click here to login