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
0 answers

PIC18F45K22 EUSART1 receive and show on hyper terminal

#include #include char uart_rd; void main(void) { ANSELC = 0; Open1USART(USART_TX_INT_ON & // disables transmission interrupt USART_RX_INT_OFF &// disables reception interrupt …
akumar
  • 49
  • 1
  • 9
2
votes
1 answer

Why ROM String is not being passed correctly?

I am trying to pass a String to a function. I have read a lot about RAM/ROM Strings in C18 and my code seems ok but it is not working. My function is like this: int setBluetoothName (static const rom char *name){ unsigned int n = 0, k = 0; …
Andres
  • 6,080
  • 13
  • 60
  • 110
2
votes
1 answer

Linker error in USB HID Code for Microchip PIC (MPLAB/C18)

I'm trying to compile some code for basic USB HID functionality. I'm using a PIC18F14K50 with MPLAB 8.43 and the Microchip C18 compiler. I'm using some standard files from Microchip's website. Here is my C file and here is my header file. I'm…
Ozzah
  • 10,631
  • 16
  • 77
  • 116
2
votes
3 answers

Reading state of input pins on a PIC18

I have been able to get outputs working on my PIC and can make a bunch of LEDs dance on and off as I set various output latches high/low. However, I'm having a lot o difficulty reading in the state of a pin. See the code below. I set up my config,…
Ozzah
  • 10,631
  • 16
  • 77
  • 116
1
vote
2 answers

Why won't this PIC code light up my LEDs?

The following code won't set any of the pins high on my PIC18F14K50, yet it couldn't be simpler! #include #include void main(void) { // Set ALL pins to output: TRISA = 0; TRISB = 0; TRISC = 0; // Set ALL pins to high: …
Ozzah
  • 10,631
  • 16
  • 77
  • 116
1
vote
1 answer

Is inline keyword relevant in MPLab?

It doesn't seem to be highlighted like other recognized keyword, but I'm not getting compiler errors. Is there a way to check the assembly? I'm not in a unix environment so I can't do an objdump, but is there any other way to view the appropriate…
tarabyte
  • 17,837
  • 15
  • 76
  • 117
1
vote
1 answer

PIC16F84 - eeprom read and write

I have a task to write eeprom read/write subroutines for PIC16F84 microcontroller. I have written such code: EEPROM_Read clrw bsf STATUS, RP0 ; Bank0 movlw DATA_EE_ADDR ; Any location in Data EEPROM memory space …
Siarhei Fedartsou
  • 1,843
  • 6
  • 30
  • 44
1
vote
1 answer

Compilation errors on sample USB project for MPLAB

I'm using mplab ide 8.43, and I've downloaded Microchip Application Libraries v2011-12-05 Windows from here. I haven't changed any of the compiler settings. I'm using the HI-TECH Universal toolSuite to build the project. When trying to compile the…
jackaroo
  • 11
  • 1
1
vote
1 answer

How to align similar lines of code using whitespace in Netbeans/MPLab X?

Is there an existing macro or plugin which will turn this Config.MyData1 = Data++; Config.MyData10 = Data++; Config.MyData100 = Data++; Config.MyData1000 = Data++; into this? Config.MyData1 = *Data++; Config.MyData10 =…
Daniel Grillo
  • 2,368
  • 4
  • 37
  • 62
1
vote
1 answer

MPLab Assembly Language Delay

The code I have written so far only blinks constantly regardless of which switch is HIGH or LOW. I can't seem to figure out how to make one switch faster than the others because it would either blink all switches at same rate or remain steady…
1
vote
2 answers

Blinking LED on MPLAB not Working ?

am using MPLAB to program my new microchip board and programming it programming it using pickit3 code: // Include the necessary device header file #include #pragma config OSC = HSPLL, //OSCS = OFF // HS-PLL Enabled, Internal External…
Karim M. El Tel
  • 438
  • 1
  • 7
  • 19
1
vote
2 answers

How to fix this syntax error in MPLABX IDE?

I am a beginner to PICs and I want to make the LED light up. However, every time I want to build the code, it returns a syntax error. I am unsure of what the syntax error actually is for since I have copied the syntax of the datasheet. I am using…
1
vote
1 answer

MPLAB X pic building the dissembled output and flashing to the same target (round-trip)

What I have done I've started my first Reverse-Engineering project and have extracted the HEX from the PIC16F1938 processor of the Delonghi Dedica EC685 coffee machine. The stock firmware can be found here: Delonghi Dedica EC685 Stock Firmware I…
Crog
  • 1,112
  • 8
  • 16
1
vote
2 answers

Weird notes being played on piezo buzzer when deviding with not a constant integer

So this is a more complicated problem. I am currently programming a little developer test board with a PIC16F1509 with the MPLAB X IDE and flashing the compiled hex file via a custom USB UART Bridge onto the board. My problem is following: The piezo…
Lipe
  • 33
  • 6
1
vote
1 answer

.eep file generation in MPLAB X

I use MPLAB X. I want enable .eep file generating. How I can do it?
DungeonLords
  • 107
  • 7