Questions tagged [xc8]
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.
126 questions
0 votes
2 answers
99 views
Analog port reading issue in PIC12F510
I am trying simple code on PIC12F510 blink LED using Pot read. LED PIN GP2 and Pot should be GP0. I am using MPLAB X IDE v 6.20 and compiler 2.36. Just need help read pot value. Based on count value ...
1 vote
1 answer
187 views
PIC16F1825 trouble with simple increment MPLAB XC8
I have set myself up with on a breadbord with a simple PI16F1825. I am using MPLAB x with XC8 V2.45 i have a led that turn on/off every second using the simple delay function. i would just like to ...
1 vote
2 answers
128 views
Not having a PORTAbits.RAx on ISR breaks my code
I'm working on a 433MHz RF reciver code for a PIC16F628A using a cheap 433MHz receiver. The catch here is that I'm only able to use RA4 for the RX, and because of that i had to use timer2 (because the ...
0 votes
1 answer
213 views
Interfacing HD44780 LCD with PIC16F690 in C (XC8 compiler)
I am trying to interface a PIC16F690 with a HD44780 LCD module, in 4-bit mode. My connections are as follows: ...
3 votes
0 answers
73 views
ESP8266 only responds to first AT command
While interfacing the ESP8266 module to PIC18F4550, I noticed that the ESP8266 only responds to the first AT command that is transmitted by the PIC MCU. It will not respond for the rest of the ...
6 votes
2 answers
950 views
PIC18F4550 CPU appear to be not running at external crystal frequency
I am trying to add a 20MHz external crystal oscillator to my PIC18F4550 microcontroller. The external crystal oscillator circuit connections to the PIC18F4450 is as below: The Datasheet suggest to ...
0 votes
2 answers
133 views
Why my timer1 not working?
My purpose is to measure phase angle between 2 square wave as below(yellow represent voltage ZCD and blue represent current ZCD passing through ACS712 hall effect current sensor) Below is my circuit ...
1 vote
1 answer
463 views
PIC18, XC8 compiler, enable multiple interupts
I am trying to make a module that needs to communicate over USART module, and also, do some tasks on a timer basis. (1ms / 30sec / 2 minutes) Now I need to enable USART interrupt and enable a 1ms ...