Exact match. Not showing close matches.
PICList
Thread
'[PIC]: Writing to ports configured as inputs'
2004\10\31@161725
by
Grimm, Justin
Hi All
I have configured port A on a F877 to have a 4 bit address bus output on RA0 to RA3 and a single input on RA4. Is there any problem with writing a full byte to port A for the 4 bit address bus? I.e. Will this affect the input on RA4?
I have connected an Invector cs8900a ethernet controller to a pic and, having tried 3 different types of ethernet server code I have found on the internet and spending 20+ hours trying to faultfind it, I cannot get a response from the cs8900. I have tried everything and am wondering if the controller unit works at all.
Does anyone know a simple way to check if a cs8900a is functioning without writing to the packetpage memory? I tried to measure the crystal with my cro but it isn't fast enough. Should the LAN and LINK leds flash on startup?
Frustrated!!
Justin
____________________________________________
2004\10\31@163916
by
Jinx
> Hi All
Hi One
> I have configured port A on a F877 to have a 4 bit address bus output
> on RA0 to RA3 and a single input on RA4. Is there any problem with
> writing a full byte to port A for the 4 bit address bus? I.e. Will this
affect
> the input on RA4?
No. If you look at the description of PortA in the 877 manual (DS30292B,
section 3.0) and the block diagram of RA4 you'll see how it works. The
contents of the output latch and the TRIS bit are ANDed together. What is
in the output latch will not appear at the pin unless the TRIS bit = 0
____________________________________________
2004\10\31@164601
by
Jan-Erik Soderholm
Grimm, Justin wrote :
> Hi All
> I have configured port A on a F877 to have a 4 bit address
> bus output on RA0 to RA3 and a single input on RA4. Is there
> any problem with writing a full byte to port A for the 4 bit
> address bus? I.e. Will this affect the input on RA4?
No.
Note that no matter if you use a MOVWF to write a full
8-bit value to the port, or a BCF/BSF to only change a single bit
of the port, the PIC will write (and *read* in the case of BCF/BSF)
all 8 bits anyway.
The only thing that will happen is that the output latch (the LATx
reg on a 18-series PIC) will be written with the same value
as currently available at the input pin. Doesn't matter if your
application do not dynamicaly toggles pins between in/out, in
that case the output latch might not have the same value as
written to it last time the pin was an output.
Jan-Erik.
____________________________________________
2004\10\31@170239
by
Byron A Jeff
On Mon, Nov 01, 2004 at 07:47:20AM +1030, Grimm, Justin wrote:
>
> Hi All
> I have configured port A on a F877 to have a 4 bit address bus output on
> RA0 to RA3 and a single input on RA4. Is there any problem with writing a
> full byte to port A for the 4 bit address bus? I.e. Will this affect the
> input on RA4?
Nope. It's designed so that input and output are independend.
BAJ
____________________________________________
2004\10\31@170950
by
olin_piclist
Grimm, Justin wrote:
> I have configured port A on a F877 to have a 4 bit address bus output
> on RA0 to RA3 and a single input on RA4. Is there any problem with
> writing a full byte to port A for the 4 bit address bus? I.e. Will
> this affect the input on RA4?
Writing to PORTA will not effect any bits defined as inputs. Keep in mind
that there is no way to write just the low 4 bits of PORTA anyway. Even
BSF/BCF instructions read the whole port, modify the particular bit, then
write the whole port back out.
*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com
____________________________________________
More... (looser matching)
- Last day of these posts
- In 2004
, 2005 only
- Today
- New search...