Skip to main content

Questions tagged [mplabx]

MPLAB® X IDE is an IDE to develop applications for Microchip microcontrollers and digital signal controllers.

Filter by
Sorted by
Tagged with
0 votes
1 answer
44 views

The LED does not blink with PIC16F84A-201/P

Environment MPLAB X IDE v6.20 PIC16F84A-201/P PICKIT3 The adaptor board for PICKIT3 looks like this: https://www.amazon.com/Comimark-Programming-Adapter-Universal-Programmer/dp/B07V5SHN5V/ref=sr_1_9?...
dixhom's user avatar
  • 247
0 votes
2 answers
108 views

Does anyone know if there is a way to increase the power of the PIC16F pin using MPLABX?

I've been trying for hours to make a 4-digit display work with the TM1637 controller. On Arduino Nano it works well. When trying to port the Arduino library to the PIC, MPLAB-X XC8, the signal ...
user3394963's user avatar
0 votes
0 answers
84 views

PICkit 5 giving -109 error when programming PIC

I have a PICkit 5 which I think is correctly connected to a PIC16lf18425. Whenever try to program it I get error -109 I just have a 0.1 uf electrolytic capacitor between GND and VDD and a 10k ohm ...
doge guide's user avatar
0 votes
1 answer
879 views

How do I make my Microchip MPLAB X IDE project use the free version of the XC32 compiler?

I was previously compiling my C and C++ PIC32 mcu project in Microchip's MPLAB X IDE v6.15 with a paid Pro XC32 compiler license. My license has expired and no amount of buying a new one will fix it, ...
Gabriel Staples's user avatar
-3 votes
1 answer
370 views

Microchip XC32 compiler license erroneously expiring and unable to download: `Error has occured. Please try again.404~Error:-160:` [closed]

I have two development computers, one is Windows 11, and one is Linux Ubuntu 22.04, each with their own Microchip XC32 compiler license activated for use in the MPLAB X IDE v6.10. Both licenses are ...
Gabriel Staples's user avatar
1 vote
2 answers
156 views

Unable to resolve TRISBbits even with xc.h included

I am new to PIC programming, and I am trying to blink an LED using the PIC32CM MC00. I understand I must declare them as inputs or outputs, but the IDE I am using (MPLAB) keeps giving me an error when ...
Sean 's user avatar
  • 21
0 votes
1 answer
56 views

Why can't I drive pin RA4 low on PIC16F1823?

I am using PIC16F1823 MCU. Pin RA4 is a multipurpose pin but can be used as I/O. But I cannot find which settings are required to achieve this. I've tried to disable all unrequired peripherals ...
RickyBoy's user avatar
  • 169
0 votes
2 answers
407 views

PIC MCC I2C setup help

I have made use of the MSSP1 in MPLABx's MCC (code configurator). I have set it up as an I2C slave device and initialized the setup in the code provided. I am making use of a MCP2221 as a master ...
Bottle's user avatar
  • 23
0 votes
0 answers
246 views

PIC I2C slave setup

This is asking for a lot and I've posted on a previous forum my problem. Help would be greatly appreciated! Please refer to my current attempt below: The problem is that I don't detect the PIC ...
Bottle's user avatar
  • 23
3 votes
1 answer
715 views

PICKIT3 unavailable on MPLAB X IDE [closed]

What I want to achieve To write a program to a PIC microchip using PICKIT3 and MPLAB X IDE. Issue PICKIT3 not found on Device Manager No compilers found on MPLAB X IDE Environment Windows 10 ...
dixhom's user avatar
  • 247
3 votes
1 answer
154 views

How can I dynamically preload the EEPROM on a PIC microcontroller

I'm trying to set up code to preload the EEPROM of a PIC16F628A with the necessary data depending on the value of one #define, so the uC is ready to be popped into ...
fpp's user avatar
  • 183
0 votes
0 answers
47 views

Interrupt function (PIC16F MPLAB XC8)

I have two interrupt functions: one for generation of PWM signal for sinewave generation and the other is for (PWM) generating signal to battery charger. Whenever the supply is available the battery ...
Electrone's user avatar
2 votes
1 answer
85 views

PIC- Analog Digital Converter ( MPLAB - C )

I had a problem with some code where I had to convert analog to digital using my PIC24HJ128GP506A microcontroller. As you may know, the microcontroller uses Successive Approximation for conversion, ...
O_DERE's user avatar
  • 25
0 votes
1 answer
134 views

Why is nothing happening on my CLKOUT pin, despite the RTC working fine? [closed]

I apologize for the (probably) trivial question -- I'm just starting to get back into coding for MCUs after a long hiatus, so please be patient with me. I'll preface this by acknowledging that there ...
uWaveMan's user avatar
0 votes
0 answers
202 views

Build error on MPLAB X for PIC32CM Microchip

I am working on a project on a Microchip PIC32CM LS00, trying to run a code found on GitHub (https://github.com/Microchip-MPLAB-Harmony/csp_apps_pic32cm_le_ls, specifically the "TrustZone basic ...
Skelkinver's user avatar
0 votes
1 answer
119 views

dsPIC33CK Flash verify error when running project within MPLAB

I am trying to run simple routines on the dsPIC33CK Curiosity Nano board (home page here) with MPLAB X IDE v6.05. The code I generate builds successfully. I can also test it by directly dragging the ...
Jalo's user avatar
  • 113
1 vote
0 answers
1k views

PIC programming problem: [ Pgm ] at 0x0, expected 0x00003180, got 0x00003fff

Got a problem when trying to program a PIC12F1840 with PicKit 4 in MPLAB X IDE v6.05. When I program it I get the error: ...
magn4258's user avatar
0 votes
0 answers
80 views

PIC12F1822 I2C slave mode not working

I wrote a simple program in MPLabX IDE to test PIC12F1822 I2C slave mode. The program receives data from the master and sends it back in reverse order to the master. But the I2C bus does not work, and ...
Vahid's user avatar
  • 289
-1 votes
1 answer
81 views

Continued inoperation of PIC microcontroller [duplicate]

I have a PIC16F18076 microcontroller that I have been trying to get working and it hasn't been working at all, I cannot get any of the microcontrollers(I have 5) to show any sign of doing anything I ...
KidWithComputer's user avatar
1 vote
3 answers
292 views

Inconsistent operation of PIC microcontroller

I have a PIC16F18076 microcontroller that I have been trying to get working and it simply has been working very inconsistently or not a all. I'm programming it using MplabX IDE and a Pickit 4, the ...
KidWithComputer's user avatar
0 votes
1 answer
98 views

External interrupt code for PIC18LF47k40 not working

I wrote a external interrupt code for PIC18LF47k40 on MPLAB X IDE to toggle a LED when rising edge will be occurred. It is not working, but the same type code for PIC18F452 is working fine, only I ...
paple khan's user avatar
1 vote
1 answer
207 views

I2C not working with dsPIC33FJ128MC510

I am working on a project using the dsPIC33FJ128MC510, and I spent a week trying to solve a problem with the I2C bus. My problem is that the I2C bus (both SDA and SCL) is high all the time. No clock ...
Arthur Chassande's user avatar
0 votes
0 answers
134 views

--fixupoverflow=warn is being ignored by the MPLAB X Linker

I have tried several hours worth of variations and I am at my wit's end on this one. The MPLAB-XC8-PIC-Assembler-User-Guide-50002974 clearly states: The --fixupoverflow option customizes the action ...
Scott Savage's user avatar
1 vote
0 answers
83 views

dsPIC33 Timer sometimes jumps to high values

I have an issue using dsPIC33EV128GM106 32 bits Timer2 in a while() statement with a timeout. Basically what I am trying to do is communicate with a Power Supply through UART2. After sending an order ...
Arthur Chassande's user avatar
1 vote
1 answer
192 views

EUSART with PIC16F18346

I'm trying to set up serial communication between my PC and PIC16F18346 and I wrote this code: ...
leo6002's user avatar
  • 25
1 vote
1 answer
892 views

Declare a PIC pin in a variable [closed]

So basically, I want to store a pin of a PIC MCU inside of a variable. eg. int pin = LATB5 I also need to pass that pin to a function. If I do it like this, it ...
leo6002's user avatar
  • 25
2 votes
1 answer
1k views

How to use a variable delay in Microchip PIC microcontroller (MPLAB X), without using floating point arithmetic?

I'm using a PIC10F220. For some reason, this delay works perfectly fine: __delay_ms(10); But, when I try to run a delay with a variable, it gets an error. This ...
Mr Man's user avatar
  • 65
0 votes
3 answers
212 views

PIC16F1519 gets stuck when reading UART (RCIF never goes to 1)

So, I'm prototyping a project for my school, and I have to read serial data from a GPS module (uBlox NEO-6M) and then do some calculations about velocity and distance and turn on some leds. For the ...
fpp's user avatar
  • 183
1 vote
1 answer
671 views

Why my ACS712 current sensor accuracy so bad and scale non linear?

Below is my circuit diagram for ACS712 5A current sensor using peak detector circuit. Currently I facing 2 problems. i)zero cross dc voltage keep changing ii)The current scale is non linear and not ...
chuackt's user avatar
  • 609
0 votes
2 answers
418 views

How to get MPLAB X v6.00 to instantiate an 'S' type file

Since I have written dozens of PIC assembly language programs, I'm trying to write another one for the new pic-as assembler. When I indicate that I'm developing a new assembly program, using the pic-...
F Gruhl's user avatar
0 votes
0 answers
74 views

PIC16F15244 - Transfer error when code's changed

I am currently working on a PIC16F5244. I am currently trying to correct a problem that despite my multiple searches and tests is still present. When I mount a new PIC16 on my PCB, I can program it, ...
Benito's user avatar
  • 41
0 votes
0 answers
246 views

Using UART to USB on a PIC24f

Disclaimer: New to PICs, need things dumbed down to an extent until I start to figure things out. I'm trying to set up a UART connection on the PIC24fJ32GA002 to an FTDI which will then go to my ...
dka13's user avatar
  • 165
3 votes
2 answers
2k views

How debug Atmega2560 with PICkit 4? (Arduino Mega board)

I own a brand new PICkit 4, and I'm trying to get a debug session working. This is what I did: 1. Cut reset pin from the USB-UART programmer. There is a Reset EN pad that can be cut off to isolate the ...
Antonio Davila's user avatar
1 vote
1 answer
701 views

Correct design for Pickit 3 ICSP

I am a software engineer messing with some electronics I can't figure out why I can't program with my PicKit 3. I need some help understanding why I can't program my microcontroller. I am able to ...
MercilessMaverick's user avatar
1 vote
0 answers
94 views

MPLAB-X new Assembler

I am trying to assemble a old project from old MPASM on this new MPLAB-X Assembler only to end up with many errors and I have searched for usage or help and this seems to be lacking. Anyone know what ...
MicroCHIT's user avatar
1 vote
1 answer
160 views

How to set time for an RTC 5 Click in MPLAB X?

I am currently working as a design engineer intern. I am using an RTC 5 Click as part of my design to provide real solar time. It is nice that MPLAB X is able to generate sample code, but I have no ...
Tony's user avatar
  • 11
1 vote
2 answers
778 views

PIC18F4520 reading voltage from analog input

I'm trying to do a homework where is needed to read the voltage from an analog input and to print to a serial monitor a message when the voltage is lower than 2V or higher than 4V. I don't have any ...
Oprisor Valeriu Vladut's user avatar
1 vote
0 answers
128 views

Could a PIC18 running two functions simultaneously?

I am building a robotic car with stepper motors (for wheels) and infrared sensors(avoiding obstracles) using PIC18F4550 microcontroller. So, I have created a function to drive the stepper motor steps ...
Chris Aung's user avatar
1 vote
1 answer
528 views

External interrupt debugging with PIC16F877A

I am working with a PIC16F877A on a simulator on MPLABX 5.35 with XC8 compiler ver 2.32. I am trying to understand and work with the external interrupt, I am facing a few issues while debugging. ...
karthikkk's user avatar
1 vote
1 answer
205 views

PIC10F200 OPTION Register constants not present in header files

I'm brand new to any microcontroller programming and am playing around with the PIC10F200. I'm using MPLAB X 5.45 with XC8 2.32 pic-as compiler and I saw that most of the registers have constants ...
Nathaniel Murphy's user avatar
1 vote
1 answer
251 views

Unable to Generate PWM Signal Using CCP of PIC16F15325

I am using: Curiosity LPC dev kit, PIC16F15325, MPLABX v5.35 on Mac, XC8 compiler. I am able to blink each LED on the Curiosity. My goal is to generate a PWM signal on RC5 to drive an LED on the ...
Maximilian Cornell's user avatar
0 votes
3 answers
111 views

How to make sure my motor will not start spinning on power up in case the throttle (POT) was not at a 0 position?

I am trying to make sure my motor which is connected to my controller circuit would not just start spinning when you first apply power to it as if the Potentiometer is left high before the battery is ...
Daniel Bashy's user avatar
1 vote
1 answer
302 views

Pic18F67K40 unable to read 7940 RTCC over I2C

I'm trying to integrate the MCP7940N RTCC into my design. The MCU is the PIC18F67K40 and I'm using I2C to communicate. I created a new starter project to make sure that it works there before I add to ...
Sean's user avatar
  • 173
1 vote
1 answer
200 views

PIC Curiosity HPC with multiple UARTs

I've got a Curiously HPC with two mikroBUS UART modules fitted (1x FTDI232R and 1x RS485 5V), however MCC in MPLAB X isn't letting me map the EUSART2 of the target (PIC18F46K40) to module 2, even ...
Dan Twining's user avatar
2 votes
5 answers
5k views

How do I resolve the following error "Verify failed. [ Pgm ] at 0x0, expected 0x00002805, got 0x00002807" in MPLAB X IDE

I recently decided to get into learning how to develop embedded systems, using MPLAB X IDE and literature available on microcontrollers. The vast majority of which referenced the PIC16F84 and as such ...
aLoHa's user avatar
  • 597
0 votes
0 answers
9k views

Makefile error with my MPLAB X

I am working on a PIC24 project, and I went to the project folder and moved a file to another directory inside the project folder, however, I got a makefile error. I created a new project and copied ...
Embedded_Dude's user avatar
1 vote
1 answer
107 views

Pic18F14K22 doesn't want to work with bluetooth

I'm currently working on a project that allows you control LEDs with bluetooth. I'm using an HC-05 bluetooth module. I got some code from the DeepBlue.com site where they explained the use of ...
user avatar
2 votes
2 answers
595 views

PIC MCU: XC8 Not treating TMR0 as a 16 Bit Register

I recently finished a project programming a PIC18F2620. All was good, but I decided to explore the new stuff Microchip has to offer, and am now trying out the PIC18F47Q43. I'm getting a strange ...
ezra_vdj's user avatar
  • 620
2 votes
3 answers
10k views

How to build the simplest assembly file in MPLabX IDE 5.4

I just started learning assembly coding in MPLabX IDE 5.4. Without connecting any hardware, simulator or debugger, I simply want to build an object code file and generate a listing file from an ...
KMC's user avatar
  • 1,428
4 votes
0 answers
727 views

Mplab X IDE insists I'm trying to change protected boot memory even though all CodeGuard options are disabled

I'm new to this whole thing, so forgive me if I'm missing something obvious, but the only relevant thing I could find is over 9 years old, using a different programmer and different PIC. I'm using ...
user1999728's user avatar