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,
 
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.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…