I am having trouble with a tiny20 implementation. A stock piece of code I've used before is failing on the 20. It is a button debounce/handler. It reads a pin with a button attached and processes it. My code sees the first button hit but then ignores more hits. I am wondering if I have the pin input thing set up right, seeing as how it changed and the datasheet does not fill me with confidence. Here is the init code:
// set up pins /* enable the pull-up function */ PUEA = 0x30; PORTA = 0x30; // PA 4-5 pullups DDRA = 0xCF; // PA 0-3,6-7 outputs, 4-5 inputs DDRB = 0x07; // PB 0-1-2 outs
I cannot debug as they changed it again and one wire debug is not available on the tiny20.