#define capPin A5#define buz 9#define pulsePin A4#define led 10
PORTB|=(1<<(pin number)); // 2 clock cycles as long as pin number is compiletime known, // if not... I think 3, but then it's not interrupt safe on it's own (but this whole routine isn't interrupt safe// since it's timing critical ANYWAY, so not relevant here, and he doesn't flip any bits on PORTB in// an interrupt - or use interrupts for that matter - so doubly irrelevant. delayMicroseconds(6);PORTB&=~(1<<(pin number));delayMicroseconds(6);
I did say in my posting that I changed the port numbers to something acceptable?
I think the code would benefit from a Ctrl+T autoformat, even though I don't always like what it does. I so wish I could tweak it in subtle and not-so-subtle ways.