- 3.3V Atmega328p running as SLOW as possible (8Mhz currently)
- NO external crystal - what's the point of having an internal oscillator if it's necessary to duplicate this with an external one? Don't care if we're off from 10% or if there's a little drift with temperature. Doesn't matter for this application.
- Ideally, 1Mhz (or even slower if possible -- I don't have a good excuse for speed for this application); power consumption is king.
- For software, just using the Arduino IDE frontend, but I'm not afraid to dig into the more esoteric aspects of avrdude, as I suspect will be required.
- NO level shifters. These chips are relatively expensive and only used for programming. Better to have a design with just two rails end-to-end (3.3 and GND).
- NO TXD/RXD interface. Plugging in ICSP header and "Upload using Programmer" is fine.
- Set up factory-new device with a bootloader and sketch given the hardware constrains set forth above.
- Know how to tune the internal oscillator. According to this , from the factory the oscillator is calibrated to +/- 10%, but custom calibration can get us to within +/- 1%. Would that be good enough for repeatability if added before the "burn bootloader" step?
I would like to be able able to program with no/zero/nada 5VDC in the pipeline, which rules out any unmodified Arduino because it uses the venerable 5VDC. Even the high-end Due, which is a 3.3VDC device, insists on having 5VDC in the ICSP, so that's out as an option.
Reset line in current setup features a 10k pull-up resistor to 3.3VDC w/the 100pF cap to GND.
Had success programming from a 5VDC Uno to independently-powered 3.3VDC 328p devices, both through-hole and SMD. This appears to be repeatable. However, this is dangerous as the MOSI/MISO/SCK/RESET are still coming from 5VDC, and of course this drives the internal protection circuitry on the target and could eventually cause thermal damage - kinda like Russian Roulette each time it's reprogrammed and therefore not repeatable.
Bought an inexpensive USBasp from Amazon and set to 3.3VDC. Worked 5-6 times then the USBasp device itself failed, and no longer appears as a "port". An inspection of the board revealed poor build quality - it was not even cleaned prior to shipping. Have ordered another one which says it works for 3.3VDC applications; we shall see. It also took out a SMD 328p. An hour of unsoldering that and replacing it with another and going back to the proven but dangerous Uno programming method and I didn't even get as far as I was previously: Bootloader would "sort of" load, but with errors. My best guess is the first, now destroyed one, had the factory oscillator calibrated closer to a tolerable frequency for programming.
I'm unfamiliar with the data flow and handshaking -- should probably read up on that -- but it seems an ACK/NACK method would be superior. Don't really care about the speed of the upload (as long as it doesn't take hours), but I care a great deal about consistent, repeatable behavior.