Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] PC COM Ports - was: testing uart using atmega16

2005-12-14 by Ralph Hilton

On Wed, 14 Dec 2005 07:42:58 -0800 you wrote:

>Zack Widup wrote:
>
>> On Tue, 13 Dec 2005, sheena licarte wrote:
>> 
>> 
>>>Mr. David and Mr. Zack thanks for the advice. i'll  try to test things 
>>>one at a time. by the way is it possible to connect  avr directly to the 
>>>rs232 level converter such as max 232 and then to  pc?
>>>
>> 
>> 
>> Yes, the MAX232 series all have TTL inputs/outputs for the device and 
>> RS-232 level inputs/outputs for the line.  They are very easy to use.
>> 
>> Zack
>
>Just a little heads up about comm ports on PC's. The RS-232 spec defines
>valid levels for the data line to be > +3V and < -3v. So you would think
>a MAX232 type device running on 3.3V and outputting a +/-6V signal would work
>just fine with a PC. Not so... The PC folks (maybe IBM 20 years ago?) decided
>to attenuate the inputs by a factor of 2, setting the switching thresholds
>at +/- 6v.
>
>This bit me in the rear a couple years back when I fired up a new prototype
>board and connected it to my desktop Dell box. Comm was dead but the scope said
>it was working... A bit of fiddling with a function generator revealed that all
>the desktop and laptop Dells and Sony boxes needed about +/- 6.2V to switch!
>
>Just by luck I found an old HP desktop that switched at +/- 5.5V. That one is still
>connected to my prototype.

Another option available if you have a suitable program on the PC is to power the PC side
of an interface from the RTS/DTR lines. In one application I set RTS and clear DTR and use
a couple of optocouplers with only 3 volts on the microcontroller.
The bottom right of the circuit on http://www.cmeter.org/schematic.gif shows connections.
--
Ralph Hilton
http://www.ralphhilton.org
C-Meter: http://www.cmeter.org
FZAOINT http://www.fzaoint.net

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.