hi all ive been away from flowcode and electronics for a while and decided to get back with it by programming a 12F 629 which would simply light a led at 1HZ but ive only managed to permanately light the led, ive looked at the datasheet and messed with the OSCCAL settings but on reflection I'm not sure I need to touch this any pointers to guide me would be appreciated
cheers in advanced bob
12F629 CONFIG
Moderator: Benj
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: 12F629 CONFIG
Can't say I'm familiar with this chip, but in the config you have "RC clock out" and looking at the datasheet it looks like clock out is on the same pin as you have chosen for the LED. So maybe there is a permanent clock out that is activating the LED.
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
Re: 12F629 CONFIG
hi leigh thanks for the reply, the output I used was because of the clock out thinking it would flash the led, I tried no clock out but the led didn't lite
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
Re: 12F629 CONFIG
right after playing around abit more I'm now using GP0 as the output and hay presto the led flashes, BUT as I understand it GP4 can be used as an output how do I manage this ive looked through the data sheet and cant find the answer
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: 12F629 CONFIG
Hello,
On some of the earlier PIC devices you need an external pull up resistor for pin A4/GP4. The pin can sink current to ground (output low) but cannot source current (output high). I think this is often called an open collector configuration. If you're driving an LED then try wiring in the active low configuration and that should work as expected.
On some of the earlier PIC devices you need an external pull up resistor for pin A4/GP4. The pin can sink current to ground (output low) but cannot source current (output high). I think this is often called an open collector configuration. If you're driving an LED then try wiring in the active low configuration and that should work as expected.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: 12F629 CONFIG
Hmm, Just checked the 629 datasheet and the pin GP4 seems fully featured. I'll have a dig and see if anything comes up.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
Re: 12F629 CONFIG
hi benj ive been looking on youtube and found that GP4 when using internal oscillator clockout provides a 1MHz pulse at this pin I believe which would probably mean why my LED on this port is always on which initially gave me the impression it wasn't flashing, if this is the case I guess this when configured as an output and with this oscillator config it would be used as a clock source to drive some other part of circuitry ???
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: 12F629 CONFIG
That's what I was trying to tell you in #2
Have you tried changing the config? ...
Have you tried changing the config? ...