Software simulation of read/write data bus for external device


I have been looking around the forum and can't seem to find a good example of a data buss emulation with a read and write pulse, and the data direction control. It's to be used with 4 and 8 bit peripheral parts. Has anyone posted something like this.

Stan K'

There exists many ways to transfer multiple bits over an bus, can you be more specific?

On an bidirectional bus you have to toggle the port pins between inputs and outputs, as required, then send an read or write pulse on some other pins. The timing is up to you, it depends on the reaction time of the connected devices (data setup and hold times), and on the bus length/load.

When you run out of I/O pins, I2C bus expander chips can be used to implement one or more busses of any width.


I am using a Mega board and it has a buss built in. I don't know how to use the XMEM lib yet, but I only need four bits and the RD and WR pulse. I am looking for something pretty fast but not as fast as the built in buss. I am trying a sketch now an it seems to work. I guess what I need to know is how fast these read an write operations are. Maybe I should look at the LCD library!