Butterfly on Windows 10 problems.

Go To Last Post
31 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, the Butterfly is getting long of tooth and will soon be going the way of all good things passed by time. But, not quite yet - that is, if I can get the poor thing running on the damnable Windows 10 excrement.

 

There seems to be a problem with programming the Butterfly under Windows 10. Of course Atmel has long since walked away from the Butterfly and doesn't support it in Atmel Studio 7. I've loaded AVRStudio 4.18 on my Windows 10 machine and after some serious fiddling managed to get it to compile the code.

 

I even got AVRProg to sort of work a couple of times. It actually downloaded a program once, but mostly it either doesn't open or locks up after loading half the program. There seemed to be something intermittent that would cause it to mostly not open, but when it did open, it would erase the old program, load half the new program and then lock up.

 

I tried using avrdude and got all kinds of weirdness - mostly just locking up. I'm suspecting that there is something in the Win10 USB drivers that just doesn't like what I'm doing. Then again it might be my senescent computer and/or brain.

 

These are the specific questions I am asking:

I'm wondering if anyone else has tried to use the Butterfly with Windows 10 and what your experience has been? 

Has anyone got it working with AVRStudio 4 on Windows 10?

Has anyone got it working with avrdude on Windows 10?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's a long time ago but isn't the bootloader just AVR109? If it is then you should be able to use avrdude which takes AVR Studio/AVr Prog out of the picture. As it's communicating to a CDC-ACM then it's just a case of ensuring that the USB-RS232 cable you use to connect to its serial port actually has a driver that works in Windows 10.

 

(sadly I just discovered that my Targus PA088 does not)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Cliff, always helpful as usual.

 

My cable works okay with a terminal program, but, none the less, I do think Windows 10 is messing around somehow since even AVRProg sort of worked a couple of times. I've tried avrdude with similar observations.

 

I'll repeat the summary of the question:

I'm wondering if anyone else has tried to use the Butterfly with Windows 10 and what your experience has been? 

Has anyone got it working with AVRStudio 4 on Windows 10?

Has anyone got it working with avrdude on Windows 10?

 

I think I'll spin off that last question, just in case it might jog someone's memory.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Confession:  I have not been brave enough to risk Windows 10.

 

However,  I suspect there must be many W10 Arduino Users who upload with avrdude every day.

Different protocols but they are still Serial bootloaders.

 

Surely you can just slap a Logic Analyser on the Butterfly TX and RX lines.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

David - thanks for the suggestion. I do have access to a logic analyzer, but I'm not sure what I'd learn. My suspicion is that the signal would just stop in mid-transmission based on the outward behavior, but I'll try the logic analyzer in a day or so if nothing simple comes up.

 

I think Cliff's note about the drivers may be the real problem. Windows seemed to have a problem with finding the drivers for my old chinese cable, then found one, but it may be that it isn't a real driver for that device. IIRC a lot of folks had trouble with these USB/RS232 cables when Windows forced us from XP. There was a time you could pick up these things for a song that had 'XP only' attached to the advertisement. 

 

I think what I'll do next is build my own 'cable' using one of my many FTDI F232R boards on a breadboard. That would give me access to all the pins and in is a system I know well.

 

So thanks for jogging my memory - I'll get right on that.

 

Oh jeez... I do hope the FTDI drivers still work with Windows 10. I guess I'll learn in the next few days.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Smiley, I would definitely like to find out if you can get the AVR Butterfly to work on Windows 10. I just decided to use your AVR C Workshop articles in Nuts and Volts to learn C on AVR's. I plugged in my Butterfly with an eBay FTDI USB-Serial, some different display showed up and then faded out. Now I cannot even get access to the default Butterfly menu. I suspect that whatever I did, it faded out the contrast. The power is still connected but now I just do not know what part, if any part of the menu I am accessing.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I can not speak for w10.  I did manage to get w8 to be usable with my serial bridges.  None of the holographic stickers associated with the w8 machine would allow for a w10 install.  This machine runs offline anyway.

Curiously I found my box of butterflys.  I also found the patch files that make them into a JTAG dongle.  This was the 1.0 JTAG so not of much modern use.  I made a h44780 emulator that drives a 9 char VFD that is i2c based.  Was thinking I might program the butterfly as a front panel using the emulator.

 

Anyway the recommendations here were for Studio4.18.  I had nothing but trouble getting the JTAG MKII to not crash.  I then 'upgraded' to 4.19 and downgraded the AVR toolchain to what I was using on XP and things started working.  I also have three different serial bridges.  The best results come from FTDI.  The chiphead Chinese bridge and the 'Genuine' UNO bridge work fine under Br@@y.  They will not talk correctly to an old DOS (probably 3.1) program that must be setting the baud rate registers direct.  The other thing is that the 64 bit machines are a lot faster than the old 32 bit ones.  I found a few cases where I had to add in some wait states to give time for the old dos program to process the data.  In other words if I use Br@@y to send a dump command that is hex D300100F followed by a < cr > 0x0D.  This command reads as  dump memory space three 16 bytes from 00x10, my dongle only sees the first three chars and hangs in get_hex waiting for the second 0.  If I send D3, then send 00100F  I get the line of hex back as expected.

 

More annoying is that when I send the next 0 in the hung state, the target device sees the 0x0D. So some how the usb bridge or the AVR is only buffering the 3 bytes.  It then looses the next 5 bytes.  I also noticed in the terminal, that big back dumps are also sent as chunks rather than as single chars.

 

I was also thinking Didn't the Butterfly use a charge pump to sort of fake the +-12 needed for RS232?  What happens when this is bypassed and the bridge chip is connected directly at logic leval?   I have some old arduino duemilanove which I removed the AVR from.  If one connects the serial lines and reset I can connect this to a bare metal AVR with only a crystal and the Arduino bootloader.   This combination has been giving me the most reliable results.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

playinmyblues wrote:

Smiley, I would definitely like to find out if you can get the AVR Butterfly to work on Windows 10. I just decided to use your AVR C Workshop articles in Nuts and Volts to learn C on AVR's. I plugged in my Butterfly with an eBay FTDI USB-Serial, some different display showed up and then faded out. Now I cannot even get access to the default Butterfly menu. I suspect that whatever I did, it faded out the contrast. The power is still connected but now I just do not know what part, if any part of the menu I am accessing.

Are you using an external power supply? The Butterfly won't support serial communications with the coin cell battery. If that isn't it, seems I remember posting a tutorial here in the dark ages about common Butterfly problems. I can try to find that if you don't get this figured out.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jporter - thanks for the suggestions.

 

The Butterfly has a notoriously cheap RS232 converter that can be flakey. I'll be retrying things using an FTDI chip on a breadboard so that I can see all the signals. I'll be reporting back in a few days - I hope - when I get some results.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I built a breadboarded 3V power supply using an LM317 and a DC wall wart. I tried connecting the power to the power connections beside both the Port B and Port D ports. The USB-serial board shows up on one of the COM ports in Windows. The USB-serial board is plugged into the breadboard with wires going from TXD to Butterfly RXD and RXD to TXD and GND to GND.

 

As another alternative, I wonder if I could solder the ISP header on and program it that way? I could set up an Arduino UNO as a programmer and use a Linux machine. Arduino and Windows 10 do not like each other yet.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Last Edited: Wed. Apr 6, 2016 - 10:47 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I disagree that the Butterfly can't run RS232 on the coin cell.  That circuit draws no current when not running and very little when it is running.  It steals power from the PC.

 

The only thing I can't do on the Butterfly when coin cell powered is erase the flash.  That requires a 10 or 20 ma pulse.

 

If Atmel supplied the Butterfly with more flash than the puny amount in the Mega169, I'd probably use it more. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My Windows 10 rs232 connection to my Xmegas works okay, but I have real rs232 ports on my PC. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I built a breadboarded 3V power supply using an LM317 and a DC wall wart. I tried connecting the power to the power connections beside both the Port B and Port D ports. The USB-serial board shows up on one of the COM ports in Windows. The USB-serial board is plugged into the breadboard with wires going from TXD to Butterfly RXD and RXD to TXD and GND to GND.

 

As another alternative, I wonder if I could solder the ISP header on and program it that way? I could set up an Arduino UNO as a programmer and use a Linux machine. Arduino and Windows 10 do not like each other yet.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

smileymicros wrote:

playinmyblues wrote:

Smiley, I would definitely like to find out if you can get the AVR Butterfly to work on Windows 10. I just decided to use your AVR C Workshop articles in Nuts and Volts to learn C on AVR's. I plugged in my Butterfly with an eBay FTDI USB-Serial, some different display showed up and then faded out. Now I cannot even get access to the default Butterfly menu. I suspect that whatever I did, it faded out the contrast. The power is still connected but now I just do not know what part, if any part of the menu I am accessing.

Are you using an external power supply? The Butterfly won't support serial communications with the coin cell battery. If that isn't it, seems I remember posting a tutorial here in the dark ages about common Butterfly problems. I can try to find that if you don't get this figured out.

 

I built a breadboarded 3V power supply using an LM317 and a DC wall wart. I tried connecting the power to the power connections beside both the Port B and Port D ports. The USB-serial board shows up on one of the COM ports in Windows. The USB-serial board is plugged into the breadboard with wires going from TXD to Butterfly RXD and RXD to TXD and GND to GND.

 

As another alternative, I wonder if I could solder the ISP header on and program it that way? I could set up an Arduino UNO as a programmer and use a Linux machine. Arduino and Windows 10 do not like each other yet.

 

Sorry for the mutliple posts with this content.

Last Edited: Thu. Apr 7, 2016 - 01:47 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Playinmyblues - I'm not following the reason for all the repeated posts. What am I missing?

 

Steve17 - I have a fuzzy memory of folks complaining about the level shifter, but I'll take your word that it is a robust design as you use it. And how about further details on the pill bottles?

 

Cliff can't get his USB/RS232 working due to lack of Win10 drivers and I suspect mine are flaky due to an improper driver. I plan on revisiting this sometime during the next week or so with an FTDI solution on a breadboard that has a known good Win10 driver. I'll be reporting back at that time.

 

Thanks for the suggestions.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

smileymicros wrote:

 And how about further details on the pill bottles?

The level shifters are little boards that hang by the cables inside to pill bottles.  I cut a slot in the top of the bottle for the cables to enter when the top is on as you can see in the picture.  A jeweler's saw makes it easy.  I use ribbon cable for all my wiring needs, as you can see.

 

The bigger board was from my "transistion" phase.  The transistors are through hole, as are the headers of course.  Most of the rest are SMD.  The connectors are standard tenth inch Molex with squeeze on pins. 

 

The small board is all SMD except for the connectors.  Those connectors are 1.5 mm JST.  They are quite small.  Unless you are familiar with these, I recommend you use the Molex.  I think the only people that use them are crazy.  Actually I'm the only one I know that use them.  smiley

 

I think most small signal transistors will work, but what do I know.  My degree is in mechanical engineering.  One is NPN and the other is PNP.  Atmel uses an SMD package that contains both transistors.  I guess a lot of Schottky diodes can be used.  The BAT43 double diodes may be what Atmel uses.

 

I might be able to give you the PCB design file that you could use.  I use ExpressPCB but usually I then use RobotRoom/CopperConnection to import them and produce gerbers.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Last Edited: Thu. Apr 7, 2016 - 11:15 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the offer, but I've got a number of Maxim RS232 level generating chips and since both the Butterfly and RS232 are going the way of the Dodo, I doubt I'll have future application for the circuit.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

playinmyblues wrote:
Sorry for the mutliple posts with this content.

I was going to suggest that if this happens again that you use the [Report] button to report it to a moderator to get them deleted but I just discovered two flaws in this plan:

 

1) I don't think you see a [Report] button on your own posts

 

2) even if you did, none of the three options are "delete duplicate" anyway

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This will help when I can get back to the Butterfly.

 

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

playinmyblues wrote:
Sorry for the mutliple posts with this content.

I was going to suggest that if this happens again that you use the [Report] button to report it to a moderator to get them deleted but I just discovered two flaws in this plan:

 

1) I don't think you see a [Report] button on your own posts

 

2) even if you did, none of the three options are "delete duplicate" anyway

 

Just about every forum I come across is a little bit different and it takes a little getting used to.

 

The multiple posts with the same content happened because I realized that the conversation I was having with Smiley might not get picked up again unless I quoted it in the post. I searched around a little for a post delete but could not find it. Typing in the tags to code it might have worked but reposting seemed the shorter way.

 

Regarding that Raving Lunatic's post, the FTDI drivers seem to install automatically when I plug in the USB-serial converter as it shows up in Device Manager and all seems to be Ok in the Properties. I will check out the application note to see if it will help.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Maybe this thread is answered and done with but here is my two cents:

 

I would say that I have windows 10 64 bit - AVR S4 - WinAVR and avrdude all working with the butterfly.  Full disclosure - my butterfly does NOT allow the bootloader and the butterfly demo code to function as one.  I think its a bad butterfly.  I have resigned to using the oldest of the AVRISP's with a usb to serial adaptor to connect to the serial input to the AVRISP. 

 

I did have to play with the environment variable to get WinAVR to work right.  I had to add the WinAVR path to my USER variable as well as (or possibly instead of) my system variable.  Could it actually require both? Once I got it to work by adding the USER variable, I didn't delete any system variable.  I didn't want to risk breaking it by poking at it anymore.  Every time I start programmers notepad the PC asks me if its ok, its only slightly annoying.  I am using only software versions from Smiley's cd that accompanied his book except for br@y++ which I got the latest.  Time for a new book edition yet smiley?  Maybe a book based on an MCU with wifi interface to an android app project?  I'd buy it.

 

I already had FTDI drivers installed:

I am primarily an FPGA guy and long before trying any of this I had the latest version of Vivado running on my windows 10 64 bit and the drivers required to program a Digilent BASYS3.  I think I recall getting the drivers from the Digilent website but they are FTDI drivers.

I have two different usb to serial converters and they were both recognized by may machine without incent. 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is really old, but trying to follow the intro of the book: "Quick Start Guide for Using the WinAVR Compiler with ATMEL’s AVR Butterfly" it is really out of date.  The makefile was not there so used Mfile[WinAVR] to make

one.  I can not get programmers's notepad to build it.  I could, go to a gitBash window and say make hex and it will, but make extcoff fails:

Converting to AVR Extended COFF: blinky.cof
avr-objcopy --debugging --change-section-address .data-0x800000 --change-section-address .bss-0x800000 --change-section-address .noinit-0x800000 --change-section-address .eeprom-0x810000 -O coff-ext-avr blinky.elf blinky.cof
avr-objcopy:blinky.cof: Invalid bfd target
avr-objcopy: --change-section-vma .eeprom+0xff7f0000 never used
avr-objcopy: --change-section-lma .eeprom+0xff7f0000 never used
avr-objcopy: --change-section-vma .noinit+0xff800000 never used
avr-objcopy: --change-section-lma .noinit+0xff800000 never used
avr-objcopy: --change-section-vma .bss+0xff800000 never used
avr-objcopy: --change-section-lma .bss+0xff800000 never used
avr-objcopy: --change-section-vma .data+0xff800000 never used
avr-objcopy: --change-section-lma .data+0xff800000 never used
make: *** [extcoff] Error 1
I am stuck here.

Thought the butterfly would be cool to play with, but didn't realize how out of date it is.

 

Joe

Joseph Tannenbaum

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Cof? Why on earth are you trying to use cof? 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Because the next step was to go to Studio to see the simulation.  I couldn't get it to buid all from the programmers notebook, so I have the AVR toolchain (latest) and GnuMake.  In GitBash window, which usese them,

I can make the hex file.  I can use the hex file with AVRDudess and USBTiny and load it and it works.  Sure wish Microchip didn't take down all the ATmel stuff.

 

I am trying this stuff to see if my old brain can wrap around programming in C again after so many years.

Joe

Joseph Tannenbaum

Last Edited: Sat. May 16, 2020 - 09:08 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In an ideal world software would never go out of date.

You would be able read Smiley's book and do all the exercises.

 

It is possible to install all the obsolete tools e.g. AS4.xx and winAVR_xxxx and everything might work.

 

However it might be better in the long run to post a link to the code.   And a reader might create an AS7.0 project for you.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But if someone makes a AS7 project for me, I won't learn anything.  I do have winavr loaded (saved my path variables just in case) I have the Bray terminal ok and I did get studio 7 instead of 4. My major problem is the make file generation and understanding them.  I did not try to load a program into the butterfly with the serial port.  I have a usb to serial converter that I use with my telescope, but I don't think the butterfly is fond of it, so I use AVRDudess and USBTiny to load the hex files using the  ISP connection.

 

This Quarantine has be an opportunity to relearn some old stuff and learn some new stuff.

 

Joe

Joseph Tannenbaum

Last Edited: Sat. May 16, 2020 - 09:32 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I doubt if anyone would create AS7.0 projects for every exercise.   But starting off with one good project as an example means that you can create subsequent projects yourself.

 

After your Butterfly you probably want to write other projects for different hardware.

Which is why "keeping up with the times" is a good idea.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I agree.  I have though done the first one with just the tools under GitBash, so think I'll try to do the others that way.  I already have other dev boards such as Arduino, ESP, and PSoc boards.  This is how I keep myself from going crazy during the quarantine.  I have used Arduino IDE, and MPLab, and some Python under Unix, but this is the first time I've tried using the older tools.  I don't think they agree with windows 10.  Ok a little more time.  I reloaded as7 and updated all I could, the program I was trying built ok, but can find no way to program thru the serial port.  So am I stuck with using the USBTiny isp programmer?  I assume that it will wipe the bootloader instead of the bootloader loading it thru the serial port?  I'm using a keyspan usb to serial adapter.  Tried AVR911, but it keeps timing out. Tried to power up, hold down the joystick the let it up and hit enter, also tried going to jump to bootloader and hitting enter. If I hold the joystick down and hit enter, it says programmer not supported, so, No go.  My cmd line is:  avrosp -dATmega169 -cCOM4 -pf -vf -iftest.hex  I have test.hex in the same dir as avrosp.  Looking like the isp programmer options are going to be the way it goes?  

Joseph Tannenbaum

Last Edited: Sun. May 17, 2020 - 10:03 PM