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
3answers
256 views

How to read a specific port with ADC in Mplab Harmony?

I configured the ADC for 3 instances/3 analog inputs: ...
0
votes
1answer
62 views

Application and bootloader written in different tools can not be compatible?

I have a bootloader to PIC18F4550 that was written using Mikro C for PIC and I have two firmware applications, one was written using Mikro C for PIC and the other using MPLAB X with XC8 compiler. ...
-2
votes
1answer
37 views

How can a watchdog timer be cleared in Mplab Harmony?

Using Mplab Code Configurator (MCC) it's easy to clear watchdog timer, for example i created a project for a PIC 16F15324T and in my code i only have to call the ...
0
votes
2answers
48 views

How to read a port by a label in Mplab Harmony?

I'm more familiarized with MCC and with that framework is really easy to read a port we just need to give a custom name in ...
0
votes
1answer
19 views

How to do a counting of a timer configured in Mplab Harmony framework?

I'm new to harmony framework, and am trying to find how i can count timer iterations, so i'm doing a simple test. I configured the timer like this: Now i want to know if this is the correct way: <...
1
vote
1answer
26 views

How to use SYSTEMConfigPerformance on a MPLAB X project

I started a new project for a pic 32 (pic32mx470f512l) with MCC. And now i want to use the function SYSTEMConfigPerformance to optimize the performance of the pic. It happens that i'm not able to ...
0
votes
1answer
43 views

MPLABX with PIC18F4550 Debug and programming are not working

First I used MikroC for PIC to modify a firmware to a PIC18F4550. I was programming the device using MPLAB IPE and the PICKit3 programmer, everything was ok. Now, I need to change to MPLABX XC8 ...
11
votes
3answers
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
39 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
47 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
106 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
64 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
57 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
1answer
70 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
70 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
54 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
105 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
53 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
108 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
124 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
113 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
56 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
272 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
192 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
87 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
165 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
109 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
125 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
222 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
43 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
355 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
93 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
165 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
2answers
296 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
73 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
221 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
418 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
88 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
402 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
42 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
82 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
296 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
572 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
372 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
381 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
139 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
328 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
62 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
600 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 ...