Searching \ for '[PIC]: PortA problems 16f877' 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: 'PortA problems 16f877'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: PortA problems 16f877'
2002\10\15@180852 by Fredrik Axtelius

picon face
Hi!

I use RA0 for analog in.
RA1,2,3 is digital out to a 3->8 mux.
RA4,5 also digital out.

Running the following C code:
PORTA = 0b.0011.1110;  // Set RA5,4,3,2,1=HIGH
TRISA = 0b.0000.0001;  // RA0=Input

ADCON1=0b.1100.1110;   // A:0 to analog, right justify AD results
ADCON0=0b.1000.0001;   // AD clock to OSC/32, select PORTA:0 for input to A/D, A/D=on

only sets  RA1,2,3,5 to high not RA4 (pin 6).

What have I done wrong?

tia
/Fredrik

--
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\10\15@182119 by Tony Nixon

flavicon
picon face
RA4 is an open collector output. It can only pull low.

Fredrik Axtelius wrote:
{Quote hidden}

--
Best regards

Tony

mICros
http://www.bubblesoftonline.com
spam_OUTsalesTakeThisOuTspambubblesoftonline.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\10\15@191752 by Russell McMahon

face
flavicon
face
> What have I done wrong?

Failed to read the archive :-)

RA4 is open drain - it needs a pullup resistor if you want to see it go high
/ source current.
It's this way so it can be pulled to high voltage (12 volts) during
programming.

Also useful for the brave for a 2 component step up inverter - inductor to
Vcc, diode to output supply (add a zener to output unless load GUARANTEES
that max allowed voltage will not be exceeded).
Never actually heard of anyone doing this but some must. Roman ??? :-)


       RM

--
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\10\15@235654 by Also-Antal Csaba

flavicon
face
on
>
> only sets  RA1,2,3,5 to high not RA4 (pin 6).
>
> What have I done wrong?

OC output.

udv
Csaba

--
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\10\16@040008 by Richard Stevens

flavicon
face
-----Original Message-----
From: Also-Antal Csaba [.....antalcsKILLspamspam@spam@MAIL.MATAV.HU]
Sent: Wednesday, October 16, 2002 4:55 AM
To: PICLISTspamKILLspamMITVMA.MIT.EDU
Subject: Re: [PIC]: PortA problems 16f877


on
>
> only sets  RA1,2,3,5 to high not RA4 (pin 6).
>
> What have I done wrong?

OC output.

udv
Csaba

Check the state of T0CS. If T0CS is set, Timer0 acts as a counter with RA4
as an input.
Richard.

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


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