DIP switch, CD4021b and resistors

Dear all,

I'm working on a shield for the arduino and would like to put a DIP switch on the board. I found and built this tutorial; http://www.arduino.cc/en/Tutorial/ShiftIn

But I was wondering. Is it possible to have the dipswitch without all the resistors. Is the cd4021b not capable of doing his own pulling up or pulling down(like arduino). I googled a lot on the dip switch, and mostly they're connected without a resistor on every single pin.

Anyone has an idea, or tutorial how to do it?
Your help is, as always, much appreciated.

Rob.

The CD4021B is a standard 4000 series CMOS chip - no pullups or pulldowns (which is convenient because it means they can be used for micropower circuitry as quiescent current draws are in the sub-nanoamp range - a single 100k pullup could increase the power consumption by four or five orders of magnitude)

DIP switches only have two pins per switch so there's no way to add resistors - it used to be fairly common on circuit boards to see SIL resistor arrays next to the DIP switch or jumpers used to set the options...

You'll need some resistors...

Why adapt a device that was designed for another purpose (a shift register) to do the job of a chip that is designed to increase the input/output capabilities of your Arduino (an I/O expander). A single MCP23017, available for less than $2 US, will give you two more 8-bit I/O ports complete with internal pull-up resistors.

Don

Gentleman,

Thank you very much. Floresta, you've got a very good point there. It's just the wrong chip.

'Excuzes moi' for my stupidity on this one.