I've designed a board (in KiCAD) that contains the attiny2313a mcu (two of them, actually) that plugs onto an OrangePiZero microcomputer. It runs on 3.3V and has a capacitor between VCC and GND. I've connected reset, miso, mosi and sck to Gpio pins (and not to anything else). I have regularly used avrdude to do serial programming of Arduino atmega devices this way, so I know that works. However, when I set it up to program this attiny, the device does not respond at all.
I have electrically tested the connections; all the pins are properly connected to the correct gpio pin, and none of them are connected to each other. I've also manually operated the Gpio pins on the microcomputer and they all work as expected.
My ideas for what the problem can be are:
- reset pin is not active (set to dW or regular digital pin in fuse bits). This seems extremely unlikely, given that I soldered it on myself, so it shouldn't be possible that it's not in factory default settings.
- the clock source (set by the fuse bits) is not an internal oscillator: my board uses the internal RC oscillator, so no crystal is connected. This is as unlikely as the previous option, for the same reason.
- avrdude is buggy when it comes to this mcu. I find this very hard to believe.
- I broke both the devices when soldering them to the board. I suppose this is possible, but I find it unlikely especially because both of them are broken. (Then again, if I'm doing it wrong, I would do it wrong twice.)
- my board design is bad and there is too much interference between the traces, or too much resistance in the traces, or something similar.
- something else that I did not think of.
What am I likely missing?
For those interested, I attached the board schematic.
My avrdude.conf is:
programmer id = "boiler"; desc = "Program the attiny2313 pretend-boiler"; type = "linuxgpio"; reset = 2; sck = 16; mosi = 13; miso = 14; ; programmer id = "thermostat"; desc = "Program the attiny2313 pretend-thermostat"; type = "linuxgpio"; reset = 3; sck = 7; mosi = 19; miso = 18; ;