Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

I need to wire a dip switch to 16F88

Status
Not open for further replies.

RobertD

New Member
**broken link removed**

I need one V in for all the switches, but do I need individual pull downs for each switch or will a common ground do? I just need to have a 1 or 0 at the pins.
 
Well if you use PORTB for the DIP switch you can enable a built in weak pullup. Then just a common GND the other side of the DIP switch. Else use a 10K to 47K resistor on each input pin. I noticed you're in Brampton, if your ever in downtown Toronto drop by at Creatron Inc, give me some notice as I'm often there myself.
 
Last edited:
I'm using port B, so I can use a weak pull up, how do I do that?
Just ground the other side. Now that makes it quite simple, I like that. Let me guess, I write 1's on all port pins, and ground them on the other side... is that it?

Creatron, yes in fact, that's where I got my 88... and 873, and firefly and junebug, right by the U of T. I also bought a display for my next project. I was very happy to find that place, I was looking for pic programmers when I saw their sign, walked in, and found everything PIC in there. I go downtown every Saturday afternoon, I play bass in a bluegrass jam band from 2-7 pm, I can stop by on the way around noon, no problem. I'd like to meet you.
 
Last edited:
I'm using port B, so I can use a weak pull up, how do I do that?
Look at Page 18 of the datasheet. Also see Page 57. The OPTION_REG register, bit-7 RBPU enables the PortB pullups when cleared.

Each of the PORTB pins has a weak internal pull-up. A
single control bit can turn on all the pull-ups. This is
performed by clearing bit RBPU (OPTION_REG<7>).
The weak pull-up is automatically turned off when the
port pin is configured as an output. The pull-ups are
disabled on a Power-on Reset.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top