Without trying this, basic calculation suggests this response looks too
slow - are you sure it is a 10K - this looks more like what I would expect
for a 100K resistor..
With an open collector circuit the pin is held low by the port capacitance
(plus any pcb etc capacitance) and charges towards high using the pullup
resistor.
The RTCC pin (RA4) has a stated capacitance of 3.2 pF (picofarad). Call
this 5pF.
T=RC which "should" be the time taken for the voltage to rise to 67% of
full value when the input capacitance
T=RC For R=10K, RC = 10,000 x 5 x 10-12 = 5 x 10-8 = 0.05uS
After 2 or 3 time constants the voltage will be "most of the way there" -
in this case the time high is only 1uS (BSF = 1 uS) and then 1uS later the
BCF takes it low. I don't know where in the PIC cycle the actual write
occurs (logic says it should be at the end for a read modify write) but it
*should* be the same in each instruction. So, you have about 20 time
constants for the capacitance to be charged which should be ample.
PCB capacitance will add to this but not by this much unless you have
something else connected - are you driving anything else with this port?
(An oscilloscope 10X probe will typically have 10pF capacitance which will
slow things down but still not as much as you see here.
It would have been quicker to go and try this than to write this reply. Oh
well.
----------
{Quote hidden}> From: Midgley John <
spam_OUTJohn.MidgleyTakeThisOuT
ENORFOLK-HA.ANGLOX.NHS.UK>
>
> To: .....PICLISTKILLspam
@spam@MITVMA.MIT.EDU
> Subject: Not Weird! 'F84:RA4
> Date: Tuesday, 28 July 1998 21:27
>
> Thanks, jointly and severally, to those who responded to my question
> regarding
> Pin 4 on the 'F84. Hey! You were right; it works! Now I know what 'Open
> Collector' means.
>
> Next question: pulses produced by RA4 pulled up through a 10k resistor
> show a
> distinct capacitor-charging-through-a-resistor curve. A BSF followed by
> a BCF
> with a 4Mhz crystal (2uS pulse?) only just reaches 5V before it's
> switched off.
> Is this normal? Can it be speeded up?
>
> Thanks, as always.
>
> John Midgley
>
> <Dr. Pinchpenny's Tip of the Day: Save the long 'legs' nipped of
> components
> after soldering: wrapped around a small drill bit to produce a loop, and
> soldered
> into a board, they make excellent 'scope test points.>