teensy 3.5 reading in 20 databits at a clock of 2 MHz

StefanL38

Active member
Hi everybody,

using the pcjr-forums seems to be complicated compared to arduino-forum.
I'm asking this for another user who encountered IP-blocking when trying to access the PCJR-forum himself

first of all a test if I can insert a picture-link as drag and drop seems not to work
no preview here so I will see the result only after posting it.
https://europe1.discourse-cdn.com/a...6920a59ad7f1fb17ba6c1076d955e_2_1035x211.jpeg

20MHz-Clock-20bits.png

a36577f0ffa6920a59ad7f1fb17ba6c1076d955e.jpeg


Is this possible with a teensy 3.5 to read in at this clock-speed?

Are any special configurations nescessary like setting a higher interrupt-priority?

Does the teensy 3.5 (Arm-4-Cortex) offer any kind of internal hardware that can read in the bits?

As there are ony 20 databits would it be possible to use an UART?
I guess the hardware-UARTs want to read in 8 bits per byte which would not match 20 bits
would it still be possible?
Can the receiving into the hardware-UART be interrupted after each 3 bytes?
8 bit byte 1
8 bit byte 2
8 bit last 4 bits ignore next 4 bits
drop 16 bits
start over receiving

Can the I2S-interface receive at 2 MHz?

If a teensy 3.5 is to slow. Would a teensy 4.0 clocked with 600 MHz be fast enough?
Do you happen to know any other kind of microcontroller that would be able to read in the 20 bits at 2 MHz clock?

best regards Stefan
 
Seems like this is SPI slave mode. Teensy's standard SPI library does not support slave mode, but if you look at the SPI page of the PJRC site, you'll see links to libraries for SPI slave mode, several of them by user @tonton. You may have to get into the details on how to do 20 bits, but you have the necessary signals data, clock, and sync (select). You also would have to make sure you can set things up enable receive on select high, and begin sampling on first falling edge of clock after sync rising edge. Others will be able to provide more specific help, and you can usually find useful forum threads just be searching in google, such as "Teensy 3.5 SPI slave"
 
Back
Top