Questions tagged [mplabx]
MPLAB® X IDE is an IDE to develop applications for Microchip microcontrollers and digital signal controllers.
189
questions
0
votes
1
answer
40
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 ...
0
votes
2
answers
80
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 ...
0
votes
0
answers
71
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 ...
2
votes
1
answer
92
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
...
3
votes
1
answer
94
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 ...
0
votes
0
answers
32
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 ...
2
votes
1
answer
57
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, ...
0
votes
1
answer
100
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 ...
0
votes
0
answers
106
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 ...
0
votes
1
answer
59
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 ...
1
vote
0
answers
536
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:
...
0
votes
0
answers
48
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 ...
-1
votes
1
answer
77
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 ...
1
vote
3
answers
193
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 ...
0
votes
1
answer
66
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 ...
1
vote
1
answer
91
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 ...
0
votes
0
answers
80
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 ...
1
vote
0
answers
73
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 ...
1
vote
1
answer
102
views
EUSART with PIC16F18346
I'm trying to set up serial communication between my PC and PIC16F18346 and I wrote this code:
...
1
vote
1
answer
381
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 ...
2
votes
1
answer
640
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 ...
0
votes
3
answers
160
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 ...
1
vote
1
answer
389
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 ...
0
votes
1
answer
303
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-...
0
votes
0
answers
67
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, ...
0
votes
0
answers
173
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 ...
3
votes
2
answers
1k
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 ...
1
vote
1
answer
511
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 ...
1
vote
0
answers
79
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 ...
1
vote
1
answer
129
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 ...
1
vote
2
answers
398
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 ...
1
vote
0
answers
114
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 ...
1
vote
1
answer
379
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.
...
1
vote
1
answer
135
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 ...
1
vote
1
answer
191
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 ...
0
votes
3
answers
92
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 ...
1
vote
1
answer
194
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 ...
1
vote
1
answer
168
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 ...
1
vote
3
answers
4k
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 ...
0
votes
0
answers
7k
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 ...
1
vote
1
answer
100
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 ...
2
votes
2
answers
457
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 ...
2
votes
3
answers
8k
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 ...
4
votes
0
answers
579
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 ...
0
votes
1
answer
591
views
PIC32MX270F256 Project Build Error: pic32m-gcc.exe: error: build/default/production/main.o: No such file or directory
I am trying to build a simple project for PIC32MX270F256. The code is just this:
...
0
votes
1
answer
201
views
XC8 compiler: Same variable names across different C source files causes issues
I am currently working with a PIC18F25k80 device using the XC8 compiler and MPLABX.
I spent the whole of yesterday trying to debug some code I ported from a PIC32 micro project. This code did not ...
0
votes
2
answers
2k
views
PIC - How to program them in assembly?
For years I programmed PIC controllers in assembler, but let it drop. Now I want to get back to where I was, and - so help me - I can't find out where to start.
Downloaded MPLAB-X-IDE and it says I ...
1
vote
1
answer
792
views
Are there any functional differences between xc16 and C30? [closed]
I've recently istalled MPLAB X (free version) and tried to build an existing project which uses C30. C30 seems to have been replaced with xc16 which does indeed build the project but the resulting ....
0
votes
2
answers
100
views
How to create an .scl file for MPLABX?
I am using MPLABX simulator to simulate some code. I want to create a signal for an external pin of the MCU using the stimulus. To do this I need to attach an .scl ...
0
votes
1
answer
154
views
Failed to display on LCD when interfacing with PIC18F4520 using ASM language
The LCD constantly shows nothing even though I built program sucessfully and found no error. I tried for many times in the past days but it doesn't work.
I tried appling this code on PIC16F877 by ...