We have a machine that is imported from China that uses a number of LED seven segment displays each element having a shift register to 'decode' the display elements. The final display in the chain often flickers and flashes. Looking at the timings from the host I'm surprised things work at all, the clock, data and chip select times all vary by some quite large percentages.
I thought I could 'capture' the clock and data streams in a PIC and then re-transmit them slightly slower but with more stable timing. The problem is that the clock frequency is 3.25Mhz and no matter how I've tried I can't get close to capturing it in software. The closest I could get using interrupts was to count 41 clock cycles out of the 128, without even trying to sample the data, this was using a 18F15Q40 at 64Mhz. I thought of using the SPI peripheral to capture it for me, but I couldn't see how I could get 128Bits from the SPI buffer and not have it automatically sent back out.
My current thinking is to use a MC14562 128Bit shift register to grab and hold the data, then after the host has sent the data, clock it out under control of a PIC while filling the MC14526 with nothing, ready for it to be re-filled by the host at the next display update.
I keep thinking I should be able to do this without the need for the MC14562. Does anyone have any cleverer ideas than mine before I order a batch of MC14562 devices?
Last edit: c-conversion 6 hours ago
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We have a machine that is imported from China that uses a number of LED seven segment displays each element having a shift register to 'decode' the display elements. The final display in the chain often flickers and flashes. Looking at the timings from the host I'm surprised things work at all, the clock, data and chip select times all vary by some quite large percentages.
I thought I could 'capture' the clock and data streams in a PIC and then re-transmit them slightly slower but with more stable timing. The problem is that the clock frequency is 3.25Mhz and no matter how I've tried I can't get close to capturing it in software. The closest I could get using interrupts was to count 41 clock cycles out of the 128, without even trying to sample the data, this was using a 18F15Q40 at 64Mhz. I thought of using the SPI peripheral to capture it for me, but I couldn't see how I could get 128Bits from the SPI buffer and not have it automatically sent back out.
My current thinking is to use a MC14562 128Bit shift register to grab and hold the data, then after the host has sent the data, clock it out under control of a PIC while filling the MC14526 with nothing, ready for it to be re-filled by the host at the next display update.
I keep thinking I should be able to do this without the need for the MC14562. Does anyone have any cleverer ideas than mine before I order a batch of MC14562 devices?
Last edit: c-conversion 6 hours ago
For the clock signal use CLC. That should be able to generate that frequency.
If that works then would this help?