Questions tagged [mplab]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
34 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) ...
Issam H's user avatar
  • 21
1 vote
1 answer
97 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 ...
Alina Khan's user avatar
0 votes
1 answer
40 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 ...
bardulia's user avatar
  • 403
0 votes
1 answer
104 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 ...
Royginald's user avatar
0 votes
0 answers
27 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 ...
Muhammad Asraful Emon's user avatar
1 vote
2 answers
158 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 ...
RickyBoy's user avatar
  • 169
2 votes
0 answers
66 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 ...
Skelkinver's user avatar
0 votes
1 answer
129 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 ...
uWaveMan's user avatar
0 votes
0 answers
336 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 ...
Shamsul TehAhmad's user avatar
1 vote
1 answer
276 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 ...
akiftokel's user avatar
2 votes
1 answer
70 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&...
12vi12's user avatar
  • 21
1 vote
2 answers
889 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 ...
Mr Man's user avatar
  • 65
0 votes
1 answer
83 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 ...
adrengineer's user avatar
-1 votes
1 answer
324 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. ...
Citi's user avatar
  • 161
2 votes
1 answer
263 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 ...
journey's user avatar
  • 119
1 vote
1 answer
154 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 ...
Paavani Khanna's user avatar
2 votes
1 answer
2k 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" - ...
Canute S's user avatar
  • 145
0 votes
3 answers
259 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 ...
Ken Smith's user avatar
  • 234
1 vote
1 answer
186 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 ...
Dan Twining's user avatar
0 votes
1 answer
243 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: ...
Marcell Juhász's user avatar
0 votes
0 answers
120 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 ...
g ghimire's user avatar
1 vote
1 answer
924 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 ....
Kev's user avatar
  • 13
0 votes
2 answers
114 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 ...
Samwel Portelli's user avatar
0 votes
0 answers
467 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 ...
Geo's user avatar
  • 223
0 votes
1 answer
1k 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 ...
Geo's user avatar
  • 223
0 votes
1 answer
413 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: ...
Luis Toledo's user avatar
0 votes
1 answer
112 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: ...
Ish Montalvo's user avatar
1 vote
1 answer
980 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 ...
MightyBeard007's user avatar
0 votes
1 answer
151 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? ...
macro_controller's user avatar
0 votes
1 answer
256 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: ...
Nmaster88's user avatar
  • 391
0 votes
1 answer
577 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 ...
Nmaster88's user avatar
  • 391
1 vote
1 answer
63 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?
Nmaster88's user avatar
  • 391
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 ...
Nmaster88's user avatar
  • 391
0 votes
1 answer
980 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 ...
Nmaster88's user avatar
  • 391
0 votes
1 answer
93 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! ...
Nmaster88's user avatar
  • 391
0 votes
1 answer
254 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: ...
Enn Michael's user avatar
2 votes
1 answer
139 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 ...
Jose Luis Montalvo Ferreiro's user avatar
1 vote
0 answers
832 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 ...
karka Slapta's user avatar
1 vote
1 answer
177 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. ...
Jalo's user avatar
  • 113
0 votes
1 answer
687 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 ...
nerdsley's user avatar
  • 105
2 votes
2 answers
114 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 ...
TomS's user avatar
  • 202
0 votes
1 answer
95 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 ...
user66377's user avatar
  • 570
1 vote
2 answers
284 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 ...
A.F.'s user avatar
  • 33
1 vote
2 answers
1k 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?
DavidEnds's user avatar
0 votes
2 answers
118 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 ...
Anıl Kırıkkaya's user avatar
0 votes
1 answer
424 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 ...
TheDataScientist101's user avatar
0 votes
2 answers
296 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 ...
James Hock's user avatar
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 ...
TheTechGuy's user avatar
0 votes
2 answers
402 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-...
FABIAN RUBIO's user avatar
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 ...
RukshanJS's user avatar
  • 149