I was wanting to know if/how it is possible to utilitze the “Internal 128 kHz RC Oscillator” of the ATMega328 on my Duemilanove. I am trying to interface my Arduino with a Quadrature Decoder which must be connected to the clock of the microprocessor for synchronization.
Does anyone know how I could set up my Arduino to connect it’s internal clock (pin PB6 on the ATMega328 Datasheet).
I’m fairly inexperienced with the Arduino besides writing some code so I need help!! Thanks in advance!
Yes, a 1000 is a big difference but I still believe I do.
I am needing to read from 8 encoders for one robot and so I think I would run into problems if I use interrupts directly on the Arduino, for example if two or more encoders pulsed at nearly the same time, the first one would trigger the interrupt causing the next one to be missed. Does that sound correct?
Using the external IC, it can keep count while the Arduino polls them for the position data whenever I need it for my navigation.
OK, that sounds sensible.
I just had to ask - you be amazed at the number of people who overspecify because they equate "RPM" to "Hz".
I'm not sure why the encoder needs to be synced to the processor clock though. Need to have another read of the datasheet.
The sync is for the counter IC. The encoder will be connected to the counter IC, and the counter IC to the Arduino. The sync is necessary for the read commands to be properly send from the Arduino to the IC, and the IC also does some filtering which requires the pulse duration of the encoder to be at least 3 clock cycles.
After some searching I cannot find the part to buy that I posted earlier, only the datasheet. Here is a similar IC but made for 2-axis quadratures instead of only one, halving the number of them I would need.
The sync to the clock of the microprocessor is for timing the signals sent from the microprocessor to read from the output latch on the counter. The clock signal is used internally in the counter for helping to filter (the 3 clock cycles during one pulse of the encoder to reduce noise), and also to time the data transfer from the counter to the output latch which is done on the rising edge of each clock pulse.