I don't really understand what the job is. So far I've seen a lot of talk about reading 8 pins within a tight timing window, but unless I missed something, what is the actual job to be done?
Maybe you're reverse engineering how these 2 devices talk to each other?
Or maybe you're trying to create a replacement for one of them?
I agree that it can be a little "cloudy" !...
The purpose is to replace the very old VFD display of a device by a modern LCD display.
The old VFD display is almost impossible to find (used it costs >1.000€ ....) and the available space for the display in the device is very limited, so another old VFD would not fit in.
Therefore we have to create a board that will read the signal coming from the device through the 34 pins ribbon, and will send the characters to a new LCD display (connected to the board via I2C).
Teensy 4.x has 4 ports with 32 bits each. You can read an entire 32 bit port at once, which is a lot faster than reading it one bit at a time.
I understand, I have the following lines to read:
-D0 to D7 ---> 8 bits (or lines coming from the ribbon), the byte representing the character.
-/CS, /WR, A0 ---> 3 controls bits (or lines coming from the ribbon), representing the control and synchronization signals.
In my opinion, these 11 lines are "time reading critical" because they are involved in the reading LOOP.
In addition, there are 4 others lines:
-BUSY that seems to be an OUTPUT line to indicate to the device that it has to wait because the display is not ready to receive the next characters.
-/BL --> a control line to indicate that we have to blank the display.
-T0 and RXD that seem useless for our project.
Consequently, it seems to me that we have 11+2=13 lines that are "time-reading" critical, and /BL is an output.
All the other odd lines of the ribbon (2, 4, 6,..., 34)
are permanently connected to the Ground.
In addition we need SDA and SCL, to control the I2C bus.
Consequently it seems to me that we just need 13 lines in the reading loop: is it feasible to do the same with a Teensy 4.0 ?
I do have a Teensy 4.1 in stock, but it has a larger size than the 4.0, so it will be more difficult to place it into the device chassis --> please give me your viewpoint (is there a diagram showing the link between pin and GPIO, to check if a Teensy 4.0 can handle the lines on a unique GPIO ?).
Not all 32 possible bits of port 1 are available, but 16 to 23 definitely are. One way to accomplish this would have D0 to D7 connect to the pins that are 1.16 to 1.23.
True.
I can do this with a 4.1, tell me if a 4.0 can do the same (it is just a matter of physical size for me, the cost does not matter).
Then you can read the entire 32 bits at once, and if you want the 8 data bits, just right shift by 16 and mask off the upper 24 bits.
I am lost, don't know how to read the 8 lines simultaneously ? you will explain me that when we will review the program (I work on).
One other issue you might face is 5 volt signals. Teensy 4.x is not 5V tolerant. If this old system uses 5V signals, you'll need a buffer chip or other circuitry to reduce the signals to 3.3V level. For slower signals you can just use resistors. But for this sort of signal where you're dealing with timing in the ~100ns range, best to use a 3.3V buffer chip which has 5V tolerant input
I thought about this, and I planned to use 5V<->3V3 bidirectional converters that I already have in stock, like this one:
is it OK, or do you recommend something else ?
Thank yo very much for your help, meantime I go back to the program...