pin configurations for using 2 multiplexers

I am trying to set up 2 muxes with the ATMEGA8 (arduino bootloaded) to get 28 analog inputs into a computer to be used in Max/MSP.
Is the below right pin connections to hook up TWO CD74HC4067 Multiplexers to a ATMEGA8 using a FT232R USB-to-serial-converter?

S0 on the mux 1 connected to ATmega8 pin3 (PD0/RXD),
S1 on the mux 1 connected to ATmega8 pin4 (PD1/TXD),
S2 on the mux 1 connected to ATmega8 pin5 (PD2/INT0),
S3 on the mux 1 connected to ATmega8 pin6 (PD3/INT1),
COM1 on the mux 1 connected to ATmega8 pin28 (PC5/SCL)

S0 on the Mux 2 connected to ATmega8 pin11 (T1/PD5),
S1 on the mux 2 connected to ATmega8 pin12 (AIN0/PD6),
S2 on the mux 2 connected to ATmega8 pin13 (AIN1/PD7),
S3 on the mux 2 connected to ATmega8 pin14 (ICP1/PB0),
COM1 on the mux 2 connected to ATmega8 pin27 (ADC4/SDA)

And then,

Pin3 (PD0/RXD) of the ATmega8 also gets connected to the RX pin on a FS232 to send serial to the computer via USB,
Pin10 (XTAL2/PB7) AND Pin9 (XTAL1/PB6) gets connected to the external 16mhz crystal

Besides the power and grounds, these are the only connections, right? And these pin configurations will allow me also to upload my Aduino IDE sketches to the chip as well?

You'll need 2-way serial communications to upload sketches. You may also want to implement the auto-reset.

You can use one set of 4 data output pins for the select lines of both multiplexers since you will be reading them through two separate analog input pins.

Thanks for the tips- very helpful. I have searched everywhere about this reset and it seems I need to add a 0.01uF cap but I can't find out what pins it should cross. The only info I could find about this related to the readymade board but if I am making my own board where do I put this capacitor?

You can use a manual reset button instead. Hold down the reset button and click on the upload button of the sketch. Then release the reset button wen you see the "Binary sketch size" message in the IDE.

Oh sorry, I didnt explain. I am making my own board from scratch - I just have a ATmega328 http://www.sparkfun.com/products/9217

and am adding all the components. so before I start soldering i wanted to make sure I have all the pin connections right.... And it looks like having an automatic auto-reset would be good (I am on a mac and I saw in the info that this is an option for a mac).

You need a 0.1uF ceramic capacitor between the Reset pin of the ATmega328P and the DTR pin of the FTDI converter for the auto-reset.

Good luck! :)

Thanks!

My chip and the muxes came this morning, so I am all set!! Such excitement!!!!!!!!

oh, one more question;

I dont need to connect +3.3v to the 3.3 pin on the FT232R, do I? Just the TX, RX and ground pins, right? Thanks a bunch.

I dont need to connect +3.3v to the 3.3 pin on the FT232R, do I? Just the TX, RX and ground pins, right?

Correct (and the reset of course)

WRT reset, I'd put a jumper in series with the reset line if the board is going to talk to the USB as part of it's application. That way you can easily disable the auto reset feature.


Rob

please define pin priority.

Again, by putting a 0.1uF ceramic capacitor between the reset pin and the DTR, only when power up or new sketch is uploaded, it will reset. I have a minimal Arduino as in my blog with a FTDI breakout board and this capacitor for stepper motor control device with continuous serial command without any reset problem.

oh, whoops. do I connect +5 to AVCC (pin20), as well as VCC and AREF?

fabienLyrique:
oh, whoops. do I connect +5 to AVCC (pin20), as well as VCC and AREF?

Yes, you should connect +5V to AVCC and VCC. Regarding the AREF though, if you are using analog input channels to measure some analog signals, you need a reference voltage. Usually, simply connecting +5V along with AVCC and VCC to AREF will do the job. So go ahead to connect all those 3 pins to +5V. But if you want to use an external reference for some reason, then you should connect the AREF pin to the external source. In this case, don’t forget to connect GND pin to the ground (or -) of your external source as well.

One more thing about the AREF pin: if you are using only digital input/output pins and don’t need analog pins, you don’t have to connect AREF pin to any of those I mentioned above.

got it. thanks!