Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

12F675 GPIO.3 help.

Status
Not open for further replies.

mramos1

Active Member
I wrote a program this morning (pulse 3 pins on a 12F675). I need pins GPIO 0-2 for the actual work and thought I would use GPIO.3 (MCLR) for an LED to blink (so I know it is working, right!). I am using an external osc at 32Khz on the other two pins.

GPIO 0-2 are working fine (and did from the first burn many hours ago). But I did not know this until now (as I stared at the LED on GPIO.3 LED and assumed it was my ICD2, etc). Amazing sometimes how we get lost on dumb stuff. Anyway.

I did not write to CMCON, just TRIS GPIO and 0-2 seem to work fine as digital output. BUT, I can not get the GPIO.3 to work as an output.

Any 12F675 experts out there?
 
Pommie.. That was not what I wanted to hear but thanks.. I thought it was GPIO.3 not GPI.3 but thanks for the INPUT..

And the 12F629 I will have the same problem (same datasheet). And I have an external osc on .4 and .5.. I am starting to hate 8 pin chips.

To many of the sample programs TRIS %000000 to make all bits outputs. Actually, the program was to light one LED, but the TRIS the whole register and wrote all ones and zeros to the GPIO to light the one bit.. Oh well.

OK, new plan.. GPIO.2 is now has an LED on it..

Microchip. Too many chips and I really hate MCLR and that one pin that is input only.

Thanks Pommie, venting a bit.. :)

Is there is Microchip that has 4 outputs (8 pin chip) after I use 2 for the OSC? That you can think of. Tring to get out of the F509 and old stuff..
 
You could maybe use a 'can' oscillator with 1 pin feed to the PIC (EC oscillator mode). That would free up the GP4 pin.

Can't use the INTOSC? Can the three pulsed outputs be multiplexed?

Mike
 
One interesting thing about the 509, is the fact that GPI(O).3 has a weak pullup which in conjunction with a 200K external resistor to GND can be used as an output by toggling the WPU on/off. This output cannot drive an LED but can drive a transistor. Unfortunately, all the newer chips have the WPU on GPI.3 omitted.

Mike.
 
As suggested you can use the internal oscillator. Some days ago I was evaluating its precision.. it's good. And you'll have more available outputs.
 
Mike said:
You could maybe use a 'can' oscillator with 1 pin feed to the PIC (EC oscillator mode). That would free up the GP4 pin.

Can't use the INTOSC? Can the three pulsed outputs be multiplexed?

Mike

Not a bad idea, I will look into EC mode. Not, I need all three pins. Another project I am converting to 32.768Khz crystal to crank up battery life.
 
eng1 said:
As suggested you can use the internal oscillator. Some days ago I was evaluating its precision.. it's good. And you'll have more available outputs.

I will see how low it will go. I thought it was 128Khz. 32K is better, but Another direction to check. That is the one I was looking in.
 
The 12F675 INTOSC is only 4.0-MHz.

The INTOSC on the 12F683 can be set to several different values between 32-KHz and 8-MHz.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top