1

I have a Pololu 5v AVR ISP which I have successfully used to program several Arduinos (a Mega, an Uno and a Pro Mini 5v). I now have a new Arduino compatible clone which is basically a clone of the pro mini 3.3V.

I am wondering if anyone else has used this programmer to program a 3.3V board without issues. I've seen a forum post on pololu's forum which discusses modifications required - but I don't really understand what is necessary.

I've also found the software tool mentioned in the above forum post here and I have downloaded it and built it.

When I run the aforementioned tool I get these options:

PgmCmd: Configuration and status utility for the Pololu USB AVR Programmer.
Version: 1.0.1.0
Options:
 -l, --list             list available devices
 -d, --device SERIALNUM (optional) select device with given serial number
 -s, --status           display complete device status
     --freq NUM         sets the ISP frequency (in units of kHz)
     --linea ID
       or --lineb ID    set serial control signal associated with line A or B.
                        Valid IDs are: none, cd, dsr, ri, dtr, rts.
                        Warning: dtr and rts are outputs: -f option is required
     --swminor HEXNUM   AVR ISP software version minor (in hex, e.g. A)
     --swmajor HEXNUM   AVR ISP software version major (in hex)
     --hw HEXNUM        AVR ISP software hardware version (in hex)
     --vddmin NUM       set minimum allowed target vdd (units of mV)
     --vddmaxrange NUM  set maximum allowed target vdd range (units of mV)
     --restoredefaults  restore factory settings
     --bootloader       put device in to bootloader (firmware upgrade) mode

I then ran the --status option with the serial number of my programmer and got this:

Serial number:                  00048632
Firmware version:               1.07
Settings:
  ISP Frequency:                200 kHz
  Line A Identity:              None
  Line B Identity:              None
  AVR ISP hardware version:     F
  AVR ISP software version:     2.A
  Target VDD allowed minimum:   4384 mV
  Target VDD allowed max range: 512 mV
Last programming:
  Error: None
  Measured Target VDD Minimum:  N/A
  Measured Target VDD Range:    N/A
SLO-scope:
  State:                        Off
  Line A output:                Off
  Line B output:                Off

From this I deduced that my programmer is currently set at between about 4.38V and 4.89V which I presume corresponds to the 5V approximate voltage of the normal Arduino chips.

Given that the utility program allows me to set both the target minimum Vdd and the target Vdd max range should I therefore set it to something like a minimum of 2704 with a max range of 512 which should put the signal voltages at up to ~3.2V.

Is that all I have to do to get this to work?

  • Instead of modifying your programmer to wok with 3v you can also consider buying a USBasp programmer that has a jumper to select between 5v/3v. The cost is less than $3 from ebay. – alexan_e Mar 11 '14 at 8:11
  • I tried the usbasp method. I bought a cheap one off ebay. When it arrived it didn't work until I gave it a firmware upgrade - fortunately I had the other programmer to do that with. Then having had it's firmware upgrade I tested it out on my arduino with mega2560 and my arduino bt with a 328p. I simply tried the blink sketch - on the bt it worked but not on the 2560. Turns out cheap chinese programmers don't always set the fuses correctly and I had to reload the arduino bootloader using my other programmer. I decided not to risk using the usbasp on my 3.3v things. – m3z Mar 22 '14 at 14:59
  • That is actually unfortunate to hear. I have a USBasp clone (Baite EvUSBasp specifically) and have had success with it for the most part, but I've not tried it at 3.3V. – Ignacio Vazquez-Abrams Mar 22 '14 at 15:14
  • fair enough. i guess it's just a pot luck thing on which manufacturers clone you get. – m3z Mar 22 '14 at 16:09
3

Since AVR ISP is simply a modified form of SPI, the most universal way to handle this is to use a 3/1 level translator such as the MAX3392E. Once you provide it with 5V on VCC and 3V3 on VL it will translate the MOSI, SCK, and nRESET signals to 3V3 and the MISO signal to 5V.

  • Thx. I now have 2 more questions - why does MISO stay at 5V? and I'm not sure I can easily get hold of the part you mention but I do have several of these: sparkfun.com/products/retired/8745 Could I use the tx (bi directional despite name) lines of those instead? – m3z Mar 11 '14 at 2:42
  • I should probably add I come from a Software background rather than hardware and have only really used the serial and I2C interfaces of the Arduinos for communication so haven't come across SPI before. – m3z Mar 11 '14 at 2:45
  • 2
    "MISO" stands for "Master In, Slave Out". It's the signal going from the slave (the device) to the master (the programmer). That translator should work provided that 1) you have 4 bits total, and 2) you fix the 3V3 side as described in the comments. – Ignacio Vazquez-Abrams Mar 11 '14 at 2:48
  • Thanks for this - eventually though I went with @alexan_e's solution of purchasing a cheap programmer from ebay. I didn't realize they were quite so cheap. – m3z Mar 13 '14 at 15:28
  • I've come back to this solution because cheap ebay programmers are cheap rubbish. – m3z Mar 22 '14 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.