PIC12F675 GP4 doesn't workPIC32 RTCC running too fast 1min = 10 secSPI1 doesn't workRTCC interupt doesn't workI'm trying to implement interrupt from RB pins. But it doesn't workAtmel printf formatting doesn't work, no formatting does workWhat is wrong with this dsPIC30F2020 blink example?PIC12F675 micro controller programmingProgramming PIC12F675: Not Working ProperlyHow to get analog input using PIC12F675PIC12F675 ADC not working properly
For a hashing function like MD5, how similar can two plaintext strings be and still generate the same hash?
Cubic programming and beyond?
What would be the ideal melee weapon made of "Phase Metal"?
Machine learning and operations research projects
Why won't this charge pump supply more than a couple of milliamps?
Why do people keep referring to Leia as Princess Leia, even after the destruction of Alderaan?
Why are Hobbits so fond of mushrooms?
What does "it kind of works out" mean?
<schwitz>, <zwinker> etc. Does German always use 2nd Person Singular Imperative verbs for emoticons? If so, why?
Why does the U.S. tolerate foreign influence from Saudi Arabia and Israel on its domestic policies while not tolerating that from China or Russia?
Does the Dispel Magic spell work on the Mirror Image spell?
Leave PhD after one year or finish it to the end?
What explains 9 speed cassettes price differences?
Do you know your 'KVZ's?
How can an advanced civilization forget how to manufacture its technology?
How to achieve this rough borders and stippled illustration look?
Print the last, middle and first character of your code
Single word for "refusing to move to next activity unless present one is completed."
Is Trump personally blocking people on Twitter?
The monorail explodes before I can get on it
Shortest distance around a pyramid?
How do I take a fraction to a negative power?
How might the United Kingdom become a republic?
Storming Area 51
PIC12F675 GP4 doesn't work
PIC32 RTCC running too fast 1min = 10 secSPI1 doesn't workRTCC interupt doesn't workI'm trying to implement interrupt from RB pins. But it doesn't workAtmel printf formatting doesn't work, no formatting does workWhat is wrong with this dsPIC30F2020 blink example?PIC12F675 micro controller programmingProgramming PIC12F675: Not Working ProperlyHow to get analog input using PIC12F675PIC12F675 ADC not working properly
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$begingroup$
I'm using a PIC12F675 for a project, and everything works fine except one thing. GP4 does not work as digital IO. I've looked at the configs and the code a lot, but couldn't find anything.
Config:
#pragma config FOSC = INTRCCLK
#pragma config WDTE = OFF
#pragma config PWRTE = OFF
#pragma config MCLRE = OFF
#pragma config BOREN = ON
#pragma config CP = OFF
#pragma config CPD = OFF
Code:
#include <xc.h>
#include <math.h>
#include "config.h"
#define _XTAL_FREQ 4000000
void delay(unsigned int freq)
for(int i = 0; i < (int)freq; i++)
__delay_ms(1);
void dClock(unsigned int freq)
GPIO1 = 1;
delay(freq);
GPIO1 = 0;
delay(freq);
void InitADC()
ANSEL = 0x11;
ADCON0 = 0b10000001;
CMCON = 0x7;
VRCON = 0;
unsigned int GetADCValue()
ADCON0 = 0b10000011;
while(GO_nDONE);
return (ADRESH << 8) + ADRESL;
void main(void)
TRISIO0 = 1; //analog input
TRISIO1 = 0; //output
TRISIO2 = 0; //indication
TRISIO3 = 1; //mode
TRISIO4 = 0; //halt
TRISIO5 = 1; //pulse_button
char pressed = 0;
GPIO1 = 0;
InitADC();
while(1)
if(GPIO4 == 0)
if(GPIO3 == 0)
GPIO2 = 1;
unsigned int freq = GetADCValue();
dClock(freq);
else
GPIO2 = 0;
if(GPIO5 == 1 && pressed == 0)
GPIO1 = 1;
__delay_ms(50);
GPIO1 = 0;
pressed = 1;
else if(GPIO5 == 0 && pressed == 1)
pressed = 0;
return;
pic c embedded programming
$endgroup$
add a comment |
$begingroup$
I'm using a PIC12F675 for a project, and everything works fine except one thing. GP4 does not work as digital IO. I've looked at the configs and the code a lot, but couldn't find anything.
Config:
#pragma config FOSC = INTRCCLK
#pragma config WDTE = OFF
#pragma config PWRTE = OFF
#pragma config MCLRE = OFF
#pragma config BOREN = ON
#pragma config CP = OFF
#pragma config CPD = OFF
Code:
#include <xc.h>
#include <math.h>
#include "config.h"
#define _XTAL_FREQ 4000000
void delay(unsigned int freq)
for(int i = 0; i < (int)freq; i++)
__delay_ms(1);
void dClock(unsigned int freq)
GPIO1 = 1;
delay(freq);
GPIO1 = 0;
delay(freq);
void InitADC()
ANSEL = 0x11;
ADCON0 = 0b10000001;
CMCON = 0x7;
VRCON = 0;
unsigned int GetADCValue()
ADCON0 = 0b10000011;
while(GO_nDONE);
return (ADRESH << 8) + ADRESL;
void main(void)
TRISIO0 = 1; //analog input
TRISIO1 = 0; //output
TRISIO2 = 0; //indication
TRISIO3 = 1; //mode
TRISIO4 = 0; //halt
TRISIO5 = 1; //pulse_button
char pressed = 0;
GPIO1 = 0;
InitADC();
while(1)
if(GPIO4 == 0)
if(GPIO3 == 0)
GPIO2 = 1;
unsigned int freq = GetADCValue();
dClock(freq);
else
GPIO2 = 0;
if(GPIO5 == 1 && pressed == 0)
GPIO1 = 1;
__delay_ms(50);
GPIO1 = 0;
pressed = 1;
else if(GPIO5 == 0 && pressed == 1)
pressed = 0;
return;
pic c embedded programming
$endgroup$
1
$begingroup$
Doesn't#pragma config FOSC = INTRCCLK
tell the PIC to output it's clock on GP4? Isn't there a differentFOSC
option you should be using?
$endgroup$
– brhans
8 hours ago
$begingroup$
@brhans Yes, I noticed that now! INTRCCLK makes the microcontroller use its internal clock, and connects it to GP4. However, INTRCIO does the same thing except it configs GP4 to be used as IO. Thank you for making me notice!
$endgroup$
– Ali Abo Shady
6 hours ago
add a comment |
$begingroup$
I'm using a PIC12F675 for a project, and everything works fine except one thing. GP4 does not work as digital IO. I've looked at the configs and the code a lot, but couldn't find anything.
Config:
#pragma config FOSC = INTRCCLK
#pragma config WDTE = OFF
#pragma config PWRTE = OFF
#pragma config MCLRE = OFF
#pragma config BOREN = ON
#pragma config CP = OFF
#pragma config CPD = OFF
Code:
#include <xc.h>
#include <math.h>
#include "config.h"
#define _XTAL_FREQ 4000000
void delay(unsigned int freq)
for(int i = 0; i < (int)freq; i++)
__delay_ms(1);
void dClock(unsigned int freq)
GPIO1 = 1;
delay(freq);
GPIO1 = 0;
delay(freq);
void InitADC()
ANSEL = 0x11;
ADCON0 = 0b10000001;
CMCON = 0x7;
VRCON = 0;
unsigned int GetADCValue()
ADCON0 = 0b10000011;
while(GO_nDONE);
return (ADRESH << 8) + ADRESL;
void main(void)
TRISIO0 = 1; //analog input
TRISIO1 = 0; //output
TRISIO2 = 0; //indication
TRISIO3 = 1; //mode
TRISIO4 = 0; //halt
TRISIO5 = 1; //pulse_button
char pressed = 0;
GPIO1 = 0;
InitADC();
while(1)
if(GPIO4 == 0)
if(GPIO3 == 0)
GPIO2 = 1;
unsigned int freq = GetADCValue();
dClock(freq);
else
GPIO2 = 0;
if(GPIO5 == 1 && pressed == 0)
GPIO1 = 1;
__delay_ms(50);
GPIO1 = 0;
pressed = 1;
else if(GPIO5 == 0 && pressed == 1)
pressed = 0;
return;
pic c embedded programming
$endgroup$
I'm using a PIC12F675 for a project, and everything works fine except one thing. GP4 does not work as digital IO. I've looked at the configs and the code a lot, but couldn't find anything.
Config:
#pragma config FOSC = INTRCCLK
#pragma config WDTE = OFF
#pragma config PWRTE = OFF
#pragma config MCLRE = OFF
#pragma config BOREN = ON
#pragma config CP = OFF
#pragma config CPD = OFF
Code:
#include <xc.h>
#include <math.h>
#include "config.h"
#define _XTAL_FREQ 4000000
void delay(unsigned int freq)
for(int i = 0; i < (int)freq; i++)
__delay_ms(1);
void dClock(unsigned int freq)
GPIO1 = 1;
delay(freq);
GPIO1 = 0;
delay(freq);
void InitADC()
ANSEL = 0x11;
ADCON0 = 0b10000001;
CMCON = 0x7;
VRCON = 0;
unsigned int GetADCValue()
ADCON0 = 0b10000011;
while(GO_nDONE);
return (ADRESH << 8) + ADRESL;
void main(void)
TRISIO0 = 1; //analog input
TRISIO1 = 0; //output
TRISIO2 = 0; //indication
TRISIO3 = 1; //mode
TRISIO4 = 0; //halt
TRISIO5 = 1; //pulse_button
char pressed = 0;
GPIO1 = 0;
InitADC();
while(1)
if(GPIO4 == 0)
if(GPIO3 == 0)
GPIO2 = 1;
unsigned int freq = GetADCValue();
dClock(freq);
else
GPIO2 = 0;
if(GPIO5 == 1 && pressed == 0)
GPIO1 = 1;
__delay_ms(50);
GPIO1 = 0;
pressed = 1;
else if(GPIO5 == 0 && pressed == 1)
pressed = 0;
return;
pic c embedded programming
pic c embedded programming
edited 8 hours ago
JYelton
16.8k28 gold badges94 silver badges196 bronze badges
16.8k28 gold badges94 silver badges196 bronze badges
asked 8 hours ago
Ali Abo ShadyAli Abo Shady
325 bronze badges
325 bronze badges
1
$begingroup$
Doesn't#pragma config FOSC = INTRCCLK
tell the PIC to output it's clock on GP4? Isn't there a differentFOSC
option you should be using?
$endgroup$
– brhans
8 hours ago
$begingroup$
@brhans Yes, I noticed that now! INTRCCLK makes the microcontroller use its internal clock, and connects it to GP4. However, INTRCIO does the same thing except it configs GP4 to be used as IO. Thank you for making me notice!
$endgroup$
– Ali Abo Shady
6 hours ago
add a comment |
1
$begingroup$
Doesn't#pragma config FOSC = INTRCCLK
tell the PIC to output it's clock on GP4? Isn't there a differentFOSC
option you should be using?
$endgroup$
– brhans
8 hours ago
$begingroup$
@brhans Yes, I noticed that now! INTRCCLK makes the microcontroller use its internal clock, and connects it to GP4. However, INTRCIO does the same thing except it configs GP4 to be used as IO. Thank you for making me notice!
$endgroup$
– Ali Abo Shady
6 hours ago
1
1
$begingroup$
Doesn't
#pragma config FOSC = INTRCCLK
tell the PIC to output it's clock on GP4? Isn't there a different FOSC
option you should be using?$endgroup$
– brhans
8 hours ago
$begingroup$
Doesn't
#pragma config FOSC = INTRCCLK
tell the PIC to output it's clock on GP4? Isn't there a different FOSC
option you should be using?$endgroup$
– brhans
8 hours ago
$begingroup$
@brhans Yes, I noticed that now! INTRCCLK makes the microcontroller use its internal clock, and connects it to GP4. However, INTRCIO does the same thing except it configs GP4 to be used as IO. Thank you for making me notice!
$endgroup$
– Ali Abo Shady
6 hours ago
$begingroup$
@brhans Yes, I noticed that now! INTRCCLK makes the microcontroller use its internal clock, and connects it to GP4. However, INTRCIO does the same thing except it configs GP4 to be used as IO. Thank you for making me notice!
$endgroup$
– Ali Abo Shady
6 hours ago
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
Just to add to Spehro's correct answer:
Since the microcontroller you are using has only 8 pins, they necessarily must share functionality to provide the various features that the device is capable of.
I just wanted to provide a sort of "roadmap" to help explain how the configuration works.
Check out the pin function diagram on the datasheet page 2:
You'll notice that physical pin 3 has at least five functions: GP4, AN3, !T1G, OSC2, and CLKOUT. Sometimes you have to specify in the configuration which function the pin should have. It's definitely not always clear. I find it helpful to search the datasheet for references to the register or pin function I'm having issues with.
Here's an excerpt from page 52 on which GP4 was found:
Microcontrollers very often can operate using an internal oscillator if they have one, or from an external oscillator such as a crystal. Even further, they can connect their internal oscillator to a pin for clocking other devices. The configuration register here has three bits (FOSC
) that determine how this gets set up.
If you look at the two modes listed with values 101
and 100
, they both specify to use the internal oscillator, but one of the options connects GP4 to the clock, where the other maintains its function as GPIO.
The defined constants INTRCCLK
and INTRCIO
Spehro mentioned should reflect these values.
$endgroup$
$begingroup$
Thank you so much, it worked! I found your explanation very helpful and I understand now how it works.
$endgroup$
– Ali Abo Shady
6 hours ago
add a comment |
$begingroup$
You have configured the PIC to output the internal clock signal on GP4 using
#pragma config FOSC = INTRCCLK
Replace INTRCCLK with INTRCIO.
$endgroup$
$begingroup$
Thank you so much, it worked!! I understand now how it works.
$endgroup$
– Ali Abo Shady
6 hours ago
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("schematics", function ()
StackExchange.schematics.init();
);
, "cicuitlab");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "135"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f447946%2fpic12f675-gp4-doesnt-work%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Just to add to Spehro's correct answer:
Since the microcontroller you are using has only 8 pins, they necessarily must share functionality to provide the various features that the device is capable of.
I just wanted to provide a sort of "roadmap" to help explain how the configuration works.
Check out the pin function diagram on the datasheet page 2:
You'll notice that physical pin 3 has at least five functions: GP4, AN3, !T1G, OSC2, and CLKOUT. Sometimes you have to specify in the configuration which function the pin should have. It's definitely not always clear. I find it helpful to search the datasheet for references to the register or pin function I'm having issues with.
Here's an excerpt from page 52 on which GP4 was found:
Microcontrollers very often can operate using an internal oscillator if they have one, or from an external oscillator such as a crystal. Even further, they can connect their internal oscillator to a pin for clocking other devices. The configuration register here has three bits (FOSC
) that determine how this gets set up.
If you look at the two modes listed with values 101
and 100
, they both specify to use the internal oscillator, but one of the options connects GP4 to the clock, where the other maintains its function as GPIO.
The defined constants INTRCCLK
and INTRCIO
Spehro mentioned should reflect these values.
$endgroup$
$begingroup$
Thank you so much, it worked! I found your explanation very helpful and I understand now how it works.
$endgroup$
– Ali Abo Shady
6 hours ago
add a comment |
$begingroup$
Just to add to Spehro's correct answer:
Since the microcontroller you are using has only 8 pins, they necessarily must share functionality to provide the various features that the device is capable of.
I just wanted to provide a sort of "roadmap" to help explain how the configuration works.
Check out the pin function diagram on the datasheet page 2:
You'll notice that physical pin 3 has at least five functions: GP4, AN3, !T1G, OSC2, and CLKOUT. Sometimes you have to specify in the configuration which function the pin should have. It's definitely not always clear. I find it helpful to search the datasheet for references to the register or pin function I'm having issues with.
Here's an excerpt from page 52 on which GP4 was found:
Microcontrollers very often can operate using an internal oscillator if they have one, or from an external oscillator such as a crystal. Even further, they can connect their internal oscillator to a pin for clocking other devices. The configuration register here has three bits (FOSC
) that determine how this gets set up.
If you look at the two modes listed with values 101
and 100
, they both specify to use the internal oscillator, but one of the options connects GP4 to the clock, where the other maintains its function as GPIO.
The defined constants INTRCCLK
and INTRCIO
Spehro mentioned should reflect these values.
$endgroup$
$begingroup$
Thank you so much, it worked! I found your explanation very helpful and I understand now how it works.
$endgroup$
– Ali Abo Shady
6 hours ago
add a comment |
$begingroup$
Just to add to Spehro's correct answer:
Since the microcontroller you are using has only 8 pins, they necessarily must share functionality to provide the various features that the device is capable of.
I just wanted to provide a sort of "roadmap" to help explain how the configuration works.
Check out the pin function diagram on the datasheet page 2:
You'll notice that physical pin 3 has at least five functions: GP4, AN3, !T1G, OSC2, and CLKOUT. Sometimes you have to specify in the configuration which function the pin should have. It's definitely not always clear. I find it helpful to search the datasheet for references to the register or pin function I'm having issues with.
Here's an excerpt from page 52 on which GP4 was found:
Microcontrollers very often can operate using an internal oscillator if they have one, or from an external oscillator such as a crystal. Even further, they can connect their internal oscillator to a pin for clocking other devices. The configuration register here has three bits (FOSC
) that determine how this gets set up.
If you look at the two modes listed with values 101
and 100
, they both specify to use the internal oscillator, but one of the options connects GP4 to the clock, where the other maintains its function as GPIO.
The defined constants INTRCCLK
and INTRCIO
Spehro mentioned should reflect these values.
$endgroup$
Just to add to Spehro's correct answer:
Since the microcontroller you are using has only 8 pins, they necessarily must share functionality to provide the various features that the device is capable of.
I just wanted to provide a sort of "roadmap" to help explain how the configuration works.
Check out the pin function diagram on the datasheet page 2:
You'll notice that physical pin 3 has at least five functions: GP4, AN3, !T1G, OSC2, and CLKOUT. Sometimes you have to specify in the configuration which function the pin should have. It's definitely not always clear. I find it helpful to search the datasheet for references to the register or pin function I'm having issues with.
Here's an excerpt from page 52 on which GP4 was found:
Microcontrollers very often can operate using an internal oscillator if they have one, or from an external oscillator such as a crystal. Even further, they can connect their internal oscillator to a pin for clocking other devices. The configuration register here has three bits (FOSC
) that determine how this gets set up.
If you look at the two modes listed with values 101
and 100
, they both specify to use the internal oscillator, but one of the options connects GP4 to the clock, where the other maintains its function as GPIO.
The defined constants INTRCCLK
and INTRCIO
Spehro mentioned should reflect these values.
answered 7 hours ago
JYeltonJYelton
16.8k28 gold badges94 silver badges196 bronze badges
16.8k28 gold badges94 silver badges196 bronze badges
$begingroup$
Thank you so much, it worked! I found your explanation very helpful and I understand now how it works.
$endgroup$
– Ali Abo Shady
6 hours ago
add a comment |
$begingroup$
Thank you so much, it worked! I found your explanation very helpful and I understand now how it works.
$endgroup$
– Ali Abo Shady
6 hours ago
$begingroup$
Thank you so much, it worked! I found your explanation very helpful and I understand now how it works.
$endgroup$
– Ali Abo Shady
6 hours ago
$begingroup$
Thank you so much, it worked! I found your explanation very helpful and I understand now how it works.
$endgroup$
– Ali Abo Shady
6 hours ago
add a comment |
$begingroup$
You have configured the PIC to output the internal clock signal on GP4 using
#pragma config FOSC = INTRCCLK
Replace INTRCCLK with INTRCIO.
$endgroup$
$begingroup$
Thank you so much, it worked!! I understand now how it works.
$endgroup$
– Ali Abo Shady
6 hours ago
add a comment |
$begingroup$
You have configured the PIC to output the internal clock signal on GP4 using
#pragma config FOSC = INTRCCLK
Replace INTRCCLK with INTRCIO.
$endgroup$
$begingroup$
Thank you so much, it worked!! I understand now how it works.
$endgroup$
– Ali Abo Shady
6 hours ago
add a comment |
$begingroup$
You have configured the PIC to output the internal clock signal on GP4 using
#pragma config FOSC = INTRCCLK
Replace INTRCCLK with INTRCIO.
$endgroup$
You have configured the PIC to output the internal clock signal on GP4 using
#pragma config FOSC = INTRCCLK
Replace INTRCCLK with INTRCIO.
answered 8 hours ago
Spehro PefhanySpehro Pefhany
218k5 gold badges171 silver badges448 bronze badges
218k5 gold badges171 silver badges448 bronze badges
$begingroup$
Thank you so much, it worked!! I understand now how it works.
$endgroup$
– Ali Abo Shady
6 hours ago
add a comment |
$begingroup$
Thank you so much, it worked!! I understand now how it works.
$endgroup$
– Ali Abo Shady
6 hours ago
$begingroup$
Thank you so much, it worked!! I understand now how it works.
$endgroup$
– Ali Abo Shady
6 hours ago
$begingroup$
Thank you so much, it worked!! I understand now how it works.
$endgroup$
– Ali Abo Shady
6 hours ago
add a comment |
Thanks for contributing an answer to Electrical Engineering Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f447946%2fpic12f675-gp4-doesnt-work%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
$begingroup$
Doesn't
#pragma config FOSC = INTRCCLK
tell the PIC to output it's clock on GP4? Isn't there a differentFOSC
option you should be using?$endgroup$
– brhans
8 hours ago
$begingroup$
@brhans Yes, I noticed that now! INTRCCLK makes the microcontroller use its internal clock, and connects it to GP4. However, INTRCIO does the same thing except it configs GP4 to be used as IO. Thank you for making me notice!
$endgroup$
– Ali Abo Shady
6 hours ago