Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [mplabx]

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

1
vote
1answer
28 views

dsPIC system configuration bits in MPLAB X project vs the same config bits in the code

I can setup system configuration bits (fuses) in the MPLAB X project and/or in the code directly: I understand that the ones on the Configutaion Bits tab are ...
0
votes
1answer
46 views

GP4 on a PIC12F683 microcontroller not functioning correctly

I am attempting to make a project wherein I have some LED's on pins GP2 and GP4 of a Microchip PIC12F683 microcontroller flashing in a simple pattern. The problem is that I cannot write to GP4 ...
1
vote
0answers
76 views

FIR filter in dsPIC with DSP Library

I have to make a digital filter with a dsPIC30F, but I don't know much about it. I've read part of the documentation about the dsPIC30F and the DSP Library, and I found a page on Microchip website ...
1
vote
1answer
58 views

DSP Library not working in MPLAB X

I have to make a digital filter with a dsPIC30F4011 (I'm completely new to microcontrollers). I was reading the documentation about the DSP Library to figure out how to use it. I created a simple C ...
2
votes
2answers
73 views

Why are different names given to the same bit in MPLAB XC8?

I am using PIC18F45K22 and MPLAB XC8. Recently I stumbled upon something while reading ADCON0 register. A particular bit in the register, GO/DONE has many representations while I try bit addressing it ...
0
votes
1answer
50 views

My MPLAB X IDE debugger gives me an error whenever I try to debug my PIC24 Explorer 16/32 Development Board

I am doing a simple program for my PIC24FJ1024GB610 Microcontroller from Microchip, using the Explorer 16/32 Development Board, it has it's own PKOB (Pikit On Board circuitry). My IDE is: MPLAB X IDE ...
1
vote
1answer
104 views

Glitchless output on PIC10F

I'm learning how to program a PIC10F220. I'm using a PICkit 3 programmer and running physical experiments, as well as running the simulator in MPLABX. One thing I want to do is set the proper level ...
0
votes
0answers
36 views

External Interrupt never occurs pic16f887

I am trying to interface HC-SR04 sensor and LCD16x2 with my PIC16F887. I wrote the code and everything seems fine to me. Then i ran some test, first i tested the code in Proteus simulation and i got ...
0
votes
1answer
87 views

Develop Software for Microchip ARM Controller in MPLABX? [closed]

Is it possible to develop and debug software for a microchip ARM controller in MPLABX?
0
votes
0answers
158 views

PIC32 and MPLAB Harmony, USART driver

I am trying to output some ADC readings from a potentiometer over USART using the PIC32MX220F032B. I have the hardware all setup and working and i've set up a new project using MPLAB harmony and have ...
0
votes
0answers
30 views

Mplabx ICD3 PIC18f67k40 programming fpga failed

I'm trying to program my PIC18F67K40. The part is not listed in Mplab 8.92. Installed Mplab X, but my ICD3 will not work. I used the switcher program and it says it was successful. Mplab X sees my ...
1
vote
1answer
202 views

Low power sleep with WDT wakeup on PIC32MM

I'm trying to put a PIC32MM0256GPM028 into sleep mode and have it woken up by the Sleep Mode Watchdog Timer (say 1/4 second later- adjustable by SWDTPS anyway). Once it goes to sleep (current drops), ...
2
votes
2answers
61 views

MPLAB X XC32 - Peculiar build issue involving volatile variables

I am struggling with an issue that is already costing me 2 days of productive work. The code of main.c at the end of the question is a stripped-down version of the entire project, and contains the ...
0
votes
0answers
47 views

Configuration bits for dspic30f4011 is not working

I'm trying to program dspic30f4011 using pickit3. The development tool is Mplab X IDE v4.15 with xc16 v1.34 as c compiler. I need to set the clock source to FRC and oscillation mode to FRC_PLL16 to ...
1
vote
1answer
98 views

What is the difference between the different types of PIC compilers?

What is the difference between the different types of pic compilers such XC, Hi Tech etc?
0
votes
0answers
98 views

Is there a JTAG programmer/debugger for PIC32 on FT2232H chip?

I'm looking for an low cost programmer for my PIC32, which is supported in MPLAB X. On the ft2232h chip? is this?
0
votes
2answers
157 views

what make MPLABX connected with ICD3 to dsPIC reads different Device ID

Target Device ID (0x7bf0000) is an Invalid Device ID. Please check your connections to the Target Device. although all connections correct status of the dspic3F is working well Using MPLABX the above ...
1
vote
1answer
56 views

PIC16LF1786 change PWM pin on CCP3 with APFCON1

PIC16(L)F1786 has 3 CCP modules. I need a PWM signal on RB5 pin which belongs to CCP3 module, as well as RC6 pin. BUT, when I am setting up the PWM according to the datasheet (page 277), I am getting ...
0
votes
0answers
80 views

UART received information that wasn't sent

I am working on a project (developing code for DIY RC car) using PIC16F887 MCU. For now this is just a prototype, just testing UART functions in Proteus simulator and I encountered a problem. I have ...
0
votes
2answers
146 views

pic12F683 not behaving as expected

I have this weird problem. When one part of the code is enabled, my GP4 pin can be used as an output to control a relay. It is toggled to 0 and 1 based on a variable that is switched from 0 to 1. I ...
1
vote
2answers
261 views

Error Connecting PIC12F683 to MPLABX with PicKit3

Disclaimer: I am a complete noob when it comes to programming chips with a dedicated external programmer such as the PicKit3, as well as writing code for chips (especially not in C) so bear with me :) ...
1
vote
1answer
78 views

PIC12F629 variables overflowing with nested loops

I'm trying to do a simple binary counter using a PIC12F629 (Code below), driving LED's direct from GPIO pins 0,1,2. I'm sure it should be a very simple counter, but as written it just won't count ...
1
vote
1answer
249 views

MPLAB XC16 not generating .HEX file after successful build

I am new to MPLAB XC16 IDE. I am generating a simple blinking LED code to understand the basics of the microcontroller PIC24FJ32GA002. The main file is as follows: ...
1
vote
0answers
38 views

Torque Sensor Project

My group and I have been working on a Torque Sensor project using the PIC18F2431 chip, and we managed to write the code for each individual aspect on MPLAB for the Quadrature, ADC and LCD. Our concern ...
0
votes
1answer
70 views

ADC not referencing to 4x fixed voltage referenced - PIC16F18854

I am using a PIC16F18854 with a stable VDD of 5.0V. Tried multiple chips. Code has been primarily generated using MCC and verified with the datasheet. Applicable registers: ADREF: ADNREF = VSS, ...
1
vote
2answers
162 views

The stopwatch function in MPLABX gives a value that's way off in reality

I have a PIC16F688 running on 4MHz (intosc) and I need a delay for about 1 second. Using this for-loop: for (unsigned long n = 0; n < 219300; n++) {} yields ...
1
vote
2answers
936 views

MPLABX v4.01 (Linux) cannot find PICKit3

I just bought a PICKit3 and Linux finds it: $ lsusb ... Bus 003 Device 081: ID 04d8:900a Microchip Technology, Inc. PICkit3 But MPLABX doesn't recognize it (see ...
0
votes
0answers
384 views

XC8 compiler with linker to own libraries

I have tried to set linker to My own Folder with my libraries. In folder are only .c file and i set location in "Include directories": But when I compile my project it says : ...
1
vote
1answer
415 views

Calculating CRC for bootloader firmware

I am using PIC32MZ2048EFH064, MPLABx3.40, XC32 V1.42, Harmony V2.01b. And my PC app is using MS Visual C++ 2010 Express. Instead of using microchip's Pic32 downloader I want to build my own ...
-1
votes
1answer
307 views

PIC SPI Master and Slave at same time

I need to implement a SPI slave device, and SPI master, the idea is a SPI "middle man". I'm familiar with avr and mbed development, i lost the contact with PICs long time ago, so this will an ...
1
vote
1answer
312 views

I2C doesn't send data in PIC16F887

I'm relatively new using PIC microcontrollers and MPLAB XC8 compiler. I want to communicate two PIC16F887 using I2C. I did use this tutorial (https:// electrosome .com /i2c- pic-microcontroller-...
1
vote
1answer
111 views

Timer 1 can't increment on external T1OSI source for PIC16f627A

New to PIC programming Trying to Simulate a PIC16F627A TIMER 1 using MPLAB X IDE where RB7/T1OSI increments, and it toggles RB4 through TMR1 ISR. ...
0
votes
0answers
114 views

MPLAB X - undefined symbols in USB library

I am new with PIC, MPLAB X and USB interface. I see examples with USB HID and wanna write own. In main function I call USBDeviceInit function and get error: ...
2
votes
2answers
256 views

Configuration problem with pic16F877A

I am building a program for a PIC16F877A. It seems to be running correctly in the simulator MPLABX. I'm using about half the available program and data memory. During programming I receive the ...
1
vote
0answers
54 views

dsPIC33EP512GP502 -> ADPCM?

It seems that ADPCM is all but non-existant anymore. But I'd like to use this to compress six high-quality audio channels into a smaller bit-stream with little overhead. There seems to be a dsPIC G....
3
votes
2answers
467 views

Define Pins For Use By a Library xc8

I've got some code i'd like to use in multiple projects so i'd like to put it into a library The library will use no special features of the chip and whichever two pins it uses to do its job only ...
1
vote
0answers
212 views

Random ADC value in PIC

I am reading ADC values on my dsPIC33EP512MU810 when I slide my linearized slide POT. But,what I get is random values, I can read some ADC values but it is not getting updated in each position in the ...
0
votes
1answer
118 views

Why is MPLABX reporting the wrong amount of program memory used?

I've been using XC8 v1.34 for a while, and since v1.41 got released I upgraded to that version instead. Just for the sake of nothing-ness, I recompiled a mature project and saw that the value under "...
3
votes
1answer
834 views

SPI library for PIC18F27K40

I have a PIC18F27K40 and would like to use the hardware SPI module. Of course, it would not take too much code to write a SPI library myself, but if it exists already I prefer to not reinvent the ...
0
votes
0answers
151 views

Find frequency from Logic Analyzer from MP Lab X

In my code, I have a counter that increments by one with a breakpoint so that I can see the result. My problem is, how do I find the frequency of the pink line. My original thought was to find the ...
0
votes
0answers
214 views

PIC MPLAB-X problem: “Failed to read emulation memory”

Good day to all. I'm not yet very experienced with MPLAB-X and don't know how to deal with the problem that I am currently having. I'm developing with a project that uses the 16F1782.  I'm debugging ...
-2
votes
2answers
2k views

Errror:Undeclared _delay_ms while programming in MPLAB X IDE [closed]

I am new to microcontroller world. Can someone help me with this? I am trying to blink my LED on dsPIC33EP512MU810 with the MPLAB X IDE and X16 compiler. My code: ...
2
votes
2answers
1k views

Deciding which compiler for PIC18F26K22 in MPLAB X, C18 or XC8?

I'm trying to program a microprocessor for the first time, and having lots and lots of doubts. I have installed both the C18 and the XC8 compilers, plus a few others. When I create a new project and ...
0
votes
1answer
130 views

dsPic33E : Digital Output issue on pin<20> RA1

I am working on dsPic33EP512GM604 microcontroller. I have written a small program to light a tower lamp with 3 LEDs (RED, YELLOW, GREEN). Below is the circuit diagram : As shown in the circuit ...
3
votes
1answer
1k views

How can I tell Microchip's XC8 compiler that I am using a custom interrupt handler? It tries to place other code at address 4!

I'm developing firmware for the Microchip PIC16F882 microcontroller using their MPLAB X IDE and the free version of their XC8 C compiler. I'm running into a small problem when trying to add a ...
2
votes
1answer
428 views

Confusion about #pragma in XC8

I'm currently programming a pic16f18323. I'm using MPLAB X. And XC8 as the compiler. I just want to ask if pragma configurations can be shown as ('110' is the binary representation of 3 bit RSTOSC ...
0
votes
1answer
355 views

MPLAB X doesn't try to connect

I'm new to MPLAB X and I run into trouble right away. I want to read/write the program memory and EEPROM of a chip because I have a corrupted chip and a correct HEX file. I created a project, ...
2
votes
2answers
308 views

PIC18F1220 production build of C code not working

I have this simple code which I wrote to test that my programming circuitry works properly and compiles fine on xc8 pic c compiler: ...
0
votes
2answers
1k views

No clock signal on SCL pin of PIC16F1618

I have been trying to configure I2C on PIC16F1618 microcontroller. I am using MPLAB X IDE, along with xc8 compiler. The MSSP code is being generated through MPLAB code configurator. I have set the ...
1
vote
1answer
2k views

How to add header file for PIC24F08KL401 in MPLAB on MAC

How can I add header file for PIC24F08KL401 in MPLAB X IDE on MAC? I have found few tutorials how \ where to find these files ('PIC24F08KL401.h') for example on windows, but none on how to do it on ...