Yahoo Groups archive

AVR-Chat

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

Thread

RS-232 Butterfly connection

RS-232 Butterfly connection

2006-03-13 by Chuck Hackett

I have been able to generate output from the USART on the Butterfly but my PC
(Dell Inspiron 8100) doesn't see it.

On my scope I can see that data is being generated ("X"s at 100ms intervals) but
I get nothing when I bring up HyperTerminal.  I've tested the HyperTerminal
connection and it is working.  On the scope I can see the start bit, data and
stop bit.  I'm using 38,400 baud, 8 bit, no parity, 1 stop bit.

The only thing I can think of is that the signal does not have enough swing
above and below zero.  My scope shows Mark as about -2.75v and Space as about
+2.25v.

I have checked the Butterfly schematic and it does not use a MAX level shifter,
it is apparently using the "RX" data line to generate the necessary negative
voltage (onto a capacitor) for the TX line.  The Butterfly Vcc appears to be
2.64v.

The Butterfly is mounted on an ECROS Butterfly Carrier board which is supplying
power (via a 4.5v wall wart) and RS-232 connector.

Can anyone tell me where I'm going wrong?

Has anyone successfully transmitted RS-232 data from a Butterfly?  

BTW: The demo program only uses receive data, it does not transmit.

Re: [AVR-Chat] RS-232 Butterfly connection

2006-03-14 by Thomas Keller

Chuck Hackett wrote:
> I have been able to generate output from the USART on the Butterfly but my PC
> (Dell Inspiron 8100) doesn't see it.
>
> On my scope I can see that data is being generated ("X"s at 100ms intervals) but
> I get nothing when I bring up HyperTerminal.  I've tested the HyperTerminal
> connection and it is working.  On the scope I can see the start bit, data and
> stop bit.  I'm using 38,400 baud, 8 bit, no parity, 1 stop bit.
>
> The only thing I can think of is that the signal does not have enough swing
> above and below zero.  My scope shows Mark as about -2.75v and Space as about
> +2.25v.
>   
   This is probably not enough voltage swing for the RS-232 receivers in 
your PC port.  You might want to insert a TI75232 (MAX232 clone, much 
less expensive) in between your Butterfly and your PC.

  I am expecting to have a Butterfly here soon myself, so i am looking 
forward to the same sort of fun you're havingm Chuck.

tom

RE: [AVR-Chat] RS-232 Butterfly connection

2006-03-14 by Chuck Hackett

> From: Thomas Keller
> ....
> > The only thing I can think of is that the signal does not have enough swing
> > above and below zero.  My scope shows Mark as about -2.75v and Space as
> about
> > +2.25v.
> >
>    This is probably not enough voltage swing for the RS-232 receivers in
> your PC port.  You might want to insert a TI75232 (MAX232 clone, much
> less expensive) in between your Butterfly and your PC.
> 
>   I am expecting to have a Butterfly here soon myself, so i am looking
> forward to the same sort of fun you're havingm Chuck.

Hi Tom,

I was thinking that myself but I don't think I can get at the proper points on
the Butterfly as it's multi-layer and SMD stuff that I don't have the equipment
to get to.

But, since they advertise an RS-232 interface you'd think that it would work
with a (fairly) modern laptop ... arrgggg ...

I also tried it with a USB serial adapter that I have but no luck.

Can a MAX chip be run from the power received from the laptop via DTR or
something and driven by the "partially" level-shifted signal available from the
Butterfly?

By the silence on the list, I assume no-one has ever received data from the
RS-232 interface on a Butterfly?

Cheers,

Chuck Hackett
"Good judgment comes from experience, experience comes from bad judgment"
7.5" gauge Union Pacific Northern (4-8-4) 844
http://www.whitetrout.net/Chuck

RE: [AVR-Chat] RS-232 Butterfly connection

2006-03-14 by John Samperi

At 02:27 PM 14/03/2006, you wrote:
>By the silence on the list, I assume no-one has ever received data from the
>RS-232 interface on a Butterfly?

Hi Chuck

I would suggest that you put this question to the forum
on avrfreaks.com as there are quite a few people using
the butterfly including one of the US distributors for
the Butterfly smileymicros. We here are a little more
up market for that type of thing :-) as many of us have
our own boards and don't need to mess around with starter
kits (said he with an upturned nose :-) )


Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

Re: [AVR-Chat] RS-232 Butterfly connection

2006-03-14 by James Hatley

Chuck,

Did you strap some pins on the pc connector side? Look at the AVRISR
schematic to see what they did.

I think I got this right...

From the PC ...

On the 9pin connector that plugs to the PC, it is 4-6, 7-8,  ( 5 gnd, 2
receive data by PC (transmit from Butterfly) and 3 transmit from PC (receive
by Butterfly) ).

Jim

----- Original Message ----- 
From: "Chuck Hackett" <egroupscdh@up844.us>
To: <AVR-Chat@yahoogroups.com>
Sent: Monday, March 13, 2006 7:27 PM
Subject: RE: [AVR-Chat] RS-232 Butterfly connection


> > From: Thomas Keller
> > ....
> > > The only thing I can think of is that the signal does not have enough
swing
> > > above and below zero.  My scope shows Mark as about -2.75v and Space
as
> > about
> > > +2.25v.
> > >
> >    This is probably not enough voltage swing for the RS-232 receivers in
> > your PC port.  You might want to insert a TI75232 (MAX232 clone, much
> > less expensive) in between your Butterfly and your PC.
> >
> >   I am expecting to have a Butterfly here soon myself, so i am looking
> > forward to the same sort of fun you're havingm Chuck.
>
> Hi Tom,
>
> I was thinking that myself but I don't think I can get at the proper
points on
> the Butterfly as it's multi-layer and SMD stuff that I don't have the
equipment
> to get to.
>
> But, since they advertise an RS-232 interface you'd think that it would
work
> with a (fairly) modern laptop ... arrgggg ...
>
> I also tried it with a USB serial adapter that I have but no luck.
>
> Can a MAX chip be run from the power received from the laptop via DTR or
> something and driven by the "partially" level-shifted signal available
from the
> Butterfly?
>
> By the silence on the list, I assume no-one has ever received data from
the
Show quoted textHide quoted text
> RS-232 interface on a Butterfly?
>
> Cheers,
>
> Chuck Hackett
> "Good judgment comes from experience, experience comes from bad judgment"
> 7.5" gauge Union Pacific Northern (4-8-4) 844
> http://www.whitetrout.net/Chuck
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>

RE: [AVR-Chat] RS-232 Butterfly connection

2006-03-14 by Daniel Boyer

>By the silence on the list, I assume no-one has ever received data from the
>RS-232 interface on a Butterfly?

I have done it many times, an I have never had a single problem.  I simply
hooked up my butterfly's uart pins to a 9 pin serial connector, opened up
Bray's Terminal, set it to show me hex  output, tell it to connect, power up
the bfly and then press up on the joystick and you should see a string of
characters (they should be '?' if you have your baud set correctly,
otherwise adjust your baud rate in the terminal.)  If you can see these
characters then you have things setup correctly, if not something is wrong.
Once you can see get to this point, you can move on to having your bfly's
program send you data.  My butterfly works just fine with at least 7
different computers including a Pentium II laptop, an AMD64 laptop, and P4,
P3, AMD64, and AMD sempron based desktops... So either your butterfly has
issues or you have something setup incorrectly.  Check out AVRfreaks, there
are tons of people using butterflies, and there are numerous link on getting
them to communicate with the PC.
	As it is, how are you programming it without being able to receive
data from it? (not using the bootloader?)

Back to work,
	Daniel

Re: [AVR-Chat] RS-232 Butterfly connection

2006-03-14 by Aaron

Chuck Hackett wrote:

>By the silence on the list, I assume no-one has ever received data from the
>RS-232 interface on a Butterfly?
>  
>

I've done it.

Where are you connecting the scope?  Did you solder in the jumpers on 
the carrier board to get the signals to the DB9?  This tripped me up...

Aaron

RE: [AVR-Chat] RS-232 Butterfly connection

2006-03-14 by Chuck Hackett

> From: Daniel Boyer
> 
> >By the silence on the list, I assume no-one has ever received data from the
> >RS-232 interface on a Butterfly?
> 
> I have done it many times, an I have never had a single problem. ....

Armed with this information I went back to square one and started over again.  I
now have it working at 9,600 baud with the ~+2.7v to ~-2.7v signal swing.

I think that the original problem was that I had only connected up the Butterfly
TX and Gnd pins (because, at the time, I didn't need RX).  Looking at the
Butterfly schematic makes it clear that they use the RX pin (thru a diode and a
cap) to supply the negative side of the TX signal.  After correcting that it
still didn't work but I think I had disturbed other settings (like baud rate,
etc.) in my previous attempts to get things working.  After I started from
square one again all is now well.

I apologize to the list for wasting bandwidth on a "my bad".  Lesson, always go
back to square one and verify everything! :-)

As partial compensation for my transgressions I offer:

For those looking for a WinAVR (gcc) version of the Butterfly Demo application,
I found one by Martin Thomas at:

http://www.siwawi.arubi.uni-kl.de/avr_projects/#bf_app 

I'm using it to become familiar with declaring and using flash resident data in
WinAVR.


> From: Daniel Boyer
> ....
> 	As it is, how are you programming it without being able to receive
> data from it? (not using the bootloader?)

I'm loading the Butterfly with AVRStudio via the JTAG interface using an ECROS
Tech. AVR Ice-Cube interface.

Cheers,

Chuck Hackett
"Good judgment comes from experience, experience comes from bad judgment"
7.5" gauge Union Pacific Northern (4-8-4) 844
http://www.whitetrout.net/Chuck

AVRFreaks (was: RS-232 Butterfly connection)

2006-03-14 by Chuck Hackett

> From: John Samperi
> 
> At 02:27 PM 14/03/2006, you wrote:
> >By the silence on the list, I assume no-one has ever received data from the
> >RS-232 interface on a Butterfly?
> 
> Hi Chuck
> 
> I would suggest that you put this question to the forum
> on avrfreaks.com as there are quite a few people using
> the butterfly including one of the US distributors for
> the Butterfly smileymicros.

I agree that AVRFreaks is a valuable resource but I find web-based forums less
convenient to use and prefer getting individual emails that I can download and
read offline.  Is there an 'email' based interface to AVRFreaks?

> We here are a little more
> up market for that type of thing :-) as many of us have
> our own boards and don't need to mess around with starter
> kits (said he with an upturned nose :-) )

Not there yet myself but I'm climbing the hill :-)

Cheers,

Chuck Hackett
"Good judgment comes from experience, experience comes from bad judgment"
7.5" gauge Union Pacific Northern (4-8-4) 844
http://www.whitetrout.net/Chuck

Re: [AVR-Chat] RS-232 Butterfly connection

2006-03-14 by Thomas Keller

Chuck Hackett wrote:
>> From: Thomas Keller
>> ....
>>     
>>> The only thing I can think of is that the signal does not have enough swing
>>> above and below zero.  My scope shows Mark as about -2.75v and Space a abo+2.25vdc
>>>    This is probably not enough voltage swing for the RS-232 receivers in
>>> your PC port.  You might want to insert a TI75232 (MAX232 clone, much
>>> less expensive) in between your Butterfly and your PC.
>>>
>>>   I am expecting to have a Butterfly here soon myself, so i am looking
>>> forward to the same sort of fun you're havingm Chuck.

>>> Hi Tom,
>>>
>>> I was thinking that myself but I don't think I can get at the proper points on
>>> the Butterfly as it's multi-layer and SMD stuff that I don't have the equipment
>>> to get to.
>>>
>>>       

   Well, IIRC from the descriptions, all signals on the Butterfly can be 
brought out from pin headers.  I would assume this means the RS-232 
signals as well.

   As for powert, you'd probably be able to poiwer the device of the DTR 
pin on your notebooks RS-232 (it requres a 3.3 VDC Vcc, IIRC), nd iuts 
currtent draw should be low enough not to cause your RS232 drivers in 
yournotebook any headaches (of coursem there is a VERY good chance that 
the notebook is using 75232 or MAX232 chips as it is).
>>> But, since they advertise an RS-232 interface you'd think that it would work
>>> with a (fairly) modern laptop ... arrgggg ...
>>>       

   Doesn't the Butterfly sport a small "breadboarding" area?  It 
shouldn't take much room to interface to a MAX232 package.

tom
Show quoted textHide quoted text
>>> I also tried it with a USB serial adapter that I have but no luck.
>>>
>>> Can a MAX chip be run from the power received from the laptop via DTR or
>>> something and driven by the "partially" level-shifted signal available from the
>>> Butterfly?
>>>
>>> By the silence on the list, I assume no-one has ever received data from the
>>> RS-232 interface on a Butterfly?
>>>

Re: [AVR-Chat] RS-232 Butterfly connection

2006-03-14 by Thomas Keller

Daniel Boyer wrote:
>  
>   
>> | By the silence on the list, I assume no-one has ever received data from the
>> | RS-232 interface on a Butterfly?
>> I have done it many times, an I have never had a single problem.  I simply
>> hooked up my butterfly's uart pins to a 9 pin serial connector, opened up
>> Bray's Terminal, set it to show me hex  output, tell it to connect, power up
>> the bfly and then press up on the joystick and you should see a string of
>> characters (they should be '?' if you have your baud set correctly,
>> otherwise adjust your baud rate in the terminal.)  If you can see these
>> characters then you have things setup correctly, if not something is wrong.
>> Once you can see get to this point, you can move on to having your bfly's
>> program send you data.  My butterfly works just fine with at least 7
>> different computers including a Pentium II laptop, an AMD64 laptop, and P4,
>> P3, AMD64, and AMD sempron based desktops... 

   *OR* the RS-232 ports on his particular notebook arte not as tolerane 
of out of specification signalling voltages.  Unfortunately, RS-232D is 
not a "Standard," it is a "Recommended Standard," and many 
manufacturers, particularly of notebook computers, cut cornes on them, 
to save space, weight,
 and/or money.

   Many years ago, I develop data tranmission and normalization 
programming for a vertical market cpmpany that marketed CoGo softeware 
paclkages for Surveyors.  This was back when lassr-based electronics 
theodolites were first becoming popular.  We were writing for the CP/M 
and MS/DOS markets (yeah, this was a LOOOONG time ago).   My programs 
worked fine under CP/M, but we got a lot of calls from people using IBM 
PCs complaining that they couldnot transfer data from their instruments 
to their PCs.

   it tooks us a while to realize that there were two instances of 
essentially that same problem hounding us: 1) IBM had themselves not 
adhered strictly to the RS-232C (D wasn;t out then) standards, and, 
worse yet, many fo the battery operated theodolites were outputting 
uni-polar RS-2332 dsignals (e.g., + and 0 volts, not + and - voltage 
signals, as specified in the standards documents)

.  Our only possible solution was to locate an adapter unit that could 
talk to both the PC and the theodolites.  We were about to design and 
build our own when one of our customers informed us that he had located 
such a device, for only $25 retail...so we bougth 250 of them, and 
offered them as optional addons tot he softwarre package (to be usefd 
when using an IBM PC and any of about 1/2 dozen specific theodolites).  
*yeesh*

tom

RE: [AVR-Chat] RS-232 Butterfly connection

2006-03-14 by Chuck Hackett

> From: Thomas Keller
> 

Hi Tom,

My RS-232 interface to the Butterfly is working now, but, to answer your
questions:

> .... Well, IIRC from the descriptions, all signals on the Butterfly can be
> brought out from pin headers.  I would assume this means the RS-232
> signals as well.

Nope, no access to the 'raw' USART ports (i.e.: to the ATMega169 pins) just the
'level shifted' pins.

> ....
>    Doesn't the Butterfly sport a small "breadboarding" area?  It
> shouldn't take much room to interface to a MAX232 package.

The Butterfly doesn't but the ECROS Butterfly carrier board I'm using does
(https://www.ecrostech.com).  

If I did have to run the Butterfly shifted pins through another stage to get it
to work I was going to mount a MAX232 on the carrier board and drive it from the
shifted pins using ground as the neg reference but I knew that this shouldn't be
required except in a case where the serial port on my laptop was RALLY picky.
Since others said it worked 'out of the box' I went back to square one with new
knowledge and it worked.

Cheers,

Chuck Hackett
"Good judgment comes from experience, experience comes from bad judgment"
7.5" gauge Union Pacific Northern (4-8-4) 844
http://www.whitetrout.net/Chuck

Re: [AVR-Chat] AVRFreaks (was: RS-232 Butterfly connection)

2006-03-14 by John Samperi

At 03:55 AM 15/03/2006, you wrote:
>I find web-based forums less
>convenient to use and prefer getting individual emails that I can download and
>read offline.

That was my feeling too when I started using avrfreaks, now I think
I prefer web based forums because, unlike this cosy, almost family like
forum, you get dozens of emails every day and most of them you don't want.
I was on the PIC forum for a while and spend most of the day searching
through the dozens of emails for the 1 or 2 that interested me and deleting
the vast majority. Avrfreaks can get that way too at times so it's good to
just look at the forums that interest you and just look at the new messages
to see if any are of interest. For instance I hardly look at the Winavr (GCC)
forum as I don't use C...and not really that interested in seeing 
what questions
are put there :-)

>Is there an 'email' based interface to AVRFreaks?

Not as such but you can mark the topics that interest you and whenever there
is a new post you will get an email notification. All of your own posts are
automatically marked for notification, so you can follow your thread.


Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

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.