mplab is the IDE used to compile, program and debug PIC chips.

learn more… | top users | synonyms

1
vote
1answer
33 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 ...
0
votes
1answer
33 views

Programming USB OTG PIC32 through USB in MPLAB

I have a PIC32 that has USB OTG. How would I program it through a USB cable in MPLAB? Does it work out of the box of does it need additional software.
0
votes
1answer
20 views

PIC24 Reset Issue

I am working with the PIC24FV16KM202. I am encountering resets while implementing Dispatch, which is a serial protocol that I'm working on that grew out of a project. The example that I'm working on ...
0
votes
1answer
36 views

pic32 debug char pointer declaration

I'm working with a PIC32MX564F128H in MPLABX 2.35 with pickit3. I'm trying to parse a message from UART. The character is received properly, but I'm stalling when I attempt to copy a character to a ...
0
votes
2answers
137 views

Setting up Internal Oscillator with PIC16F1829

I just started working with PIC microcontrollers and I am currently using MPLAB X IDE with a PIC KIT 3. I've been trying to get a simple LED blink code to run on a PIC16F1829 using the internal ...
0
votes
0answers
53 views

MCP3221 ADC always returns zero in Proteus

I am interfacing PIC18F2320 with MCP3221 ADC over I2C. When I try to read the converted value from ADC, only zeros are returned. I'm using MPLAB libraries. ADC is in A5 address mode. The AIN voltage ...
0
votes
2answers
175 views

Which MPLAB-X version supports Pickit 2?

I got myself a Microchip Pickit-2 Programmer from a local store. I installed MPLAB release v2.26 from Microchip's website. However, in this version of MPLAB, it is not detecting my Pickit-2. ...
0
votes
2answers
482 views

PIC32MX Harmony i2c Driver

I have a bit of a problem figuring out how harmony i2c driver works. Trying to establish connection between PIC32 and a barometric sensor MS5637 have been a bit of a nightmare for me. From sensor's ...
0
votes
1answer
133 views

Is it possible to program PIC18F device with .hex and .bin files

I have .bin and .hex files that I want to load into my PIC18F2480 device. I also have a .doc file explaining how to configure PIC18F2480 before programming. I've been told that it is possible to use ...
1
vote
1answer
415 views

Is there a way to Divide two 8 bit number in PIC 18fXXX assembly language not C?

I Can easily do the division in C of PIC micro controller. But is there a way to divide two number stored in two 8 bit registers. For example look at this code. I have to do it in PIC assembly for 8 ...
1
vote
1answer
116 views

Check content of EEPROM during run-time like Visual Studio

In Visual Studio, when we try to read memory location, we add breakpoints and run step by step to see what is getting read or written to a memory location. Is there a similar way, we can do it in ...
1
vote
1answer
69 views

PIC16 only runs on debugger

I'm running a Hello World that toggles RB7: ...
0
votes
0answers
164 views

Simulating Microchip TCP/IP Stack on Proteus

I have tried so hard to work with the Microchip TCP/IP, basically to do a simple simulation on proteus. The major issue is that for most people who have successfully done this, they don't really give ...
1
vote
1answer
146 views

Pic 18F452 / push button

I want to write program with " MPLAB IDE v8.50>>Pic18f452 " by 1) low level pulse & 2)Rising edge . but, how?(without interupt & micro C,maybe!) I wrote this program with falling edge. Thanks ...
0
votes
2answers
174 views

A/D conversion loop infinitly

I'm quit new one PIC microcontroller, and i'm stuck with a new problem. I was using the A/D converter of my PIC18F46j50 to catch 4 push buttons on 1 PIN (RB2), and it worked well. But since I ...
0
votes
3answers
125 views

Run a program on a PICKit 2 chip

I've got a PICKit 2 with a PIC16F690 chip plugged in, and installed MPLAB and made a sample program in C, which compiles fine. However, there's only the option to "Program to target device", "Read ...
0
votes
4answers
300 views

Use of free() in PIC Microcontroller Programming

In my Microcontroller PIC18f4550 code, I am using a function which returns an array, I know, C doesn't allow to return an array so I am just returning the address using pointers. Now after the address ...
1
vote
0answers
117 views

PIC M-Stack “add . to include” confusion

I am experimenting with the open source USB stack called M-Stack for the first time. I decided to start by building the HID mouse sample application, but I had to create my own project configuration ...
1
vote
2answers
1k views

XC8 - constant ROM allocation for PIC12F1501

I have troubles with const memory allocation with XC8. I try to do this: const unsigned char patterns[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; ...
4
votes
1answer
2k views

PIC18F4550 External Oscillator

I am currently trying to get the configuration bits set up to blink a LED with a 20MHz external crystal. It is operating correctly using the internal oscillator, but does nothing with the crystal, and ...
3
votes
1answer
968 views

XC8 Compiler array of struct initialization problem

I'm using MPLAB X IDE with XC8 compiler and I would like to create a menu system to a GLCD module, but I'm having trouble initializing my MainMenuItemsList[] array. ...
3
votes
2answers
563 views

PIC16F EEPROM write errors

I'm developing on a PIC16F1936 using the MPLAB X IDE with the XC8 complier. I've been given this project where I need to "upgrade" the software of a PCB such that it can interface with an external ...
1
vote
1answer
170 views

7 segment count jump from 00 to 05

I'm new at coding and need some answers, I doing some mini project and I got caught in some errors I'm not sure, I'm doing a ''photocopy'' machine and I have to code it in C under the Microchip MPLAB ...
1
vote
2answers
795 views

Porting MikroC code to MPLAB for PIC16F1508 adding extra noise to ADC

I decided to start using MPLAB with XC8 after I started reaching the 2k code size limit in MikroC. The problem is that since all the Mikroc libraries are proprietary and there are no libraries ...
1
vote
0answers
1k views

How can I stop MPLAB X from hanging between build and program?

I've been using MPLAB X and XC16 to build and program projects for a dsPIC 33EP128MC506 for about a year now. For the last two months, I've seen some new and unusual behavior on two separate machines. ...
1
vote
1answer
2k views

Rx UART interrupt triggering on PIC24F

I'm trying to receive data to a PIC24FJ256DA210 from another device using UART communication. I set up the UART as described below: ...
3
votes
1answer
6k views

Pre-Defining EEPROM Values in XC8 Compiler

I'm working with a PIC16F690, using Microchip's XC8 compiler. I want to embed EEPROM values into the hex file, so that the EEPROM gets programmed at the same time as the program memory. I've done ...
1
vote
1answer
1k views

Practical issue with PIC PWM

I have written the following code to generate PWM and to change the duty cycle when a button is pressed. In simulations it works fine. However when actually implemented the circuit, the PWM starts ...
1
vote
1answer
282 views

dsPIC33EP DMA configuration issue

I am trying to buffer 8192 words of data from an IO Port to RAM using DMA hardware of dsPIC33EP512GM710. I have configured the interrupt source INT0 as the source for the DMA hardware. I am using ...
0
votes
1answer
536 views

PIC16F628A 16x4 LCD problem while using MPLABX

I'm trying to connect a 16x4 LCD with a PIC16F628A, but I cannot get any response on the display, the display is blank. I put on a LED for indicating whether the time was right, and apparently ...
0
votes
2answers
3k views

PIC XC8 compiler array of structs?

I'm having trouble assigning variables to structs, particularly making an array of structs, with the XC8 compiler. Example code below: ...
0
votes
1answer
1k views

Setting external CLK for a PIC

Using pic16f690 with xc8, I can't figure out how to set external osc with quartz crystal. I have set : #define FOSC_XT Is ...
3
votes
3answers
249 views

PIC warning 364 related to initialization of const

There are no answers to this on the internet that I could find, and I've looked twice over the last 4 months. In MPLab v8.88 using the Hi-Tech ANSI C Compiler, I have this line of code: ...
1
vote
1answer
396 views

Chipkit Uno32 Debug with mplabx

I bought a good night chipKIT Uno32 to use for projects. I am using the language of c32 with the MPLABX IDE and a pickit 3 debugger. Everything went well but when I want to debug a project, it says ...
7
votes
2answers
478 views

L3G4200D random spikes

I've searched this forum a bit in regards to the L3G4200D gyroscope, and haven't seen this problem mentioned, but I have seen others talk about it on other forums. I am seeing a strange large value in ...
1
vote
1answer
5k views

MPLAB X - Read and Export Hex File

I'm a bit stumped as to what's going on here. I was previsouvly able to read (upload) the memory from the dspic33F and store it as a hex file. This is the only way I can test the boot loader I'm ...
3
votes
1answer
778 views

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 ...
1
vote
2answers
1k views

How to program PIC 12F629 internal oscilator in C?

I have some troubles understanding the datasheets when comes to use the internal oscilator in a PIC 12F629, using C (MPLAB X IDE + XC8 compiler). Also I don't have any PICKIT or anything, I use a DIY ...
2
votes
1answer
3k views

Unable to compile (build) code with MPLAB for PIC with CCS C compiler

I'm a newbie trying to lean PIC, i downloaded MPLAB and MPLAB X ide . Ihave done this around 100 times and looked over web enough before asking this question, but my code is not compiled and it is ...
1
vote
1answer
702 views

How to use FreeRTOS with MPLAB X that runs on a MAC OS

I'm programming my PIC microcontroller on a MAC OS. Can you use FreeRTOS with MPLAB X running on a MAC OS? I've noticed directions that include downloading a .exe file, but does that mean it's only ...
6
votes
5answers
9k views

Failed to get Device ID - PICkit 3 & PIC16F684-ICD & AC16205

Like it is already mentioned in the title I have question regarding this dev stack: MPLAB X IDE v1.80 PICkit 3 PIC16F684-ICD (datasheet) AC16205 There is image of how things are connected (I don't ...
2
votes
2answers
771 views

Char array at an int in C18

In Jal, it's possible to do something like this: var word the_var = 0x1234 var byte the_array[2] at the_var; Now you can easily access the bytes of the word ...
0
votes
1answer
815 views

How to use the PIC16F628A's PORTA,4-7 as inputs?

I'm working on a countdown timer and I want to use the MSN of PortA for my switches. I'm using MPLAB. I can't use C to program the PIC because the collage taught us to program in decimal, and they ...
3
votes
1answer
769 views

PIC18F4580 - PORTD not being read correctly

I am experiencing a strange problem with reading back the value of PORTD while it is configured as an output. I am writing to ...
6
votes
1answer
4k views

Interrupt Service Routine in C - function at specific address

I need to add an Interrupt Service Routine (ISR) to existing code in C for a PIC18F4620 and a PIC18F46K22. As you can see in section 9 (of both datasheets), these devices have multiple interrupt ...
9
votes
1answer
353 views

dsPIC chips running at a fraction of normal speed

I have two PCBs. One has a dsPIC30F6012a, the other a dsPIC30F6015. Both are being programmed from separate standalone HEX projects in MPLAB X, using a PICkit 3. Both firmwares have been applied to ...
1
vote
1answer
951 views

Programming/Debugging with ICD3 and PIC16F819-I/P

ICD3 passes internal test with MPLAB IDE using the Test Interface Module PIC16F819-I/P supports ICSP and In-Circuit debugging source. ICD3 pinout is as follows (source): ...
8
votes
2answers
690 views

Need some help understanding PIC memory map

Some background. I use MPLABx with a PicKit2 to program different types of pics. At the moment its the 16F887. I try to stick to the Hi-Tech PICC Lite tool chain but I'm growing increasingly unhappy ...
3
votes
1answer
195 views

PICKIT 3 resets PIC16 three times upon reprogramming

I am using the PICKIT 3 with MPLAB X with the default setings. When I press F6 to build and run my code, I notice that the PIC16 resets three times: twice with ...
2
votes
1answer
4k views

after programming PIC, can no longer run debug or reprogram

OK, I have written a few basic programs in MPLABX C18 for both 18f4550 and 18f46k20. Eventually got them to compile and test/debug correctly and run on the PIC. After I choose, "make and program ...