Questions tagged [mplabx]

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

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

188 questions
11
votes
3 answers

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 the "@0x0002" is for in the Mplab XC8 v1.35 C compiler?
be-ee
  • 395
  • 3
  • 13
7
votes
4 answers

ICD3 + PIC + MPLAB: Target Device ID 0x0 does not match expected Device ID

We designed a board with a Microchip PIC24HJ256GP610A on it. We've successfully used an ICD3 to program and debug the PIC on the Explorer 16 development board. We think we've followed the design guidelines found in Debugger's User's…
Norbert
  • 213
  • 1
  • 3
  • 8
7
votes
2 answers

Which files to version control in mplabx nbproject directory?

I just discovered the files in the directory nbproject are required for MPLABX to realize a .X directory is a project. I don't want my teammates to continually struggle with having to update every single time I make a small change, like recompile. …
tarabyte
  • 3,112
  • 10
  • 43
  • 67
5
votes
2 answers

How to compute Timer1 period?

I'm trying to configure Timer1 of a pic24h to 1ms per timer tick but don't seem to be able to get the math to match my results. I have a 20MHz external oscillator (with a 1M resistor in parallel for stability) and think I have it enabled with the…
tarabyte
  • 3,112
  • 10
  • 43
  • 67
5
votes
1 answer

Documentation generator for embedded C projects

I'm looking for the equivalent of what Javadoc is to Java and from that, a way to standardize code documentation. Is doxygen more common in this context. Are there built-in, IDE-dependent options? I'm interesting in documenting a project in…
tarabyte
  • 3,112
  • 10
  • 43
  • 67
4
votes
1 answer

How do I detect / retrieve the silicon revision of a dsPIC?

Before starting on my project, I need to familiarize myself with any possible silicon errors in my dspic. I saw this for PIC micros, but it doesn't apply to the dsPIC33F that I'm using. I found a post somewhere (that I can no longer find for some…
Dave
  • 3,800
  • 24
  • 41
4
votes
0 answers

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 MPLAB X IDE v5.35, trying to program a dsPIC30F6015…
user1999728
  • 141
  • 2
4
votes
1 answer

First PIC Program using PIC16F877A and its configuration bits for Internal clock?

I have a PIC16F877A and I wrote a program in MPLAB X IDE to blink a LED. This is my program : #include #define _XTAL_FREQ 6000000 void main() { TRISB7 = 0; while(1) { RB7=1; __delay_ms(1000); RB7=0; …
Ebrahim Ghasemi
  • 294
  • 4
  • 16
4
votes
1 answer

Does MPLAB X have a call-graph analysis tool?

I'd like to start understanding how deep my microcontroller's stack goes (even if it's only an estimation). How can I do this using MPLAB X?
tarabyte
  • 3,112
  • 10
  • 43
  • 67
4
votes
3 answers

Maximum length of variable and function names?

I'm not sure whether this is a property of the compiler or something standard to C. I've heard of limits on the number of characters long a variable or function can be (e.g. 25characters). I'm not there yet, but just saw a decently long function…
tarabyte
  • 3,112
  • 10
  • 43
  • 67
3
votes
6 answers

MPLABX + PICKit 2 programmer could not be started

I'm working on getting a basic LED flashing program loaded onto a PIC12F615. I'm getting the following error when attempting to read or write to the device from within MPLABX: The programmer could not be started: Could not connect to tool …
jncraton
  • 143
  • 1
  • 1
  • 5
3
votes
5 answers

How to check PIC system clock speed MCU?

The entire project depends on this, so I just want to make sure I have it right. I'm using a 20MHz external resonator and putting that through the PLL in hopes of getting an F_SYS = 120MHz. Without having to get into the math on a timer, I thought…
tarabyte
  • 3,112
  • 10
  • 43
  • 67
3
votes
1 answer

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 a PCB and be used without any extra procedure. This is what I did so far: __eeprom…
fpp
  • 159
  • 9
3
votes
2 answers

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 USB-UART programmer and only use the reset pin…
3
votes
3 answers

Where can I find a list of PIC microcontrollers programmable and debuggable with a PICkit 2?

Where can I find a list of PIC microcontrollers that I can program and debug using a PICkit 2 in MPLAB X? I am a hobbyist who would like to breadboard prototype a new project based on a PIC microcontroller. I'm selecting a PIC based on my needs, and…
Arsmith
  • 33
  • 3
1
2 3
12 13