Press "Enter" to skip to content

Category: electronics

AVRDUDE Bug Report

AVR Dragon jumpered for HVPP (High Voltage Parallel Programming) with an ATMEGA8-16PU in the ZIF socket.

After some conversation with an AVRDUDE developer I submitted bug #26002: HVPP of EEPROM with AVR Dragon and ATmega8 Fails. This problem was mentioned earlier and while I tried to get the app building so that I could attempt to fix it myself I wasn’t getting very far.

Thankfully I’m able to use the AVR Dragon in HVPP mode (which is the configuration shown above with the many, many jumpers) via AVR Studio and accomplish my goal. This means that programming the chips for the SDrive NUXX kits/parts/assembled devices should go quite smoothly.

Leave a Comment

Building AVRDUDE Under OS X

NOTE: This doesn’t work right. See this update.

Since I don’t do much software development, it took me a bit to understand how to get AVRDUDE to compile with libusb under OS X. These steps here have been confirmed to work for AVRDUDE v5.5 and v5.6:

– Install libusb from MacPorts: sudo port install libusb
– Extract the AVRDUDE source, change to that directory.
– Set CPPFLAGS so the libusb headers can be found: CPPFLAGS="-I/opt/local/include" && export CPPFLAGS
– Set LDFLAGS so the libusb libraries can be found: LDFLAGS="-L/opt/local/lib" && export LDFLAGS
– In the AVRDUDE source directory, run configure as the MacPorts version does: ./configure --mandir=${prefix}/share/man
– Build it: make
– Win!

UPDATE: This doesn’t actually work. It builds, but attempting to access the AVR Dragon returns the following error: avrdude: jtagmkII_getsync(): sign-on command: status -1. This also occurs with the version of AVRDUDE in MacPorts, making me wonder what exactly the AVR MacPack folks had to do to make it build properly for OS X.

1 Comment

Programming Problem w/ AVR Dragon and ATmega8 in HVPP Mode

Over the weekend I received the jumpers for connecting the recently acquired AVR Dragon, so I decided to give it a go this weekend. Because the chips I’m using are programmed to use an external clock, the best programming mode for writing chips stand-alone is High-Voltage Parallel Programming, which doesn’t rely on an external clock.

After jumpering the board for HVPP per the SCKT3200A2 devicesheet in the official AVR Dragon documentation I tried it out on both OS X and XP, and it mostly works well, except for programming the EEPROM. For some reason, EEPROM seems to just not write, and thus validation fails. If I insert a chip with EPROM already programmed properly, validation will work, so reading is definitely working and nothing is (even partially) overwriting the existing data.

There are no problems writing the Flash or fuses, and since writing to both Flash and EEPROM use the same lines, I don’t think it’s something mis-jumpered. Nor do I believe the problem is the chip itself, since I’ve tried multiple chips which can be programmed in an STK200 (parallel port bitbang) programmer.

Here’s the command lines used with the AVR Dragon which errors while validating the EEPROM:

avrdude -p m8 -P usb -c dragon_pp -U lfuse:w:0x3f:m -U hfuse:w:0xdf:m -U flash:w:SDrive.hex:i -U eeprom:w:SDrive.eep:i

Here’s the one used with the STK200 clone, the same chip, and the same version of avrdude, which works just fine:

avrdude -p m8 -c stk200 -U lfuse:w:0x3f:m -U hfuse:w:0xdf:m -U flash:w:SDrive.hex:i -U eeprom:w:SDrive.eep:i

Here’s the actual error:

[Working stuff here cut...]
avrdude: verifying ...
avrdude: 8084 bytes of flash verified
avrdude: reading input file "SDrive.eep"
avrdude: writing eeprom (329 bytes):

Writing | ################################################## | 100% 36.51s

avrdude: 329 bytes of eeprom written
avrdude: verifying eeprom memory against SDrive.eep:
avrdude: load data eeprom data from input file SDrive.eep:
avrdude: input file SDrive.eep contains 329 bytes
avrdude: reading on-chip eeprom data:

Reading | ################################################## | 100% 33.60s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0x72 != 0xff
avrdude: verification error; content mismatch

avrdude: safemode: Fuses OK

avrdude done. Thank you.

If anyone has an idea as to what might be wrong here, I’d love to hear it. This is exactly the same problem I get on both Windows XP (avrdude v5.6 from WinAVR-20081205) and OS X (avrdude v5.5 from AVRMacPack).

For what it’s worth, I have posted this here on the AVR Freaks forum, but it doesn’t seem to be receiving any replies.

UPDATE: It seems that this is a problem with avrdude. I can program the chip with no problem in HVPP mode using AVR Studio. This would be a good time to have a logic analyzer. Maybe I could actually fix the problem.

2 Comments

SIO Connectors!

Pile of 25 Atari SIO Connectors.

Today I just happened to find a package containing 25 brand new SIO connectors in the mailbox. Because of this I have reopened orders of wholly assembled SDrive NUXXs. I’ve also put the assembled devices on the SDrive NUXX ordering page, so they can be ordered by people without my manually sending invoices.

Leave a Comment

Two-Layer Simple PCB Routing

Top / component side of a PCB.   Bottom / solder side of a PCB.

While doing the PCB layout stuff for the SDrive NUXX, I’ve spent a lot of time trying to make the traces as simple and attractive as possible, while ensuring the components on the PCB are reasonably well spaced and thus easy for an average DIY person to solder. When I do this, I set up the board with two layers, with the top primarily being the ground plane, and the bottom holding as many of the other connections as possible.

After establishing part footprints and placement (mostly based on front / rear panel controls in the SDrive NUXX’s case) I then try to lay out the rest of the parts, fitting them together like Lego, taking into account things that need to be near each other (caps and certain things), and other stuff like that. Then I route the board, trying to keep as many traces on the bottom as possible and moving repositionable components as needed. Of course, surface mount parts often require their traces to be on the top, but generally most things can be kept on the bottom.

Once everything connected in a layout that is looking good I’ll turn off everything but the top and bottom layers and associated pads, vias, and airwires. I then look at every top layer trace, and if it’s not needed for an SMT part or crossing over a trace on the bottom, I’ll try to move it to the bottom.

Next I’ll turn alternate showing only the top or bottom layers, as shown above. On the left is the top (or component) side with its traces in red, and on the right is the bottom (or solder) side in blue. Looking at just one side at a time I can more easily see traces routed in unnecessarily complex patterns. Sometimes I’ll have stairstepped a trace or routed it around something when a much simpler, straighter path would do. I find that having more layers (documentation, part outlines, part names, etc) turned on while doing hand-optimizing causes me to keep traces of areas where they can safely go, particularly under other components. Hiding this information clutter lets me focus on the bare wiring itself making the task even easier.

After a few rounds of this I generally find that the result is a layout with simple, direct, and well organized traces.

Leave a Comment

Twelve SD Cards

Twelve SDrive compatible Kingston 2GB SD cards.

Buying twelve SD cards at a time feels a bit odd. However, they are needed, as the assembled SDrive NUXXs each come with one. They’ve all now been reformatted as FAT, labeled (SDRIVE_NUXX), and had SDRIVE.ATR copied to the root. Checksums were done to ensure that the file arrived intact.

I’ve also got a line on some more SIO connectors, so it’s possible I’ll be able to open up the ordering further than I had before. Being able to do this would be good, as I’ve already got a couple people on the wait list.

Leave a Comment

AVR Dragon

Overview of the Atmel AVR Dragon with extra pin headers, LRF, and DIP40 ZIF socket in place.

Yesterday the Atmel AVR Dragon which I’d ordered earlier in the week from Digi-Key arrived. This is a low cost ($50) dev device and programmer which does in-system programming, high voltage serial programming, parallel programming, JTAG programming. It also does full emulation of devices with less than 32kB of memory, with debugging support available via JTAG and debugWire.

In short, it can do a lot. The only downside is that it comes as a rather sparse kit requiring one to bolt on a few extra parts to make it nicely usable. My first desire is to use it as a batch programmer, so I set it up with a ZIF socket and pin headers which, when properly connected together, any DIP part to be installed and programmed. It’s also supported by a whole bunch of different (legally) free programming tools, which is really nice.

It’s too bad that I’m waiting on this set of jumpers from seeed_studio to arrive so I can easily plug it all together. Hopefully these will be here next week.

If you’d like to see photos of the AVR Dragon that arrived today, including some of the ZIF socket and add-on LRF support, please take a look here: Atmel’s AVR Dragon.

Some people just don’t get it, though. Take :

19:59 <BleuLlama> like an arduino for programming AVRs
20:18 <c0nsumer> haha
20:18 <c0nsumer> no.

Leave a Comment

SDrive NUXX Parts Now For Sale

Prototype 1 PCB (v1.0) in the enclosure with v1.0 end panel artwork.

It’s happened. The SDrive NUXX parts are finally available for ordering over on the SDrive NUXX Ordering Page. As noted here on the AtariAge forum I’ve got four things for sale:

· SDrive NUXX PCB & End Panel SetUS$35 – One SDrive NUXX PCB v1.1, one set (front and rear) SDrive NUXX End Panels, two thread-cutting screws for mounting thick-wing SIO connectors, and two 4-40 screw/nut sets for mounting thin-wing SIO connectors.

· Preprogrammed MicrocontrollerUS$5 – One Atmega ATmega8-16PU (PDIP28 package) microcontroller, programmed with the SDrive firmware with the Brown-Out Detection (BODEN and BODLEVEL) fuses programmed. Only available with the purchase of an SDrive NUXX PCB & End Panel Set or SDrive NUXX Kit.

· SDrive NUXX KitUS$100 – The aforementioned PCB & End Panel Set, plus a preprogrammed Atmel ATmega8 microcontroller, and all the other parts for building one SDrive NUXX except for an SIO connector. This includes a black Hammond Manufacturing 1455L1201BK enclosure. Note that if you wish to use the enclosed DB15 connector instead of your own SIO connector, some slight modification of the IO Connector hole on the rear panel will be required to ensure that the mounting screws fit.

· Completely Assembled and Tested SDrive NUXXUS$150 – One completely assembled SDrive NUXX with SIO connector, tested and ready to use. Includes a 2GB Kingston SD card containing SDRIVE.ATR, tested to work with the SDrive NUXX. As I only have access to a limited number of SIO connectors, this is limited to a total of 10 items, to be sold on a first-come, first-served basis.

All aforementioned items ship FOR FREE via First-Class Mail to US addresses. For international destinations, postage (via First-Class Mail) is a flat-rate US$7 to international destinations for each complete SDrive NUXX, SDrive NUXX Kit, or every five SDrive NUXX PCB & End Panel sets.

From now through 03-April-2009 I will be accepting orders. After 03-April-2009 the ordering window will be closed and I will begin ordering the parts. The PCB and end panel manufacturers have quoted me three weeks lead time for manufacturing, and then a week (or so) for shipping, meaning that I should receive these parts around the beginning of May. As soon as the PCBs and end panels are received I will begin assembling and shipping orders. I will have all orders shipped out as soon as possible.

So, that said, if you’d like to place an order, please head on over to the SDrive NUXX Ordering Page. The payments are handled via Google Checkout. Note that if you are wanting to order an assembled SDrive NUXX (or get on the waiting list for in the case that ordering is full) an assembled SDrive NUXX you will need to email me directly. (See the ordering page for more information on this.)

And, finally, please be sure to review the SDrive NUXX, SDrive, and SDrive NUXX Ordering pages before ordering, to ensure that you have a good understanding of what it is that you are buying. This is a DIY project, and while all parts are guaranteed to be free from defects they are otherwise without warranty or technical support.

2 Comments

HW-group’s Hercules

Since Dominic / is doing some serial port troubleshooting today, I dug up a link to one of my favorite serial port troubleshooting tools: HW-group’s Hercules. This is made available ostensibly for use with their RS232 / network / remote serial port devices, but it works great for all manner of serial port work.

I’ve used this utility quite often in the past when testing out serial ports, USB to serial adapters, and various serial devices that I’ve made. I like it because it shows the status of things in virual LEDs and allows you to send arbitrary data, manually toggle DTS/RTS on and off, and just generally generate and receive serial data at will. It also has some nice built-in network features that allow one to virtually use a serial port across a network, and other features which are generally useful for those doing serial network stuff.

Here’s a quote from HW-group’s Hercules page which lists its basic features:

· All basic TCP and UDP utilities in one file, no installation required (just one .EXE file)
· Implemented Serial Port Terminal is working with the Virtual Serial Ports (COM12 for example). You can check and control all serial port lines (CTS, RTS, DTR, DSR, RI, CD)
· Simple TCP client (like the Hyperterminal) with the TEA support, view format, file transfers, macros..
· Easy to use TCP Server with the TEA support, view format, file transfers, macros..
· Hercules contains simple UDP/IP “Terminal” with view formats, echo, file transfers, macros..
· Support the NVT (Network Virtual Terminal) in the Test mode tab, as like as NVT debuging features..
· Using Telnet extended with NVT allows serial port configuration (RFC2217), device identification, confirmation of data sequence, etc.
· It’s FREEWARE you can use and share this software free – check the licence!

Leave a Comment