PDA

View Full Version : using gp3 12f629



grounded
- 23rd August 2005, 01:42
A little help please
gp3 on the 629 does not have prog.weak pullup.
and It can only be used as a input
so if I use it as a "low" input just add say a 10k resistor between pin, switching device and vss and If use it as a "high" input, Pin ,resistor, switching device and Vdd.
more of the story
I have alway had a 10 resistor from Vdd to gp3. "Why" because the Guy that help me get started alway had it that way on the drawings he sent (his help is no longer avable) and he never used it as a input but now as I expand my playing with the 629 I would like to use it.
GP3 is used for MCLR / Vpp If it matters I don't program in place I remove and program with pickit. Iam not sure about the master clear part
thanks

Felch
- 23rd August 2005, 17:05
Hi!
Yes, this kind of arrangement is possible. I have used GP3 as an input for several circuits, the R-dimmer for instance. But note: better connect a protecting diode from GP3 to +U (power). Without it the device might spuriously reset if your input voltage somehow goes little higher than +U .
Of course you loose reset input but if you configure the device with power-up timer ON, MCLR OFF, it works fine.

grounded
- 23rd August 2005, 20:26
thanks Felch
just to make sure something like a 4001 diode and anode to GP3
and thanks for the MCLR off and power up on. config. changes was going to be my next ? And I am sorry for not being real smart on this stuff trying to learn but what effect will not having the reset cause?
thanks again

Felch
- 23rd August 2005, 21:01
Hi!
Reset will cause starting your code from beginning. In most likely position, of course, Murphy's law really is phundamental ;).
. You can not simulate it, it's a hardware design error. In MBLAB sim. everything works fine. I made this mistake, then became suspicious about feeding signal to MCLR input. Changed pin and - voila - everything worked splendidly. I asked Microchip about the phenomena, they admitted that if signal amplitude on MCLR rises above recommended values, everything might happen. Anyway, after connecting a diode (1N4148 in my case) no more mysteries took place.
Btw, it was signal from MIC amplifier cathching whistle sounds.
Power-up timer makes no harm. Without it i'd use software timed wait loop before doing anything serious. Helps a lot! Especially in case of cheap and noisy power supplies...
The timer delays all processor activities for some time after powering on. Just like having a cap connected to reset pin but...now you can use reset pin for other purposes. I think it is a useful feature.

grounded
- 23rd August 2005, 21:15
thanks again I will be using a reg. 5v from batterys And I would like to take GP3 low to trigger, my code is simple stuff using Pauses between diffrent output. and somtime sleep, refresh, and interup and a few Vars here and there
by triggering low ( using a 2222 transitor ) would the would I still need the diode or have to worry about reset
thank you for you time and help, I a enjoy doing this just hate to bother people with my ?'s