which multiplexer?

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i have 2 sets of four inputs each.
at anytime i must be able to take input form either of the sets to four pins of the adc port of my atmega.

what kind of multiplexer do i need??

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Greetings Vicky,

vicky3413 wrote:
i have 2 sets of four inputs each.
at anytime i must be able to take input form either of the sets to four pins of the adc port of my atmega.

Sounds like a 4 bit wide two-by-one is required.
Are the signals analog? (You are feeding the
ADC of the uC, right?). What model AVR, some
have analog MUX built-in.

You should look for an analog switch, or possibly
multiple switches with logic decoding of the
address pins.

The low-end parts are CMOS transmission gates,
such as CD4053, CD4066.

Higher performance analog switches offer
better specs. After deciding upon the
topology (number of inputs and outputs),
look at the voltage range of your signals
(I assume they're positive only and in the
range of Vss to Vdd for direct connection
to your AVR). Next, look at bandwidth
of the signal you are switching, and finally,
the required off-state isolation.

Comments Welcome!

--
Peter J. Stonard
www.stonard.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

four pins of the adc port of my atmega.

Most megas have 8 channels of ADC don't they?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

74HC4052

Tom Pappano
Tulsa, Oklahoma

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

74HC4052

I thought also but might need two chips to handle switching 2 sets of 4 inputs to 4 outputs (the 4052 only has 2 outs as used in this setup).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i am using the rest of the 4 adc pins on my mega16 for some purpose.

i am using analog signal from the photo interrupters as the input to the adc.
i ll read the 4052 data sheet and get back to you digitool

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I thought also but might need two chips to handle switching 2 sets of 4 inputs to 4 outputs (the 4052 only has 2 outs as used in this setup).

You are absolutely right, I was hasty in my reply. What I have done in this situation is use a 4051 to mux 8 into one and just use 3 port lines for the addressing. Since the internal a/d can only do one channel at a time anyway, one external muxing scheme doesn't seem to have much advantage over another.

Tom Pappano
Tulsa, Oklahoma

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

What I have done in this situation is use a 4051 to mux 8 into one and just use 3 port lines for the addressing.

Yes thinking the same thing, you still have to address the issue of the selecting which channel to use. What I don't see is why throw away the mega's 8 adc inputs because 4 of them are being used elsewhere to do what? LCD interface? Keyboard matrix? What becomes more important in the design? Being able to feed the 8 adc inputs directly (if that is the real way to go) or maybe

Quote:

i am using analog signal from the photo interrupters as the input to the adc.

the OP doesn't really need analog .

Pete

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Take a look at either the 74c4066 or better the CD4066 quad bilateral switch. There are four SPST logic controlled switches in each package Use two of the chips, and wire all the outputs together. The Mega then can select the chip to monitor.

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Using two 4066 requires 5 port lines to read 8 channels (4 a/d, 1 binary)

Using one 4051 requires 4 port lines to read 8 channels (1 a/d, 3 binary)

Using one 4052 requires 4 port lines to read 8 channels (2 a/d, 2 binary)

Using a mux will save a port line, some board real estate, a few cents, and may make more a/d inputs available.

edit: And this too:

Quote:
Quote:

i am using analog signal from the photo interrupters as the input to the adc.

the OP doesn't really need analog .

Pete

Tom Pappano
Tulsa, Oklahoma

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The OP was/is fishing for ideas. I presented one. Keep in mind the '4066 can handle "high" voltage, meaning +15vdc. The 4051, and 4052 are also fine examples, as well. The requirement was to switch 4 inputs at the same time, the '4066 can do this.

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user