Searching \ for ' [PIC] Reading all 8 bits together' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'Reading all 8 bits together'.

No exact or substring matches. trying for part
PICList Thread
'[PICLIST] [PIC] Reading all 8 bits together'
2002\04\18@021239 by Rajiv Thakur

flavicon
face
The Port B(0-7) of 16F84 is configured as  INPUT.

The question is :
1. Is there a single command that can read all the pins of Port B(0-7) at
one go  and transfer the hexadecimal value to the accumulator.

My thought process is that  as Movwf Port B, transfers the value of
accumulator to Port B (useable by external hardware) there should be single
command for reading the Input as well at one go rather than reading it
bitwise.

Thanks

Rajiv Thakur

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\04\18@022738 by Bob Ammerman

picon face
MOVF    PORTB,W        (note: affects Z flag in STATUS reg)

Bob Ammerman
RAm Systems

----- Original Message -----
From: "Rajiv Thakur" <spam_OUTrajiv_thakurTakeThisOuTspamVSNL.COM>
To: <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU>
Sent: Thursday, April 18, 2002 2:02 AM
Subject: Re: [PIC] Reading all 8 bits together


> The Port B(0-7) of 16F84 is configured as  INPUT.
>
> The question is :
> 1. Is there a single command that can read all the pins of Port B(0-7) at
> one go  and transfer the hexadecimal value to the accumulator.
>
> My thought process is that  as Movwf Port B, transfers the value of
> accumulator to Port B (useable by external hardware) there should be
single
{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\04\18@023425 by Tony Nixon

flavicon
picon face
Rajiv Thakur wrote:
>
> The Port B(0-7) of 16F84 is configured as  INPUT.
>
> The question is :
> 1. Is there a single command that can read all the pins of Port B(0-7) at
> one go  and transfer the hexadecimal value to the accumulator.
>
> My thought process is that  as Movwf Port B, transfers the value of
> accumulator to Port B (useable by external hardware) there should be single
> command for reading the Input as well at one go rather than reading it
> bitwise.
>
> Thanks
>
> Rajiv Thakur

movf PORTB,W   ; read PORTB into W

--
Best regards

Tony

mICros
http://www.bubblesoftonline.com
salesspamKILLspambubblesoftonline.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\04\18@145555 by Barry Gershenfeld

picon face
If you are new to all this you may not realize that
reading "all the bits" in is the same as "reading a byte",
and that the result really is a hexadecimal value.
A "hex value" is just a convenient way to describe
"all the bits" together as a group.

Takes some getting used to.

Barry



{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...