Stack Exchange Network

Stack Exchange network consists of 175 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.

11
votes
2answers
1k views

Variable declaration with @ in C

I am reading some C code and came across this declaration in the program: unsigned char serv_ctr @0x0002; Can someone point me to documentation, or explain what ...
1
vote
1answer
33 views

Configuration in MPLABX compared to MikroC Pro

I need to modify a C code of an PIC18F4550. I want to use the MPLAB X IDE to do the job because I'm more familiar with it. However, the code that I need to modify is accompanied by an introduction ...
0
votes
0answers
39 views

Not able to view my code in MPLAB X IDE..!

I am trying to open my project (.C file) in MPLAB X ide (v5.15), but i cannot see my code, instead it opens up a rather weird window. It shows some history tab (of which i have no idea). I have ...
1
vote
1answer
65 views

PIC18F47K42 I2C Slave MCC code incrementing register by accident

Disclaimer: I have submitted a forum post on Microchip as well as the forum appears to have issues with me and to increase the pool of possible answers I thought of posting here with as much detail ...
2
votes
1answer
56 views

Using pickit 3 with DSPIC30F2010

I'm just learning to use the PIC microcontrollers and am totally confused having no knowledge prior. I am using a pickit 3 and the DSPIC30F2010. I have used to connect them via the circuit as shown ...
0
votes
1answer
54 views

PIC18F26K20 PWM Configuration

I am working with PIC18F26K20 and MPLABX IDE. I wrote some code for configuring and running the PWM. However, The output I get is at 50 percent duty Cycle no matter what duty cycle I provide the ...
2
votes
0answers
57 views

PIC32 having multiple PORTB's “high” at the same time

I am trying to set a couple of PORTBbits to "high" (1) at the same time for that I am using the following code: I am using thePIC32MX695F512H ...
0
votes
1answer
60 views

MPLAB X __delay_ms() hangs on PIC16F77A

I'm trying to use the __delay_ms() function to make an LED blink on the PIC16F77A. The reason I think it stalls on the __delay_ms() function is because whatever I set RB0 to before the delay ...
1
vote
1answer
52 views

RETLW 0 and RETURN command on PIC10F222 microcontroller

When I am building a code in MPLAB X IDE v5.15 I get an Warning "Substituting RETLW 0 for RETURN pseudo-op". As I have researched the PIC10 series don't have return command so it changes to RETLW 0. ...
1
vote
0answers
92 views

PIC10F222 Failed to program device

Every time I try to program my hex file I get an error: The following memory area(s) will be programmed: program memory: start address = 0x0, end address = 0x3b configuration memory program memory ...
0
votes
1answer
51 views

Weird behavior of pwm controlled servo motor?

Hello there I have experienced some really weird behavior from servo motor wheni try to control it with pwm. I am using dspic30f4013 and servo motor sg90 tower mini. I configured my pic with 10Mhz ...
0
votes
1answer
77 views

Serial port framing error

I'm new to pic and uart. Just trying out simple uart transmission. I'm using mplab IDE and coolterm for serial monitoring. I'm getting serial framing error. I also used PuTTY and it was printing junk ...
0
votes
1answer
68 views

Understanding PWM period and frequency calculation on dsPIC30F4013?

i am working on a project of my own, making a RC CAR. I want to my motor to be controlled with PWM. I understand the basics of basics for PWM but still I get confused with calculation. What is the ...
1
vote
1answer
99 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
54 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
210 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
161 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
83 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
134 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
106 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
1answer
111 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
199 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
38 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
328 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
78 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 ...
1
vote
2answers
139 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
177 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
245 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
70 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
2answers
200 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
375 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
86 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
366 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
41 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
80 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
272 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
1k 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 ...
1
vote
1answer
529 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
334 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
365 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
134 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. ...
2
votes
2answers
306 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
59 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....
2
votes
2answers
579 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
238 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
144 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 "...
2
votes
1answer
933 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
248 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
3k 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 ...