Note: each of them have specific bits or signal, not just the CLK signal.
I can only generate a much lower frequency, I don't how go generate at such a high frequency or is it possible to do it on such a board.
Does anyone know it?
Thanks,
What kind of bandwidth and/or protocol are you after?
2MHz output is rather beyond the general scope of Arduinoy things.
Add some more detail to your request.
1,2,4,8 MHz are readily achievable using timers from the ATMega.
For example doing an SPI transfer with SPI library (SPI.h) will output SCK at 4 MHz while the transfer is ongoing.
CrossRoads:
1,2,4,8 MHz are readily achievable using timers from the ATMega.
For example doing an SPI transfer with SPI library (SPI.h) will output SCK at 4 MHz while the transfer is ongoing.
Oh really? I had no idea SPI was clocked that high. Good to know!
CrossRoads:
Add some more detail to your request.
I know the clock signal is okay to achieve.
But I need to generate a 14 bits signal which synchronize with the 2Mhz signal. That was the difficulty. Do you think it is possible?
Thanks
Is that pwm or just modulated?
Senso:
Is that pwm or just modulated?
I note that I could generate the CLK signal with the PWM.
But I guess it is impossible to generate common signal, say a 14 bits signal with the PWM, right? So, I need to modulate and generate the 14 bits signal. and I generate the CLK signal with the PWM
Are you trying to write your own protocol? Are you using a known protocol? 14 bits how often?
Didn't I already address 14 bit shiftout in another thread for you? What was the outcome of that?
OP sent me a PM, better describing the signal needed.
I believe it can be done thusly.
The top signal, that looks to me like 4 bytes of don't care data, then 3 bytes of do-care data that repeats.
The bottom signal, I think 2 flip flops and a couple of AND gates could be used to mask the first 2 clock pulses, and then allow the remaining 14 clock pulses and data to follow the input data.
Comments please?
That looks like bog standart SPI interface, just set it to 1 or 2Mhz and send data.
Top signal does yes, but not the bottom - only 14 bits going out.
How do you get the SPI to run at 1.6MHz vs 2 MHz?
Am guessing these App Notes might come in handy
This one discusses PWM, maybe what you need for the 1.6MHz.
This one has examples of port bit manipulation.