What's right way to read a potentiometer?
I'm building a few hardware howtos for my new project boards. The boards support a potentiometer, and I'm wondering what the 'best' or most common way is to read potentiometers.
I'm familiar with the Prop, and reading a potentiometer with the prop is a 1 pin job (I've attached a screenshot from the tutorial). Just an RC decay circuit.
But I'm not familiar with the SX. Looking at bean's Cylon Lights, he uses 2 pins (Schematic attached). Is it the case for the SX that reading a pot is a 2 pin job, or bean's circuit atypical?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Gadget Gangster - Share your Electronic Projects - Sign up as a Designer and get a free 4-pack of Project Boards!
I'm familiar with the Prop, and reading a potentiometer with the prop is a 1 pin job (I've attached a screenshot from the tutorial). Just an RC decay circuit.
But I'm not familiar with the SX. Looking at bean's Cylon Lights, he uses 2 pins (Schematic attached). Is it the case for the SX that reading a pot is a 2 pin job, or bean's circuit atypical?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Gadget Gangster - Share your Electronic Projects - Sign up as a Designer and get a free 4-pack of Project Boards!
Comments
You can do it either way.
The 2-pin method on the SX (AnalogIn command) returns a value depending on the VOLTAGE, the 1-pin method (RCTime command) returns a value depending on the RESISTANCE.
The 2-pin method always takes the same amount of time to get a reading. With the 1-pin method the execution time is dependant on the resistance being measured (and can take quite a long time if the resistance is high).
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There is a fine line between arrogance and confidence. Make sure you don't cross it...
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Is there a 'most common' resonator (like how people usually use a 5Mhz xtal with the prop)? Seems like 50Mhz is the most frequent.
Related - is there a 'most common' Video DAC? I've seen a couple different Resistor ladders, I'm just wondering if there's a typical setup.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Gadget Gangster - Share your Electronic Projects - Sign up as a Designer and get a free 4-pack of Project Boards!
As for "Most common" resonator. I prefer 20MHz. It is plenty fast for almost anything you throw and it, and it doesn't use alot of current like 50MHz does.
50MHz also sometimes has startup issues depending on the resonator.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There is a fine line between arrogance and confidence. Make sure you don't cross it...
·
Robert