Questions tagged [mplab]

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

Filter by
Sorted by
Tagged with
13
votes
2answers
3k views

Compiling code to run from external RAM

I am considering designs for a minimalist game system based on a PIC18F85J5. Part of my design is that games can be loaded from an SD card without reprogramming the chip or flashing the program memory....
11
votes
5answers
6k views

PIC32 vs dsPIC vs ARM vs AVR, does the architecture matter when we are programming in C-language anyways? [closed]

We are currently using 32-bit PIC32 Microcontroller. It is working fine for our needs, but we are also exploring other microcontollers that can suite us better + we have other projects for which we ...
9
votes
2answers
1k 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 ...
9
votes
1answer
404 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 ...
8
votes
3answers
711 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 ...
7
votes
6answers
14k 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 ...
7
votes
2answers
1k views

Large array in C18 causes device reset

I am using the PIC18F13K22 and Microchip's C18 compiler in MPLABX. The PIC kept resetting, when it was about to jump into the interrupt service routine (ISR). I was able to trace the problem down to ...
6
votes
1answer
5k 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 ...
6
votes
3answers
6k views

how to make the eclipse IDE to be compatible for PIC devices?

I am looking for a PIC development environment that is better than MPLab. Is it possible to to install and configure Eclipse to work with PIC microcontrollers?
5
votes
3answers
8k views

PIC measuring PWM pulse length

I'm just getting started with PIC processors, driven mainly by a shortage of the simpler PICAXE from my local retailer. My question is, how do I read the length of a PWM pulse on a certain input pin (...
5
votes
2answers
6k views

Interfacing PIC18F4550 with I²C EEPROM (24AA1025)

I am working on a university project in which I need to interface a PIC18F4550 with an I²C EEPROM. I read many codes and saw many projects on this topic. And I wrote a sample code from MPLAB C18 (and ...
4
votes
2answers
13k 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 ...
4
votes
3answers
836 views

MPLAB 8: Hotkey for “Program Target Device”

I am looking for a hotkey that will have the same effect as "Program Target Device" from the toolbar or menu. ...
4
votes
1answer
6k 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 ...
4
votes
1answer
504 views

Can't read written data out of 24AA1025

I've got a PIC18F with MSSP that I'm interfacing with a 24AA1025. I'm using MPLAB 8 and the functions from C18 to make my life easier. The only problem is that I've (supposedly) written a byte to ...
4
votes
1answer
2k views

PIC18F4520 ADC Conversion in MC18

I have a dilemma. I need to read ADC values from PIC18F4520. My configuration, and code, is as follows: ...
4
votes
1answer
3k views

Extended Instruction Set mode for PIC18F with Hi-Tech Compiler

I'm writing some firmware for a PIC18F6622 microcontroller. I use MPLAB IDE 8.73 + HI-TECH C Compiler for PIC18 MCUs (PRO) 9.66. When I set the XINST (Extended Instruction Set enable bit), the IDE ...
3
votes
5answers
1k views

PIC16 Timer0 oddity

Using a PIC16F886, I am trying to generate interrupts every 100 milliseconds using TMR0 clocked from the internal oscillator, but I am getting some really strange behaviour. This is a battery powered ...
3
votes
2answers
2k views

How to create a pointer to code memory in microchip C30

i'm having a bit of a problem with this code. The code is intended to create an LCD MAP, with LCD routines to interface a 7 segment based LCD with the PIC24FJ128GA310 MCU with internal LCD driver. ...
3
votes
1answer
1k views

MPLAB 8.9 won't launch

I am running windows 7 professional 64-bit and up until this week was running MPLAB 8.92 IDE. Now I get a brief look at the splash screen and the IDE refuses to launch. I downloaded and ran the ...
3
votes
3answers
7k 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. ...
3
votes
3answers
311 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: ...
3
votes
1answer
301 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 the ...
3
votes
2answers
2k 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 ...
3
votes
1answer
1k 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 ...
3
votes
1answer
216 views

What a green P stands for in MPLAB IDE watch list?

Hello I'm debugging a C program in MPLAB IDE 8.92 and I have a green P at left o a variable in the watch list. Does somebody knows what it means?
3
votes
1answer
3k 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
1k 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 ...
3
votes
1answer
1k 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 ...
3
votes
1answer
1k views

PICC will not disable WDT on PIC16F876

IDE= MPLABx Toolchain = HiTech PICC Lite Target = PIC16f876 Burner = PICkit2 This is a new one for me. I have three leds connected to the chip, RC0, RC2 and RC3. RC2 pulses on at the beginning of ...
3
votes
1answer
1k views

Interfacing with SD card in Graphics Display Designer (MicroChip)

I have a PIC24 chip, a TFT screen, and a SD card reader/SD card. The software I'm using is MPLAB v8 and Graphics Display Designer addon. What I want to do is use Graphics Display Designer in MPLAB to ...
2
votes
2answers
1k 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 <...
2
votes
2answers
89 views

PIC microcontroller: actual behaviour differs from simulator

I was encountering some quite strange differences in the behaviours of my PIC16F628a microcontroller compared to the MPLAP built-in simulator. After a long search, it turned out to be different due ...
2
votes
2answers
2k 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
4answers
817 views

MPLAB linking error

I am working with Invensense IMU3000 and a PIC18 microcontroller. I am migrating a library, written in MSVS2005, to MPLAB, doing the proper modifications to run on it.. the code itself provides just ...
2
votes
1answer
4k 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 ...
2
votes
3answers
2k views

c18 coding advice / braces error / function declaration help

I have almost NO experience coding so please excuse the crude style and verbose commenting. I am trying to sample from 4 sensors (1 every 15 minutes). I thought it would be more efficient to have the ...
2
votes
2answers
643 views

Strange port behavior (PIC24F)

I was just trying to get port IO working with this code: ...
2
votes
1answer
4k 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. ...
2
votes
1answer
6k 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 ...
2
votes
1answer
64 views

Microchip device support - MPLAB Snap supported or unsupported devices list

Need to program and debug PIC and AVR MCU's so MPLAB Snap looks to be a very attractive option however: "it supports many of Microchip’s newer MCU offerings but not some legacy products" - ...
2
votes
1answer
81 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 ...
2
votes
1answer
554 views

Problem with MPLAB's toolsuite

I'm taking a module at University that involves MPLab. I'm trying to get it setup at home and so far its been a little tricky. I've got my files from University which I've attached below - if there ...
2
votes
1answer
635 views

Designing a linker script for use with MPLAB ICD 2

I need to alter the 18F452 linker script so that it allocates memory for resources used by the MPLAB ICD 2. I'm not sure how exactly to go about doing this, so could anyone please make any suggestions ...
1
vote
1answer
73 views

can't read push button value in dsPIC33

This is the first time I work with a PIC microcontroller. I am using the Clicker 2 for dsPIC33 board (dsPIC33EP512MU810), and so far I am trying to implement a basic programme for testing the board. ...
1
vote
2answers
1k 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
2answers
1k views

Array manipulation in MCC18

Suppose I have an array: #define ARRAY_SIZE 576 #pragma udata DATA float I_1[ARRAY_SIZE]; //My huge array #pragma udata And that I access my array like so: <...
1
vote
2answers
512 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?
1
vote
1answer
714 views

PIC16 only runs on debugger

I'm running a Hello World that toggles RB7: ...
1
vote
1answer
1k 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): ...