Re: Interfacing 100 pulses per rev control knobs
In my case, I have spare input ports on my Arduino so no need to emulate a pot - I'm using the pot connected to the Arduino's ADC anyway to give an internal 0-255 to represent desired temperature - so using the processor means a SMOP(*) only needed.
For the Hitachi processor, though, not so sure. Had a quick look at data sheet last night (my, that thing's old!) and it looks as if it has the potential for a couple of interrupt lines but not sure if they would trigger on level change in either direction or just one. I would try to do as much as possible in the CPU and avoid external circuitry, though.
(*) Simple Matter Of Programming
Re: Interfacing 100 pulses per rev control knobs
Quote:
Originally Posted by
Neale
I would try to do as much as possible in the CPU and avoid external circuitry, though.
Awww! But I like external circuitry :numbness:
Re: Interfacing 100 pulses per rev control knobs
Quote:
Originally Posted by
Neale
Not sure that it's quite that easy! If you look at the data patterns there is no simple link between either data line and direction. And if you only interrupt on one data line, you will miss half the transitions..
You configure the interrupt on either leading or trailing edge - so the interrupt occurs on a transition on one phase - the other phase is steady state at this point. The interrupt is essentially the "clock" to increment or decrement the counter. The state of the second phase, either 0 or 1 determines whether to increment or decrement.