Serial RX / TX pins ?


IN my younger days I used to burn Eproms. Bought a Special ISA-card for a (slow) PC and used it.

Now the PC gone to pieces (RIP). And buying a new ISA Motherboard is hard and very expensive, so instead I plan to use an 328p as the controller. But there seems to be a problem.

I need 8 bits to read the DATA , 16 bits to the Addresses, and 2 bits to control Chip Enable (/CE) and Output Enable (/OE) and 2 to 4 pins to to control additional logic (depending on Chip type (27C16 is very different from 27C512).

Using 2 latches (74HCT573) and a bidirectional DATA-driver (74HCT245) I need two pins to latch the address in the '573's. 2 pin to control the '245 ( /OE and DIR) assuming I only want to read data.

I want to communicate to my PC using the standard USB -interface // serial interface on my arduino one.

And now comes the problem:

Studying the 348P doc's says that D0 and D1 is RX and TX (or vice versa (don't have the docs here)), and those pins are reserved tor Rx and TX, meaning that I can't use the D-port as the above mentioned 8 bit datalines,, because it (surely) will give false signals on the TX line to the PC (again giving false results to the PC).

Or am I wrong here , can I use the D-port and send Address (0-7) to latch 1, Strobe latch 1, send address 8-15 (depending on Eprom type) to the D-port , strobe latch 2, Reverse port D to INPUT, enable the '245 datadriver , read data (corresponding to address 0-7 (latch1) address (8-15 latch2) ) and then send it to the PC.... using the TX PIN ?

I it possible to temporarily disconnect the SERIAL interface, use the D-port as described and when done turn the serial back-on, and transmit the read byte to the PC ?


Is Serial.end() what you want?



YES, it is.

Thanks a lot .



I was too fast.

It does not solve the problem.

As the DO / D1 lines are physically connected to the USB chip any changes on these lines are copied to the USB chip (and again to the PC).

I did a small circuit testing for that problem, and I gave me some strange characters on my screen.

I think the best way to solve my problem is to use D2-D7 as DATA0 - DATA5 and 2 pins on the C-port as DATA0 / DATA1 (leaving the D0 and D1 as TX/RX (or RX/TX)).

Some changes in the software but manageable.

Or I could change the circuit using 3 8-bits shift registers and "shift" the data from the E-prom into the 328p. (Gives me more control pins (and more to code !)) .


Maybe the simplest thing would be to use an Arduino Mega?



I’ll check and come back…


Or a '1284P. 32 IO, 4 8-bit ports.
2 ports for address, 1 port for data, 2 pins for serial, 6 pins free to do other stuff.
I have boards in different form factors, like this Uno-like boards, the chip is easy to add to the IDE for processing.

IDE addition discussed here

You don't have to use a digital port on the 328P. Just use 8 digitalWrite() statements to send your byte to whatever 8 pins you like.

Yes, it's slower than a direct port write but how many kilobytes do you have? I'm guessing "Not a lot".

digitalWriteFast() might be the next option.

You don't have to use a digital port on the 328P. Just use 8 digitalWrite() statements to send your byte to whatever 8 pins you like.

i wonder did you mean "serial port" ?


No, I meant the "groups of 8 pins that the datasheet calls 'ports'," which the OP was using. He was referring to port D, which contains Arduino pins 0 and 1.


I'm back.

I have ordered 3 Arduino MEGA's (2650). One for the EPROM-reader (later Eprom-Writer) and the other 2 for my robot project. That seems to could handle the problem(s).

Thanks for a great help. Very much appreciated.