Questions tagged [mplab]

IDE for the Microchip PIC series of microcontrollers.

Integrated Development Environment for the Microchip PIC series of microcontrollers.

614 questions
2
votes
3 answers

Configurations variables removed by compiler

I am attempting to define a set of global variables which will configure my device, about 10 in a dedicated .c file, that will be changed on a regular basis at compile time (as per device requirements), I want these to be in this separate file so…
2
votes
1 answer

EZBL_EraseAll or EZBL_NVMKEY not working in mplab x IDE version 5.4

I have a bootloader working for mplab x IDE v4.2 for years. It is compilated with XC16 1.35. We are updating it to be used on MPalb x IDE v5.40. I have been able to make this by creating an example of ezbl and replacing the files with my code from…
Hamboy75
  • 938
  • 1
  • 11
  • 22
2
votes
1 answer

Enable usage of modern code analysis tools on old-ish embedded c/c++ code

How to use modern code analysis tools, such as SourceTrail on old-ish embedded c/c++ source code, originally for compilers such as Hi-Tech C, PIC C, IAR Workbench for a number of Microcontrollers not only limited to PIC, PIC16, and PIC18 series from…
fsteff
  • 543
  • 5
  • 19
2
votes
1 answer

Redefine short long to use code analysis tools on embedded c code

I'm attempting to use SourceTrails (https://www.sourcetrail.com/) to analyze embedded c from the MPLAB CX8 compiler. It's not entirely trouble-free, as the compiler uses a number of custom features, not found in the C standard. One of these is the…
fsteff
  • 543
  • 5
  • 19
2
votes
1 answer

Can I program a PIC 16f628a in C using Microchip's MPLAB?

If so, is there a tutorial for doing this? I'm pulling my hair out trying to do anything with their IDE, I'd really like a straight forward example. They have a tutorial here but it's for assembler, not…
Jodes
  • 14,118
  • 26
  • 97
  • 156
2
votes
1 answer

AnalogValue PIC16F18875 serial print problem

I am having troubles with my curiousity HPC board. I am new to microchip and i want to read the analogValue of the onboard potentiometer. I am using a serial converter to display the value in a terminal on my PC. It works fine, EXCEPT when i fully…
2
votes
1 answer

What is the limit for delay function we can add for _delay_ms in xc16 in mplab for dspic33ep256mu814 controller?

Can anyone pls explain the max limit to be given for delay "_delay_ms()" identifier in xc16 compiler in MPLAB for dspic33ep256mu814 controller? Thanks in advance.
maxy
  • 31
  • 1
  • 6
2
votes
1 answer

How do you fix scaling issues with MPLABXIDE (with MCC) in Windows 10 when using a HiDef display?

MPLAB X IDE (Ver 5.30) starts scaled to a proper resolution reflecting the scaling settings in Windows; but, when the MCC plugin is started it results in the refresh of the Window and the window shrinking back to 100% scaling with MCC parts alone…
imbuedHope
  • 508
  • 3
  • 14
2
votes
2 answers

Servo Motor not moving properly in Proteus

I'm trying to control a Servo Motor with a PIC18f4550, but before buying one, I'm trying to simulate it on Proteus ISIS, but I'm getting some inconsistencies when setting the angle. I've tried using a 20ms period and 1ms, 1.167ms, 1.333ms, 1.5ms,…
2
votes
1 answer

Declaring 16bit memory variable in assembly

I'm starting to study assembly for PIC18f4550 and I've been trying to do some activities and I don't know how to solve it. According to the activity, Using MPLABX, I'm supposed to sum 2 16bit variables and store the result on a third 16 bit…
2
votes
3 answers

Why is my Timer2 interrupt not working? Am I missing any register configs?

I am working on a project with the pic10f322 microcontroller. I've made a very basic communication protocol - there is a start pulse (10 ms) followed by a number of 5ms pulses (2 pulses - turns on a red light, 3 turns on yellow and 4 - green). So…
2
votes
1 answer

Using Relative Path in MPLAB IDE

My project structure and files are as follows: project\HAL\hw_lcd.h project\HAL\hw_lcd.c project\project\app.c project\project\workspace.mcp project\project\workspace.mcw Where 'project' is a place holder for project name. I'm using MPLAB IDE 8.66…
Donotalo
  • 12,748
  • 25
  • 83
  • 121
2
votes
0 answers

Unable to execute interrupt function

Using Mplab ide 5.10 and xc8 compiler for the pic18f4550 I am unable to get the code to get into the interrupt function the goal is to get J to count up in the background until something trigger it to output a value in the lcd. Currently only the…
Unknown
  • 723
  • 1
  • 6
  • 9
2
votes
0 answers

ACKEN bit on PIC24FJ64GA002 not clearing after acknowledge sequence

uint8_t i2c_read(void) { uint8_t u8_readData; uint8_t u8_ackBit = 0; while(I2C1CON & 0x1F); //wait for idle I2C1CONbits.RCEN = 1; //prepare device to receive while(I2C1CONbits.RCEN); u8_readData =…
CODE_guy
  • 21
  • 2
2
votes
0 answers

Register address stored in another register (PIC18F45K50)

I have the following scenario using a PIC18F45K50: I have the value of 0x71 stored in the register 0x50. And I have a value of 0x05 stored in the register 0x71. How can I access the value stored in 0x71 (in this example 0x05)just by using the…
P.Vazquez
  • 21
  • 1