Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
The Microchip XC8 compiler is a C compiler that can target Microchip's PIC 10/12/16/18 range of 8-bit microcontrollers. A free version is available that offers less optimization than paid versions.
5
votes
Accepted
Inserting compile date/time into the code in XC8
From the XC8 C Compiler Users Guide, page 229:-
5.14.3 Predefined Macros
__DATE__ to indicate the current date eg. …
4
votes
Accepted
PIC12F683 or PIC16F688 assembly or C blinking LED example with XC8 compiler, MPASM or gputils
XC8 has built-in functions __delay_us() and __delay_ms() for creating long delays.
Here is your code modified to run the 12F683 at 8MHz with GP0 toggling at 1Hz. …
2
votes
XC8 - constant ROM allocation for PIC12F1501
However the XC8 compiler still insists on trying to align stringtext on page boundaries, and refuses to put it in page zero even when only a few bytes of initialization code are 'in the way'! …
1
vote
Accepted
Why is MPLABX reporting the wrong amount of program memory used?
Here's the debugging disassembly listing that XC8 V1.38 gave me for a minimal PIC10F322 program:-
9: #include <xc.h>
10:
11: void main(void) {
12: return … I tried compiling it with XC8 V1.41 and the results were identical.
Why do both versions show 1 word less than actual memory usage? I don't know, but it's not something I would worry about. …
1
vote
PIC12LF1552 I2C; uC won't exit Start Condition
You should not assume that the simulator mimics real hardware exactly, however in this case it may be failing for a similar reason. If SCL or SDA are low during start then a bus collision is assumed, …
1
vote
Accepted
Confusion about #pragma in XC8
#pragma is a directive that sends text information to the compiler, which then interprets it according to the rules of the particular pragma. This text is not C code and does not have to be compatible …
0
votes
Accepted
MPLABX + XC8 + Proteus 12F683 Configuration Word problem
XC8 has a .cfgdata file for each MCU, which tells it how to format the config bits. Open the file 12f683.cfgdata in folder <xc8 path>\dat\cfgdata. …