There's already lots of good software for programming and debugging AVRs, such as AVRStudio (the official development software from Atmel). However, AVRStudio only really supports STK500 and AVRISP programmers (the official programmers).
Since there are many times when you may want to use AVRStudio, I've written some software glue that will let you use your USBtinyISP in STK500/AVRISP compatibility mode.
Nearly all of AVRISP (STK500v2) functionality is emulated at this point.
- Oscillator calibration is not implemented at all, due to hardware constraints.
- AT89 programming is not tested and probably doesn't work.
- Word-mode flash programming isn't tested (although if someone can tell me of a chip that does this I'll test it).
- ISP clock speed setting is emulated, although the speeds are not 'true.' that is, a 400KHz ISP clock just means that at most, it will be clocked at 400KHz. In reality it's often slower due to the programmer coping with USB stuff.
For general development, I strongly suggest using avrdude as this is a bit slower and is probably flakier.
Please note, this software is in alpha. Your reports, comments and suggestions are appreciated!
(post it in the forum)
If you send a bug report please let me know which chip you are using and what specifically is failing.
The AVRISP, which we will be emulating, usually connects to a PC through the serial (COM) port. The trick here is to install a COM bridge, a piece of software that makes two virtual COM ports that are hooked up to each other so when you write to one it appears on the other. The compatibility software sits on one COM port, pretending to be a AVRISP while the AVRStudio software talks on the other, thinking that it's connected to a genuine programmer!
You'll only have to install this software once.
You can type in help for a list of commands.
We want to install two ports, first check the device manager (Start->Settings->Control Panel->System->Hardware)
Select "Install automatically" and hit next.
You may have to do this twice, once for each COM port.
Or whatever STK500 software you'll looking to use.
Grab this from the download page. It's the software we run to provide the bridging.
Install the software and run USBtiny500.
Select one of the COM ports from the pair you made using com0com. If you select one that is not available you'll get the following warnings:
The software remembers the COM port you've selected so you should only have to do this once.
Next up the software looks for a USBtinyISP, if it fails to find one it will display: