Hello Eddy Wright,
In order to be compatible with AVR Studio, the Pololu USB AVR Programmer uses the same protocol as the AVRISP programmer. AVR Studio can not distinguish our programmer from the AVRISP. However, our programmer supports different frequencies than the AVRISP, so the frequency labels you saw in AVR Studio are wrong. For example, if you see “1.843 MHz” in AVR studio, it actually means 2000 kHz on our programmer. If you look at the table in Section 3.d of the user’s guide you can see the correspondence between those labels and the actual frequency used on the programmer. If you use our configuration utility, then you can set the frequency using the correct labels. As far as I know, there is no bug in our configuration utility or in the AVR Studio window for setting the ISP frequency. Both methods of setting the frequency will work, but if you are doing it in AVR studio you just have to remember that the labels are wrong.
When you tried setting the frequency to 115 kHz in AVR Studio, you were actually setting it to 750 kHz, so that’s why it didn’t work on your 1 MHz AVR.
The typical AVR data sheet will tell you that the SCK low time and SCK high time both have to be “> 2 CPU clock cycles for fck < 12 MHz, 3 CPU clock cycles for fck >= 12 MHz”. So if your AVR’s clock frequency is less than 12 MHz, the ISP frequency must be less than 1/4th of the clock frequency. If your AVR’s clock frequency is greater than or equal to 12 MHz then the ISP frequency must be less than 1/6th of the clock frequency.
I have never noticed that the ISP frequencies in AVR Studio vary depending on the target chip. What two target chips have you tried that have different ISP frequencies available in AVR Studio? If there are some chips that are incapable of higher clock speeds, I can imagine that AVR Studio wouldn’t let you select some of the higher frequencies: is that the case?
That’s cool that you are working to make Bascom work with our programmer! I don’t know if you have these already, but here are the documents describing the protocol: AVR068: STK500 Communication Protocol and command.h.
The ISP frequency is determined by a one-byte parameter called SCK_DURATION which can take any value between 0x00 and 0xFF. AVR Studio only lets you set this parameter to 6 different values. In the table below, you can see the correspondence between SCK_DURATION, the label in AVR Studio, and the actual frequency used on the programmer. All frequencies listed below are in units of kHz.
AVRISP Freq Label Actual Freq SCK_DURATION
----------------- ----------- ------------
1843 2000 0x00
460.8 1500 0x01
115.2 750 0x02
57.6 200 0x03 <- factory default, because it works for 1 MHz AVRs
4.00 4.0 0x26
1.21 1.5 0xFE
Let us know if you have any more questions, and good luck integrating the programmer in to Bascom!
-David