Searching \ for '[PIC]: Re: Do I need pull-up resistors on PortA' 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/ios.htm?key=port
Search entire site for: 'Re: Do I need pull-up resistors on PortA'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Re: Do I need pull-up resistors on PortA '
2002\01\29@161847 by James Paul

picon face
Tim,

Disregard my previous email.  I was thinking of RA4 which is open drain.
RA2 ids the VREF- pin when using AD converters.  This pin might power up
in analog mode.  Have you changed porta to digital I/O?  This may be the
problem.




{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\01\29@162100 by Tim Webb

flavicon
face
This is my configuration...  did I miss something for port A?


       bcf     STATUS, RP0     ; select bank 0

       clrf    PORTA           ; clear PORTA
       clrf    PORTB           ; clear PORTB
       clrf    PORTC           ; clear PORTC
       clrf    PORTD           ; clear PORTD
       clrf    PORTE           ; clear PORTE

       bsf     STATUS, RP0     ; select bank 1

       clrf    TRISA           ; set PORTA as output
       clrf    TRISB
       clrf    TRISC
       clrf    TRISD
       clrf    TRISE

       movlw   b'00000111'
       movwf   ADCON1          ; PORTA inputs = digital




{Original Message removed}

2002\01\29@163736 by James Paul

picon face
No, I don't believe you forgot anything.  This looks good to me.
Just make sure you go back to bank 0 before you write anything
to the port or otherwise you'll write to the TRIS register and
select some A/D combination, but I'm guessing that you are doing
that below what is shown here.   The only other possibility that
I can think of is that you have a bad part.   You might want to
try another '877' part.


                                       Regards,

                                         Jim



{Quote hidden}

> {Original Message removed}

2002\01\29@164958 by Dale Botkin

flavicon
face
On Tue, 29 Jan 2002, James Paul wrote:

>  No, I don't believe you forgot anything.  This looks good to me.
>  Just make sure you go back to bank 0 before you write anything
>  to the port or otherwise you'll write to the TRIS register and
>  select some A/D combination, but I'm guessing that you are doing
>  that below what is shown here.

You know, that would explain it.  If the PORTA data register is all zeros
from the CLRF and the TRIS register bit is toggled instead of the PORTA
data bit, you'd go from a LOW output to a float...  which a pullup
resistor would make look ike a HIGH output.  So on a 'scope it would look
like a square wave, but be 180 degrees out of phase with what he thinks
the code is doing.  I'll have to remember to use an asymmetrical pattern
if I ever try to troubleshoot something like this with a scope.

Dale

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\01\29@172444 by WEBB,TIM (A-Sonoma,ex1)

flavicon
face
That was it...

I need to go back to bank 0.

Problem resolved.

Add this one to the Pic's for Dummies book

Thanks,

Tim



{Original Message removed}

2002\01\29@222740 by jim

picon face
Tim,

Glad to help.  I wish you the best of luck in the rest of you code
development efforts.
And remember, this list is always here if you need any further assistance.


                                                                     Thanks
and Regards,


Jim
----- Original Message -----
From: WEBB,TIM (A-Sonoma,ex1) <spam_OUTtim_webbTakeThisOuTspamAGILENT.COM>
To: <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU>
Sent: Tuesday, January 29, 2002 3:22 PM
Subject: Re: [PIC]: Re: Do I need pull-up resistors on PortA of a 16F877


{Quote hidden}

> {Original Message removed}

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