Pages: [1]   Go Down
Author Topic: 8 Bit I/O  (Read 389 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: