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.
2
votes
Accepted
Timer0 Interruption xc8
Personally I prefer never to use the "simplified" macros provided by Microchip. They hide just what is going on from you and you never learn what you're really doing with the hardware.
I notice you a …
7
votes
What is __bit in the XC8 C compiler?
bit and __bit are exactly the same, except for the level of compatibility:
If the xc8 flag --STRICT is used, the bit keyword becomes unavailable, but you can use the __bit keyword. … The MPLAB XC8 C compiler supports various special keywords (for example the
persistent type qualifier). …
1
vote
extern and the XC8 C compiler
extern is largely obsolete for functions in other CUs in many of the smaller simpler compilers. If a symbol isn't found locally it will be searched for in other CUs and libraries. You provide a func …
0
votes
XC8 - constant ROM allocation for PIC12F1501
There are multiple ways the CPU can access memory. Some instructions (which I believe are the default) can only access memory within a certain range of where the instruction executes from (they are b …
3
votes
12 bit ADC conversion simple code not working as expected
ADCON1= 0b00000000; //format setup see page 182 of datasheet
I think that's not right, for a start. That register controls more than just the format. Bits 0-2 control the voltage references (00 …
7
votes
PIC18 xc8 compiler : how to resolve warning (335) unknown pragma "code"
Have you read the XC8 user's guide? Section 5.9 deals with interrupts. …
3
votes
Accepted
Ohmmeter not working as expected
You are joining your HIGH and LOW byte values together wrong:
unsigned int adc = ((ADRESH<<2) | ADRESL);
You have a 10-bit result, 2 bits in ADRESH and 8 bits in ADRESL.
Say the two values are …