>The AVR has a PORTn, DDRn and PINn register. DDR sets the data direction. >PORT sets >the output status (and is readable, sort of the shadow register that PIC users >implement in software) and PIN is the actual external signal (inputs as well >as outputs "overvoted" by a strong signal). As a side effect, it also makes >the pullup resistors selectable on a per-pin basis (set DDR to input, but >PORT to 1). >Very nice that is, and can be found even in the cheapest member of the family. Indeed.. Set a bit in PORT, then read it in PIN and see if it's high, gives you a cute way to read capacitance. And in the AVR, you can execute: sbi PORTA,0 cbi PORTA,0 Without having to insert no-ops like on the pic. This gives a 125nS pulse on an 8 Mhz AVR. It's most annoying having to add no-ops into what should be a fast clocked serial conversation just because the output pin hardware is too slow..