31 May '14, 2pm

Replace a rotary switch with a potentiometer #Engineering #Engineers

Replace a rotary switch with a potentiometer #Engineering #Engineers

From the example above, going from state #2 to state #1 requires that the potentiometer value go below the lower transition point of 74 by 4; thus the lower threshold value is 70. Conversely, going from state #1 to state #2 requires that the potentiometer value go above the upper transition point of 73 by 4; thus the upper threshold value is 77. The table used for the program code only requires the high and low threshold values, in this case only 14 bytes. The code example below was run on a Silicon Labs C8051F310 (8051 architecture) – however it is easily adaptable to your microcontroller of choice. A fast table look-up combined with 37 instructions results in a minimal execution time, the dominant part being the ADC conversion time of ~5µs. The subroutine POT2SW is called once the ADC value is read into the accumulator.

Full article: http://www.edn.com/design/systems-design/4429786/Replace-...

Tweets

Should I switch domains?

forums.seochat.com 01 Jun '14, 6pm

I just created a new local business on a new domain. Right now it is about two weeks old, and I have submitted it to all l...

USB 3.1 still cannot replace HDMI and Thunderbo...

digitimes.com 29 May '14, 12pm

Digitimes Research: USB 3.1 still cannot replace HDMI and Thunderbolt for Ultra HD transmissions Danny Kuo, DIGITIMES Rese...

Report: Switch from coal to #renewables would u...

nawindpower.com 29 May '14, 4pm

Within 20 years, Alberta has the potential to drastically reduce its reliance on fossil fuels for power generation and rep...