Now it is time for the “true c” style statements! The thing is, there are quite a few of them and they all do the same thing. It gets confusing, but basically it boils down to changing a port register in some way.
There are many right ways to do it, but here is the way that I found to be the simplest. To turn a port high, use this command:
PORT{letter} |= _BV(P{letter}{number});
To turn a port low, use this command:
PORT{letter} &= ~_BV(P{letter}{number});
Replace {letter} and {number} with the corresponding pin letter and number. For example, for pin B5 with the LED, turning it high and then low would be:
PORTB |= _BV(PB5);
PORTB &= ~_BV(PB5);
Note that | can be found to the left of the backspace key, on the same key of the backslash.
So, basically, you can replace the entire digitalWrite() command with the above to get a faster response!
But how much faster is it, really? It is time for an experiment!
Or how do you program an Arduino in this way?
Can you use the Arudino's usb ftdi connection?
Please elaborate. Thanks!
You can use AVR Studio 4, however it is quite complicated and you cannot use the usb connection, you will need a ISP programmer to burn the programs.