Questions tagged [mplab]
mplab is the IDE used to compile, program and debug PIC chips.
148 questions
2
votes
0
answers
84
views
PIC16F18456 USART outputting 11bits despite TX9 set to 0
A strange issue that appears to be an obvious fix at first, but I have tried the usual suspects...
My goal is to build a simple UART bridge on a PIC16F18456 (without XTAL).
RX data on USART1 and TX ...
0
votes
1
answer
102
views
Unable to Implement Bootloader for AVR128DA48
I have limited experience with microcontrollers and I am currently working on implementing a simple bootloader using the code provided in the following repository:
AVR128DA48 Curiosity Nano Bootloader ...
2
votes
1
answer
183
views
sprintf suddenly stops working
Are there common causes for sprintf to suddenly stop functioning as expected in an embedded environment?
Microcontroller: PIC24FJ128GB204
...
1
vote
1
answer
532
views
MPLABX does not generate a .HEX file after succesfully building .c file with xc8
As in title. I'm trying to program a PIC12F1840 microchip to blink a LED with the following code:
...
0
votes
1
answer
94
views
Move PGEC2/PGED2 to PGEC1/PGED1 on PIC32MX
I have a board with PIC32MX795F512L. The board icsp connector is connected to PGEC1 (pin 24) and PGED1 (pin 25). I accidentaly flashed a hex bootloader (i don't have the source code) used for another ...
-1
votes
3
answers
313
views
MAX6675 SPI communication with PIC microcontroller
I'm using a PIC16F1832X to communicate with a MAX6675 thermocouple-to-digital converter. As I read the values of the temperature and the SSPBUF register, they are way too high; SSPBUF is 223.
I assume ...
0
votes
1
answer
279
views
Mplab XC16: can't use sprintf to convert float to string [closed]
I want to use sprintf function to convert a float to string, here is part of the main.c code : (PIC24JF64GA004)
...
1
vote
1
answer
151
views
PIC16F18855 adc read mismatch
I wrote a code for pic16f18855 analog voltage to digital value reading. but I noticed that analog voltage connected to pin RA0 read with RA1 and analog voltage connected to pin RA1 read with RA2 and ...
0
votes
1
answer
100
views
Is it possible to force an input port during debugging in MPLAB IDE v8?
I am using MPLAB IDE v8 (not IDE X) to write some PIC programs (PIC18F4321) in assembly. I am using the debugging tool MPLAB SIM to debug the programs, however I am not able to force port bits from ...
0
votes
2
answers
348
views
Can't debug a PIC24F04KA200 using a MPLAB Snap debugger
I'm working with a PIC24F04KA200 in MPLAB X IDE v6.05 and debugging using a MPLab Snap debugger. Programming in C. I can program the device perfectly fine. When I want to debug the program I need to ...
0
votes
0
answers
90
views
dsPIC30F2010 reset help
I have tried to program a 30f2010 and its got code protected. Showing 0×00000 error.
I have a PicKit2 but didn't know how to use it to reset ic. I've found something like this in the datasheet.
How ...
1
vote
2
answers
307
views
Why am I getting the wrong timer frequency in PIC microcontroller application?
I am getting results I don't understand in a small application (I am still a learner) using PIC16F627A MCU. Schematic of the circuit:
simulate this circuit – Schematic created using CircuitLab
...
2
votes
0
answers
97
views
Build error linked to TrustZone on MPLAB X for PIC32CM Microchip
I am working on a project on a Microchip PIC32CM LS00, trying to run a code found on GitHub (https://github.com/Microchip-MPLAB-Harmony/csp_apps_pic32cm_le_ls, specifically the "TrustZone basic ...
0
votes
1
answer
187
views
Why is nothing happening on my CLKOUT pin, despite the RTC working fine? [closed]
I apologize for the (probably) trivial question -- I'm just starting to get back into coding for MCUs after a long hiatus, so please be patient with me.
I'll preface this by acknowledging that there ...
0
votes
0
answers
595
views
Compile error on the Microchip MCC generated code
I use Microchip MPLAB X MCC to generate the base application using TCP/IP lite stack for system with pic16f18346 and enc28j60 chipsets. I get the following errors. Scanning thru this error log you ...
1
vote
1
answer
556
views
PIC16F628A input not working
I am using PIC16F628A, MPLAB IDE to coding and Pickit3 to write the code into MCU. The code works on Proteus but does not in real world. I setted A0 pin as input. It should count up normally and count ...
2
votes
1
answer
101
views
How to configure RC3 pin as output in PIC16F886?
I already used it with a PIC18 and the RC3 pin is working for me, but for the PIC16F886 the 14th pin is described as "RC3/SCK/SCL", however, in picture 18 it is described as only "RC3&...
1
vote
2
answers
2k
views
How to see by how much a microcontroller program is out of data memory - inside MPLab X IDE
I have a problem that cannot exist. I keep building programs in MPLab that are close or just over my allotted RAM. I really want to see by how much over my RAM ("data memory" - why do they ...
0
votes
1
answer
111
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 ...
-1
votes
1
answer
470
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
447
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
192
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
3k
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
3
answers
336
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 ...
1
vote
1
answer
234
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
275
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
147
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
1k
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
2
answers
173
views
How to create an .scl file for MPLABX?
I am using MPLABX simulator to simulate some code. I want to create a signal for an external pin of the MCU using the stimulus. To do this I need to attach an .scl ...
0
votes
0
answers
565
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 address ...
0
votes
1
answer
2k
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
472
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
155
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
1k
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
214
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
341
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
676
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
85
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
2k
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
1k
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 anything ...
0
votes
1
answer
130
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
296
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
171
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
954
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
222
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
867
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
137
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 ...
-1
votes
1
answer
129
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
387
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
2k
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?