Go Down

Topic: 8 Bit I/O (Read 403 times) previous topic - next topic

brum

Is it possible to read or write a whole byte through the ports using Arduino 0011?, I would like to be able to read data from the old 2516 style eproms and display it, and if that works even create a programmer.

mem

There is an overview of direct port IO in the playground here: http://www.arduino.cc/en/Reference/PortManipulation

One issue you will have is that the standard arduino board does not have 8 pins free on any of the ports. Port D is the only one with 8 pins connected, but pins 0 and 1 are used by the serial hardware.

You can get around this by using the 4 high bits from port D (pins 4-7) and the 4 low bits from port B (pins 8-11) or port C (pins 14-17 aka the analog pins). Your code would need to read the values of ports B and C into variables, mask the relevant bits and 'or' them together. There is a link to bitmath in the playground reference above.

brum

Thanks that was quick, I got myself a Sanquino too, so that may be a better board to use for this task, but the method is what I was after, thanks again.

Dave

Go Up