![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
|
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? | |
| |
| | #2 |
|
GPIO.3 is an input only pin. Mike. | |
| |
| | #3 |
|
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.. | |
| |
| | #4 |
|
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 | |
| |
| | #5 |
|
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. | |
| |
| | #6 |
|
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.
| |
| |
| | #7 | |
| Quote:
| ||
| |
| | #8 | |
| Quote:
| ||
| |
| | #9 |
|
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. | |
| |
|
| Tags |
| gpio3 |
| Thread Tools | |
| Display Modes | |
| |