Using RX/TX pins of Nano for parallel data transfer

I am starting a new project where I need to interface a SAA1099 to a nano. This uses 8bit parallell data trasfers and on the nano the only available full 8 bit port is PORTD which is also used for RX/TX.

My doubt is, will these pins be affected by the usb to serial converter? The transfer must be as fast as possible and I'm not sure if the converter will add some bias to these pins affecting fast transfers...

Cheers.

Why? What is 'as fast as possible'? I don't think that it's a problem if you split it to two ports with direct port access. It will still be faster than the processors in the 80s.
You should not use the Tx/Rx pins.

Parallel usually takes more pins than that. There are usually a pin to tell when data is ready to be read and a pin to acknowledge that the data has been read. Better check the actual protocol being used.
Paul

This device was invented in the early 1980s, I doubt it requires a fast data transfer, even by the standards of a 1990s processor like atmega328

It will consume a large number of the Nano's pins.

I would suggest attaching a 74hc595 shift register to the Nano's SPI interface and using the shift register's output pins to drive the saa1099's data input pins. This will save a useful number of the Nano's pins and still provide a pretty fast interface.

Yes, as you can see from the Bus protocol:


And you can see that it doesn't matter if your D0..D7 are not on one port. There are many other pins to set in the correct order. Even the suggested shift register connected to the SPI interface should be fast enough.

One single instruction cycle to transfer the data. The nano will be doing other things and I need it to be as free as possible, I don't want to read ports statuses, mask data, shift and write to two different ports, that's too much overhead.

I know it will not allow to use the serial port on the nano but that's not a problem, my concern is if the serial to usb converter may affect the signals on these pins when the nano is not connected to a USB port (the nano will be powered directly to the +5v, not using the USB).

I already know the protocol, I have a working version using a Mega but I want to reduce the footprint to a Nano.

It will consume a lot of cycles preparing the data what will block the nano of doing other things...

Cheers.

Do you consider connecting the /WR line to an interrupt pin and in the interrupt code, read the data lines and set the /DTACK and then return from the interrupt code. Or, use the interrupt to just set a flag and then read and acknowledge the read at you leisure.
Paul

Ehm... I think you are reading the signals reversed, the nano is the one sending data to the device, not reading from it :smiley:

No, the picture of the logic is from the sending device. Look at the signal names. If the Arduino is sending, then the logic signals need to reference that device.
Paul

You have to do that anyway, because there are also other lines to set / reset at the correct time. The difference if you also split your data to 2 ports is marginal.
What kind of application is this that you have to count on single instruction cycles from the processor? If so, you should program in assembler, C++ is not the correct language if you really need that.

No, the picture of the logic is from the receiving device, the SAA1099, and it has the pin names of the device, you can check the datasheet from where that diagram was taken.

It needs to poll some fast signals so I need to free as much as I can the CPU to avoid loses. In any case, will the usb transceiver affect the transmission of data on the RX/TX pins? That's all what I want to know :slight_smile:

Because the Nano will be so busy doing other things? Why not choose something faster than atmega328? You can get MCU with 10x the speed for almost no extra money. For example something based on RP2040?

Thank you for the link to the data sheet. Now I see the data transfer is NOT just your normal parallel data transfer. It is writing directly to the device registers. The device is meant to be directly connected to an 8 bit processor and the timing is critical. Do you have your logic analyzer close bye? Good luck.
Paul

That's one option that I'm considering, not a pico but a bluepill, a cortex at 84Mhz should be more than enough for my needs, my concern is that I'm going to interface to 5v systems and all the newer microcontrollers are 3.3v. I know the inputs are 5v tolerant but I would prefer to stay on the 5v side instead of mixing voltages, that would add more complexity to the final device and I would like to keep it as simple as possible, if I can solve something in software instead of adding more hardware I would prefer it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.