Searching \ for '16C84 RA4 Question.' 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=16C
Search entire site for: '16C84 RA4 Question.'.

Truncated match.
PICList Thread
'16C84 RA4 Question.'
1997\12\13@221954 by Dean

flavicon
face
Is there a trick to make the RA4 pin on a 16C84 an output.
I have the PIC connected to an 8 BIT ADC, if I read the ADC and
then send a HI to either RA0 throught to RA3, depending on
the value recieved from the ADC,

0       to      63      = HI on pin RA0 only.
64      to      128     = HI on pin RA1 only.
129     to      191     = HI on pin RA2 only.
192     to      255     = HI on pin RA3 only.


everything works fine, BUT when I try and use RA4 as well,

0       to      50      = HI on pin RA0 only.
51      to      100     = HI on pin RA1 only.
101     to      150     = HI on pin RA2 only.
151     to      200     = HI on pin RA3 only.
201     to      255     = HI on pin RA4 only.

everything works fine UNTIL the value from the ADC is in the
201 to 255 range and the RA4 pin changes from the LOW to an
open state, neither HI or LOW, but it seems to work right in
MPLAB simulator. If it matters I am using a 4Mh crystal and
only set the Power Up Timer fuse. I am sure the port is
initialised for output and MPLAB simulator also shows this.

Thanks

Dean.

(-;     Why are there flotation devices under plane seats
       instead of parachutes?

;-)

PS. I am fairly new to programming and this is only my second
PIC program.I actually wrote it in a language called SIL,
similar to Pascal/Basic. Thanks Lars Silen for this Free Software.
http://koti.kolumbus.fi/~larsil/pcomp.htm.

I also used a love my Logic probe from Peter Anderson:
http://www.access.digex.net/~pha/index.html
you get a PIC 12C508 or 509 that is hooked to an LED that is lit
brighty when probe is connected to HI, off when connected to LOW,
and dimly when not connected to either, and pulses when on a
pulsing line. It also has two clock output pins, a once a second
and a 10 a second clock output. I ran my 16C84 off of these and
could count the pulses being sent to my ADC.(could count 7 IO/CLK
pulses to ADC when I should have been sending 8, Doh!).

1997\12\14@043334 by Andrew Warren

face
flavicon
face
Dean <spam_OUTPICLISTTakeThisOuTspamMITVMA.MIT.EDU> wrote:

> Is there a trick to make the RA4 pin on a 16C84 an output.
> ....
> [When I write a 1 to PORTA.4,] the RA4 pin changes from the LOW to an
> open state, neither HI or LOW

Dean:

That's how the RA4 pin works; it's an open-collector output, so if
you want it to go high, you need to put a pullup resistor (10K works
fine) on it.

-Andy

=== Andrew Warren - .....fastfwdKILLspamspam@spam@ix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499

1997\12\14@060944 by XYGAX

picon face
In a message dated 14/12/97  03:44:16, you write:

<< Is there a trick to make the RA4 pin on a 16C84 an output. >>
Big snip

Easy you need a pull up resistor as RA4 is open drain output and there is also
no diode to VCC internaly cause its used for programing the chip.

Cheers Steve.....

1997\12\14@133546 by Herbert Graf

picon face
-----Original Message-----
From: Dean <deanzspamKILLspamSINESURF.CO.NZ>
To: .....PICLISTKILLspamspam.....MITVMA.MIT.EDU <EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU>
Date: Saturday, December 13, 1997 22:22
Subject: 16C84 RA4 Question.


{Quote hidden}

   Yes there is, the RA4 pin when in output mode only is capable of pulling
a line low, it has no transistor (or whatever) for pulling the line high
(BTW great for I2C). To get a high, connect a 10k (value not critical) to
RA4 and VCC, then you should get the right logic out of it. TTYL

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