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.

how to use Internal pullups?

Status
Not open for further replies.

masoud23

New Member
Hi
I am going throw a tutorial from microship with this code:
INTCON2bits.RBPU = 0; // enable PORTB internal pullups
WPUBbits.WPUB0 = 1; // enable pull up on RB0

If we enabling all portb pullups in line one and pulling them up to Vdd, why do we need line 2 of code? can any one explain this or is the code wrong?

Tanks in advance
 
It helps if you mention which chip you are using as they are not all the same. I'm assuming it's a 18 series chip and the first line is the global enable and the second is for each individual bit. Why don't you download the data sheet so you can easily check these things.

Mike.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top