Author Topic: Multiplexing Help ?  (Read 1609 times)

0 Members and 1 Guest are viewing this topic.

Offline silo_xtremeTopic starter

  • Robot Overlord
  • ****
  • Posts: 172
  • Helpful? 0
  • I really love robots, they keep me awake at night.
Multiplexing Help ?
« on: September 10, 2007, 09:26:24 AM »
Hi Everyone :-)

I am a bit confused about Multiplexing, specifically having more than one sensor on a single pin.  For example, say I have 1 ADC pin available but 2 analog sensors.  How (in lamens terms) does this work when programming the microcontroller?  ???

Offline JesseWelling

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 707
  • Helpful? 0
  • Only You Can Build A Robot!
Re: Multiplexing Help ?
« Reply #1 on: September 10, 2007, 10:25:52 PM »
Typically a multiplexer is a piece of extra hardware.

The most common type of multiplexer used at my work place is an Analog multiplexer that has 8 Analog inputs 3 digital inputs and one analog output. Then its just a matter of using a binary alias for those 3 inputs to the 8 analog inputs. you want Analog 0? your 3 digital pins will be all lows. you want Analog 5? then pin 1 and pin 3 will be high and pin 2 as low.

There is also I2C and SPI Analog to Digital Multiplexers which are way handy IMHO because using a bus protocol means you can have (technically) 127 multiplexers (of how ever many inputs each... standard is around 8 ) with only using 2 I/O lines... way better than aliasing 3 different digital pins to each of the 127 (3 * 127 = 375 pins, I don't know any micro that has many more than 100 pins total, let alone usable GPIO)...

does that help?  :-\
« Last Edit: September 10, 2007, 10:27:56 PM by JesseWelling »

Offline silo_xtremeTopic starter

  • Robot Overlord
  • ****
  • Posts: 172
  • Helpful? 0
  • I really love robots, they keep me awake at night.
Re: Multiplexing Help ?
« Reply #2 on: September 12, 2007, 10:52:32 AM »
Well There are some chips that can handle more than one ADC conversion per pin, so, i am just trying to understand how the code would like when 2 analog sensors share the same pin on the MCU.

Any ideas? ???

 


Get Your Ad Here