"Talking" to a 3.3V AVR

Howdy,

I now have an ATxmega192A3U on a Schmartboard EZ (thanks Bob for the link). Since this is a 3.3V AVR and I don't have a level shifter, I am looking for ideas on how to connect to it. I'd be happy to have avrdude get through to it at this point.

The programmers I have at my disposal are Arduino as ISP, PonySer and USBtinyISP. Only the tiny might be useful to me at this point, as I can power it from 3.3V instead of USB and hope that tiny85 will run adequately. The other two options will likely fry the xmega with 5V output on the SPI.

A simple method might be using two resistors, a 5K in series with the 5V pins and a 10K pull-down after that and replicate this setup on MOSI, SCK and RESET.

I would very much appreciate some ideas on how to proceed safely. Thank you very much

I'd run Arduino as ISP on an Atmega328p based Arduino running at 3.3v/8mhz (like the 3.3v pro mini's) - but you don't have any of those.

I don't know enough about USBTinyISP to comment on that.

Finally - this is a chip that can't be run at 5v? For parts that can run at 3.3v or 5v, I often bootload them at 5v with a 5v ISP programmer, before connecting them to anything that won't like 3.3v.

The resistor divider solution may work well enough to be okay.

Thank you very much Doc,

This won't run at 5V, max permitted voltage is 4V.

I can whip up a 328p on a breadboard solution at 3.3V or maybe use the Gertboard that I have, I think it's 3.3V.

Why didn't I think of that!?!?!

Thanks again.

ive used tinyisp, mkII, dragon, and others but arduino-as-isp and usbasp account for majority of my programming. these can be set for 3.3v or 5v and targets can be either or in between. ive found over the years it dont seem to matter what is used to flash what, 3v->5v or 5v->3v. idk about ATxmega192A3U but this has proven true with the literally dozens of different part numbers.

im always amazed at some of the rube goldberg setups that are recommended or implemented. usually special conversion circuits are not required and rare worse case a simple series resistor will do. fortunately for the "level converter industry" most hobbyists and some professionals lack understanding of semiconductor physics and real world interfacing.

if you are actually concerned then setting up either of your programmers for 3.3v is certainly safe and virtually guaranteed to work with anything.

Thank you John,

Just wondering, how would you set up Arduino as ISP for a 3.3V target?
Other than using 3.3V for power, wouldn’t the 328 send 5V signals on the ISP pins?

well like i said imo target voltage dont matter. but if you insist then simply powering the programmer chip from 3.3v will mean it sends signals at that voltage. 3v in, 3v out.

i have converted many promini and other official arduinos and at least one usbtinyisp to 3.3v by simply switching the regulator or using external source. in fact just yesterday i modified 20pcs $1 chinese digisparks from 5v to 3v. took about 1 minutes each (well the first one maybe 3 to get the hang of it).

my reasons for doing this have nothing to do with programming voltages but rather related to the fact that chips using internal clock must have similar voltage during development as final app. ie 3v battery. in the case of those with usb interface like usbasp or digispark going to 3.3v has added advantage cutting component count in half.

On my standalone programmer from SD card, I brought out the 3.3V buffered SD card signals SCK, MOSI, MISO out as 3.3V level signals to program 3.3V targets. Reset too I think. http://www.crossroadsfencing.com/BobuinoRev17/ |500x440 |500x488

Can always get yourself a cd74HC4050 and wire that up to your programmer. 50 cents won't break the bank will it? http://www.digikey.com/product-detail/en/texas-instruments/CD74HC4050E/296-9213-5-ND/376792

its true that we live in a 3.3v world. there are so many reasons for abandoning the antique 5v standard. not just because of usb and sd card signals but accel/baro/gyro/compass and virtually all other sensors out there now.

ps. lol, bob would surely go out of business were it not for arduino forum.

I have a USBtinyISP. You just remove the little jumper and it's buffers are powered by your target board at 3.3V instead of the 5V from USB. So the level shifting happens on the USBtinyISP.

Thanks everyone for your input.

My USBtinyISP is actually a Littlewire that I built, so I don’t have anything but the base tiny and the passive components, but I could mod it to run at 3.3V.

I tried to connect it to the Gertboard from my Pi - that runs at 3.3V, but avrdude in there must be quite old because it threw errors. Or I messed up the conf file trying to add the part with the 6.1 specs from my PC.

Maybe I messed up the SPI connection to the xmega - I randomly chose the SPI on port C - it has more…

EDIT: xmega requires PDI programming, so my attempts were futile…
Back to the drawing board.

Fair write-up on level shifting

Bi-directional shifter

Ray