Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 5th September 2006, 12:11 AM   #1
Default 12F675 GPIO.3 help.

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?
mramos1 is offline  
Old 5th September 2006, 01:12 AM   #2
Default

GPIO.3 is an input only pin.

Mike.
Pommie is offline  
Old 5th September 2006, 02:09 AM   #3
Default

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..
mramos1 is offline  
Old 5th September 2006, 02:16 AM   #4
Default

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
Mike, K8LH is offline  
Old 5th September 2006, 05:15 AM   #5
Default

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.
Pommie is offline  
Old 5th September 2006, 11:11 AM   #6
Default

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.
eng1 is offline  
Old 5th September 2006, 12:03 PM   #7
Default

Quote:
Originally Posted by Mike, K8LH
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.
mramos1 is offline  
Old 5th September 2006, 12:05 PM   #8
Default

Quote:
Originally Posted by eng1
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.
mramos1 is offline  
Old 5th September 2006, 12:22 PM   #9
Default

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.
Mike, K8LH is offline  
Reply

Tags
gpio3

Thread Tools
Display Modes




All times are GMT. The time now is 09:37 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker