'Not Weird! 'F84:RA4'
Thanks, jointly and severally, to those who responded to my question
Pin 4 on the 'F84. Hey! You were right; it works! Now I know what 'Open
Next question: pulses produced by RA4 pulled up through a 10k resistor
distinct capacitor-charging-through-a-resistor curve. A BSF followed by
with a 4Mhz crystal (2uS pulse?) only just reaches 5V before it's
Is this normal? Can it be speeded up?
Thanks, as always.
<Dr. Pinchpenny's Tip of the Day: Save the long 'legs' nipped of
after soldering: wrapped around a small drill bit to produce a loop, and
into a board, they make excellent 'scope test points.>
|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
The RTCC pin (RA4) has a stated capacitance of 3.2 pF (picofarad). Call
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
>Next question: pulses produced by RA4 pulled up through a 10k resistor
>distinct capacitor-charging-through-a-resistor curve. A BSF followed by
>with a 4Mhz crystal (2uS pulse?) only just reaches 5V before it's
>Is this normal? Can it be speeded up?
Yes: remove the test probe ;)
Else lower R.
Or use buffer with low input capacitance after the pullup to drive your
>Thanks, as always.
/ Morgan Olsson, MORGANS REGLERTEKNIK, SE-277 35 KIVIK, Sweden \
\ iname.com, ph: +46 (0)414 70741; fax +46 (0)414 70331 / mrt
Midgley John wrote:
> <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.>
Amongst other things. From where do you suppose I get *all* my short
More... (looser matching)
- Last day of these posts
- In 1998
, 1999 only
- New search...