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.

PORTB Collective values ??

Status
Not open for further replies.

Ricardoco

New Member
im new to this so please if you can help treat me like a three year old please.. im using a 16F84 programming in basic, is there a way to read the value of PORTB collectively ie: if there is an input at PORTB.0 and an input at PORTB.1 but all others have no input the value would be 2 i how would i read all the ports and give the sum of them all, i realise this may be a very simple question but not to those who dont know, :D
 
If your programming in basic a simple line such as

value = portB

will read all portb inputs and place result into "value" which can then
be tested to see what bits are high or low
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top