Hi. I am searching for a solution to create camera trigger pulses (frame start/stop and synch triggers) from a quadrature scale signal. Due to the encoder signal is really fast (up tp 5MHz), I stopped my tests with encoder software functions in microcontrollers. My idea is to use a Single LS7366R Quadrature Encoder Buffer (40MHz) and a Arduino Uno which communicates by SPI interface. Before I order it, can you inform me if this would be possible. I am worried that the LS7366R is only a fast counter and the Arduino controller gets the valus by slow SPI communication. It would be great if I can define the number of counts (e.g. each 25th count) and the LS7366R creates an interrupt or any similar. I am also wondering if I can activate, deactivate and reset the counter by the micro controller. Can you help me to find the easiest solution to get this functions?
Surely the datasheet would answer many of these questions. Have you located one?
Regarding datasheet I should be able to do these things:
- Reset counter to zero
- Stop counting
- Start counting
The open question is if I can use the DFLAG or LFLAG for the trigger pulse generation (e.g. each 20th count = 1 LOW pulse on DFLAG); continuously each 20th, not just one time.
Bernhard_Steiner:
The open question is if I can use the DFLAG or LFLAG for the trigger pulse generation (e.g. each 20th count = 1 LOW pulse on DFLAG); continuously each 20th, not just one time.
Not an expert but I infer from the DS that as part of the interrupt handling you'd have to explicitly write a zero to the counter to make it start over. It would help if that were directly stated somewhere (maybe it is and I just can't see it). Some application notes would be nice. Alas...
For a repeating interrupt every n counts maybe a ring counter is what you're looking for. The chip count rises but this route would involve a lot less hand holding by the processor.
Another possibility is the processor's internal TC1 capture input.