Questions tagged [mplab]
mplab is the IDE used to compile, program and debug PIC chips.
131
questions
0
votes
1
answer
59
views
Microchip MLA file does not compile
I tried to compile an MLA file without success. The IDE keep telling me that "No such file or directory." Any idea how I can solve this problem?
How can I change the directory of these ...
0
votes
0
answers
44
views
PIC32 USB STARTER KIT III not appearing in Board Support Packages (BSP)
I have been trying to use Microchip MPLAB Harmony 3 to develop a USB application using the Microchip PIC32 USB starter KIT III.
When I create a new project I enter the following -
The PIC32 USB ...
-1
votes
1
answer
107
views
12 bit vs 10 bit ADC PIC18f [closed]
Convert 12 bits adc to 10 bit adc. We know that the resolution of the step size for a 12 bit is 1.22, different than the step size of 4.88 of the 10 bit. We need to take into account the extra 2 bits.
...
2
votes
1
answer
100
views
MPLAB harmony v3 'sys_time'
hi, i am trying to debugging a ethernet PHY chip using MPLAB harmony v3. (My controller board is SAM E54 curiosity ultra.)
However, I got a SYS_TIME pink circle in MHC like above picture.
How can i ...
1
vote
1
answer
107
views
MPLAB programing: Questions on USART initialization code
I have just started using MPLAB for microchip Atmega128. I had a few questions regarding the following code segment for USART initialization which I found in the product documentation.
Do I need to ...
2
votes
1
answer
802
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" - ...
0
votes
3
answers
172
views
How do I debug my PIC16F15323 code?
Microchip PIC16F15323 topic
I have source code that compiles fine under Microchip's mpasmx
Somewhere in there I may have a bug as unlikely as that may seem.
I would like to debug my code.
I have MPLAB ...
1
vote
1
answer
109
views
PIC Curiosity HPC with multiple UARTs
I've got a Curiously HPC with two mikroBUS UART modules fitted (1x FTDI232R and 1x RS485 5V), however MCC in MPLAB X isn't letting me map the EUSART2 of the target (PIC18F46K40) to module 2, even ...
0
votes
1
answer
111
views
RPi-PIC18 I2C: problem with first byte
I am having a bit of a problem with RPi-PIC18 I2C communication. The raspberry is the master, the problem is with the PIC18F25K80 slave device. Here is my code regarding the I2C parts:
...
0
votes
0
answers
76
views
I2C communication with LCD2041 using PIC32MM
I am trying to communicate with LCD2041 using pic32MM using I2C I wrote the following code on MPLAB code configurator but so far the status for the I2c communication seems to get stuck on pending . I ...
1
vote
1
answer
384
views
Are there any functional differences between xc16 and C30? [closed]
I've recently istalled MPLAB X (free version) and tried to build an existing project which uses C30. C30 seems to have been replaced with xc16 which does indeed build the project but the resulting ....
0
votes
0
answers
40
views
How to create an scl file for MPLABX?
I am using MPLABX simulator to simulate some code. I want to create some signal for an external pin of the MCU using the stimulus. To do this I need to attach an ...
0
votes
0
answers
211
views
Proteus program address is not within code memory
I am trying to simulate the following circuit with Proteus.
Both the crystal and PIC18F4550 frequency is 20MHz.
When I start the simulation, I get more than 100 messages:
[PIC18 LOAD] Program ...
0
votes
1
answer
568
views
PIC18F2550 [PIC18] PC=0x0000 MCLR is low. Processor is in reset
I am learning to program microcontrollers.
I'm trying to simulate the result in Proteus but when I run the simulation I get the error.
[PIC18] PC=0x0000 MCLR is low. Processor is in reset.
What is ...
0
votes
1
answer
329
views
Executable code and data must be defined in an appropriate section
I'm using MPLAB X IDE v4.20 to compile the following code:
...
0
votes
1
answer
69
views
How to connect a PIC32MK 100-pin Motor Control Plug-In Module (PIM) for programming
I recently got a PIC32MK 100-pin Motor Control Plug-In Module (PIM) I have been trying to prgram it but I have been running into the following error:
...
1
vote
1
answer
679
views
PIC18F67K40 - Failed to get device ID
I am using PIC18F67K40 and PICKIT3 with MPLAB 8.92V for programming. But I am getting error:
Failed to get device ID
I have attached schematic snap of MCLR circuitry. I am able to program other ...
0
votes
1
answer
116
views
What is Mikrobus purpose?
I'm new to embedded systems. I have MPLAB Xpress Evaluation Board.
I see that the board has MikroBUS connectors. Going through the internet, I couldn't understand what is the purpose of the MikroBUS? ...
0
votes
1
answer
143
views
Where to put main code in Mplab Harmony Framework?
When i'm doing code using MCC for example i will put my code the following way:
...
0
votes
1
answer
401
views
How to toggle a pin in Harmony framework for a pic?
I'm new to pic's and the harmony framework, and i'm trying to toggle a pin from high to low and vice versa in the interrupt callback of the Timer.
I configured my oscillator to operate at 32 MHz
or ...
1
vote
1
answer
61
views
Anyone knows what is a driver implementation in Harmony?
When configuring a Timer Driver implementation the option for Dynamic and Static appears.
Anyone knows, what does these 2 types mean?
0
votes
2
answers
1k
views
With harmony how to implement printf to uart?
I setup a project using harmony v2 for a pic32mx470f512l. In drivers -> USART i configured the UART (strange its called USART in harmony in datasheet says its a UART):
Now i want to use the function ...
0
votes
1
answer
434
views
MPLAB Harmony Configurator not working
After installing MPLAB Harmony Configurator from the available plugins in MPLAB (v5.05)
i tried to create a new project but it seems that harmony location is not valid?
I doesn't seem to have ...
0
votes
1
answer
79
views
PIC32MX470F512L not appearing on harmony setup?
I installed Harmony plugin in MPLAB X IDE because i can't put this pic working with MCC.
I was going to do a new project for this pic and when i was going to select it, it doesn't appear on the list! ...
0
votes
1
answer
192
views
PIC16F884 keeps resetting even though WDT should be off
I just bought a PIC16F884 and put a simple C program on it using MPLAB:
...
2
votes
1
answer
96
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
...
1
vote
0
answers
499
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
...
1
vote
1
answer
109
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. ...
0
votes
1
answer
387
views
Timer0 not interrupting on PIC18f4321
I'm trying to run some basic code from my textbook onto a PIC18F4321, using the latest XC8 compiler. It's supposed to turn on an LED after 10 seconds, but the LED never turns on. I've checked my ...
2
votes
2
answers
99
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 ...
0
votes
1
answer
81
views
Does MPLAB IDE v8.92 show Page Breaks anywhere in programmer
In the MPLAB assembly code window is their anyway to show or indicate where page breaks are I am using 50 PClath Calls.
If I add or remove code it changes the position of page breaks. I would like to ...
1
vote
2
answers
184
views
FTD232RL displays gibberish
Hello there i am using dsPIC30F4013 and i have been trying to interface uart with pic. I want to send some data to PC via uart and display it on terminal, but what i get is far from what i expect, to ...
1
vote
2
answers
758
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
2
answers
102
views
Learning MPLAB XC [closed]
I am trying to learn mplab xc8. I am familiar with C and C++. I have written some code using these languages. But while I am trying to learn mplab, I couldn't find any good source or book. For example ...
0
votes
1
answer
375
views
Interfacing microcontroller ,LCD and two push buttons
Problem :
I'm using PIC16F84A as microcontroller , wh1602a (LCD) [16x2] , and two push buttons.
I want to give the user two options say option 1 and option 2 on the display and the user presses one ...
0
votes
2
answers
208
views
will For loop in MikroC for dspic block the interrupt service routine?
I am using MikroC for dspic30f4011. I am using a Timer3 interrupt for ADC reading. In this Interrupt services routine, I am reading ADC values. In Void main, where I need some delay in the instruction ...
12
votes
5
answers
7k
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 ...
0
votes
2
answers
337
views
PIC16F676 communication using infrared
So I've been working on this project for some time now and I've hit a wall since I'm new to using pickit3 and using C language is not my strong. Basically what I'm trying to do is use two micro-...
1
vote
1
answer
2k
views
Simple number counter - PIC16F877A microcontroller problem
I am trying to make a simple counter using pic16f877a. I want to count each time a push button is pressed, that is taking one press as one count, regardless of how long the button is pressed.
The ...
1
vote
1
answer
4k
views
Programming PIC16F877a using PICKIT3
I'm trying to program a pic16f877a using PICKIT3 and MPLAB without success.
I'm powering the pic with the pickit.
I verified the connections almost 20 times, everythings plugged at the right place , ...
1
vote
0
answers
394
views
Serial Flash always returning 0x00 while reading after writing
Could someone look into the code and tell me the mistake in the code
I am trying to Interface PIC16F877a and AT25SF041 serial flash.
I have pulled up CS pin to 5V using 1K resistor
The flash is ...
1
vote
1
answer
212
views
scrambled uart output
I am new to pic uart communicatioon with PC using RS232.
I have tried the below code and used Hyperterminal to view the output.
But the output gets scrambled here and there each time when I reset pic. ...
0
votes
1
answer
159
views
PIC18 problem with flash programming [closed]
Firstly, I have to say that I'm new to PIC family. I am trying to build USB-CAN converter from USB-TIN page using PIC18f14k50 microcontroller, PICkit3 programmer and MPLAB IDE.
After writing hex file ...
0
votes
1
answer
154
views
PIC12F629 memory overflow
I am new to PIC microcontroller programming. I am trying to programming PIC12F629. I have a hex file (size 518bytes). When I am trying to write using PICkit2, it shows memory overflow. Here is my code:...
3
votes
2
answers
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 ...
-2
votes
1
answer
931
views
C project for PIC won't build when I call user defined functions
So I am trying to set up a UART serial connection, and I have a function called UART_INIT to initialise my UART, however when I try to call it my project won't build and I can't see why. If I just ...
0
votes
1
answer
660
views
How to solve overflow stack problem problem in proteus?
I'm currently working on a countdown timer project.I used PIC18F452 microcontroller for my project. I compiled the code in mplab and it has succesfully been builtHowever in proteus, the countdown ...
0
votes
1
answer
790
views
PIC18F2550 and DS1307 i2c RTC MPLAB assembly code. Have to loop for seconds,mins,hrs
PIC18F2550 and DS1307 i2c RTC MPLAB assembly code.
I am using a PIC18f2550 to get time,date,etc from DS1307.
I am able to get the seconds,minutes, hours, etc by repeatly CALLing GET_TIME with a ...
3
votes
1
answer
234
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?
0
votes
1
answer
567
views
sleep mode in pic16f1618/19
I am trying to reduce the power consumed by microcontroller pic16f1618, and hence I thought of using SLEEP(). All interrupts such as timer, and pin are disabled. The code is generated with the help of ...