Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
113 views

I am using MPLAB X IDE version 5.43 to develop an embedded project for a PIC18F8722 microcontroller. It has a timer TMR0 which can be configured to be 32 bits. I had lots of statements: TMR0L = 0; ...
Guille's user avatar
  • 472
0 votes
0 answers
84 views

I'm working on some code for a PIC microcontroller PIC18F47J53. I'm using MPLAB X IDE v6.25 and the package PIC18F-J_DFP 1.9.170. Both are latest versions. A year ago, I used exactly the same code, ...
Hans Billiet's user avatar
1 vote
2 answers
86 views

I am making a code in PIC C compiler to turn on and off a LED. However it is not working on my physical board or in the simulation. Error message is: [PIC18] PC=0x0000. $MCLR$ is low. The processor ...
Haret V's user avatar
  • 11
1 vote
3 answers
198 views

I'm using the PIC18F47-Q18 Curiosity HPC Development Board and the MPLAB X IDE v6.20. The goal is to store the 10 bit value from the analog output into the 8 bit PWM. Depending on the justification of ...
Ivan's user avatar
  • 13
2 votes
0 answers
119 views

I was implementing a driver for ccp1 peripheral and after implementing it and using proteus for simulation, the enhanced PWM doesn't work while I made sure that the CCP1CON is loaded correctly and ...
Mohamed Olwi's user avatar
0 votes
1 answer
92 views

Is there any way to place a const variable to an odd address of the flash, so that the value is in the HEX file? It needs to be at a specific flash address, i can not use the SAF Block because its to ...
Studiusus's user avatar
2 votes
1 answer
113 views

I am trying to implement Modbus RTU in a device that has a PIC18f47k40 MCU with baudrate of 19200. I started by setting up eusart1 for sending and receiving. This is the code in main.c that is ...
Hamza khalid's user avatar
-1 votes
1 answer
93 views

I´m trying to make a simple caltulator using PIC18F46K22 microcontroler and UART. However it works only for adding two numbers, even though the strstr cor comparison and finding the "+" / &...
Lucie Oborná's user avatar
1 vote
1 answer
180 views

I'm trying to use the matrix keypad in PICSimLab's PICGenios board with PIC18F4580 MCU. The schematic for the board is here. Below is the code. matrix_keypad.h #ifndef MATRIX_KEYPAD_H #define ...
Abhishek A Udupa's user avatar
0 votes
1 answer
229 views

Can someone please help me. I am using PIC18F26Q10 mcu bootloader code starts from 0xF00 and application code starts from 0x4000 The below code is what I tried out but the switch doesn't seem to ...
Hanaan Abbas's user avatar
0 votes
1 answer
147 views

I am trying to read the DHT11 on a PIC18f57Q84 and display it to an LCD screen. I found somebody online who did this for a PIC18f4550 and tried to make it work on my PIC18f57Q84 development board. I ...
yui1236's user avatar
1 vote
2 answers
234 views

I have this code for the MCU (pic18f4580) : #include <pic18F4580.h> #pragma config OSC=HS #pragma config LVP=OFF #pragma config PBADEN=OFF #pragma config WDT=OFF #pragma config MCLRE=ON #...
John Sall's user avatar
  • 1,173
0 votes
2 answers
459 views

Using Indirect addressing I'm trying to copy the value 77H into RAM memory locations 50H to 55H. The issue I'm running into is a build error where it says FSR and INDF are not previously defined ...
Matt Bennett's user avatar
0 votes
1 answer
434 views

As a beginner I am trying to send data between two pic18f4550 where master sends and slave receives data and prints data bits on LED(PORTD). But I don't know where the issue is, the slave is not ...
Aizaz's user avatar
  • 13
0 votes
0 answers
60 views

I am using a PIC18F6520 and have managed to write some code that flashs an LED with a deay of 500ms, below is this code. // CONFIG1H #pragma config OSC = HS // Oscillator Selection bits (HS ...
ProgramMasher's user avatar
0 votes
0 answers
262 views

I am trying to get Timer2 to flash an LED, this is not the final operation but I had it flashing an LED without the interrupt so I am continuing with this for now. But I cannot seem to get it working. ...
ProgramMasher's user avatar
1 vote
0 answers
101 views

I am writing code for generating continuously generated PWM with a potentiometer.The code is given below. The code is working fine, but in some scenarios, it stops working. I get a changing PWM when ...
Zerox's user avatar
  • 15
-1 votes
1 answer
51 views

For the most part i can follow this code but i cant seem to grasp how the final 8-bits are constructed, see my comments below: Original code web page see for more information while(ir == 1); ...
derill03's user avatar
0 votes
0 answers
81 views

I would like to know why the simulation is going wrong in the Proteus Professional. Well, on this circuit and code, I tried to make a Temperature sensor with fans following the following conditions: ...
AllryaLinez's user avatar
1 vote
1 answer
295 views

while using interrupts in pic18f4550, I get stuck in external interrupts, and the push button (RB0) is not Inverting (Toggle) the value at PORTD, I used timer0 interrupts which work perfectly, but I ...
Aizaz's user avatar
  • 13
0 votes
1 answer
119 views

I am trying to make code for PIC18F45K50. I am trying to use PORTE as digital input. That means I have to clear the ANSELE register which controls this pin behavior. Working on MPLAB X 3.30, I tried ...
Juan Camilo Aguilar Coronado's user avatar
2 votes
2 answers
157 views

I am trying to understand PIC18 code in a format like TRISB &= 0b11100000. What is the order the individual RB pins appear in? i.e. is this register setting RB0-RB2 as input, or RB5-RB7 as input?
Cheetaiean's user avatar
0 votes
0 answers
393 views

I am using MPLAB IDE, MPLAB XC8 v6 Compiler, PIC18F25Q10. We are working with a bootloader project. While in the bootloader phase, it is expected to update the application and jump to a certain ...
fthelb's user avatar
  • 23
2 votes
1 answer
1k views

I am trying to add a simple led application to a PIC18F25Q10 in another circuit using the Curiosity HPC development board. I am using the MCLR, PGD, PGC and GND pins. Although I set the LVP mode to ...
fthelb's user avatar
  • 23
0 votes
1 answer
194 views

I can't find any tutorials specific to PIC18F4550 using MPASM. ; PIC18F4550 Configuration Bit Settings ; Assembly source line config statements #include "p18f4550.inc" ; CONFIG1L CONFIG ...
noobyme's user avatar
-2 votes
1 answer
109 views

I'd like help explaining this assembly statement because I don't quite understand it yet: RLCF INTCON,W,C
NguyenTam's user avatar
0 votes
0 answers
123 views

I am using pic18f and coding on mplab v ide. While compiling the code it's showing that 'RD3' is depricated. What should be the solution to it.
shashi singh's user avatar
0 votes
0 answers
264 views

this is my first question, so please let me know how I could possibly ask the question better. I am working with MPLAB v8.92 for an Embedded Systems class. My teacher gave me some pre-written C code ...
Noah Schamp's user avatar
-1 votes
3 answers
150 views

I am trying to create a conversion table using the C programing language. I want to convert the temperature from -250 °F to 250 °C increments of 10. However, I am not getting the Celsius output: #...
Jimmy Kaye Deprease's user avatar
1 vote
0 answers
119 views

I'm adding a clock to my program, but for some reason I cannot lower the value of my "sec" variable. I have a millisecond timer that raises a flag every ms. So, every 1000 ms I clear the ms ...
Wesley Kienhuis's user avatar
2 votes
1 answer
249 views

I have already spent several nights debugging gated timer on PIC18F26K80. I use MPLAB v4.15 and XC8 v2.32. I want to run a long period timer, so I chose Timer 3 gated by Timer 4. I've read Microchip's ...
OndraCER552's user avatar
0 votes
0 answers
78 views

I am using PICKit4 to program a PIC18F4550. I have plugged in a 40MHz Oscillator and here's my code including config bits. The LED stays ON for 12 seconds and off for 12 seconds instead of 5. What am ...
VkkiPink24's user avatar
0 votes
1 answer
225 views

I'm writing a program on PIC18F4550 where I have data defined in my memory and want to send it to PORTA character by character. I have done so but the values showing on LATA are not the ones shown in ...
April Crude's user avatar
2 votes
1 answer
69 views

I'm trying to write a program on PIC18F4550 where I have data defined in my memory and want to send it to PORTC character by character. I have done so but the values showing on PORTC are not the ones ...
April Crude's user avatar
-2 votes
1 answer
76 views

I am new to the forum. I am recording the RPM, and show it on 4x seven segments with CCP2. It actually works quite well from about 3.81Hz to about 166Hz, which is enough upwards. I measure the ...
programming_C's user avatar
0 votes
0 answers
80 views

I am using MPLAB XC8 and I try to use the USART module. But I have abnormal problem. Here is my code, I explain after this. #include <xc.h> #include "conbits.h" #include <stdbool.h&...
batgre's user avatar
  • 1
1 vote
1 answer
731 views

I have tried varying the duty cycle of the servo motor but it only turns 180 degrees clockwise and anti-clockwise.
user avatar
0 votes
1 answer
266 views

I am using MPLABX to write a simple program for PIC 18LF46K42 Microcontroller that would turn LEDs on and off after a certain delay. The compiler does not recognize "TRISB" and "LATB&...
user3723326's user avatar
0 votes
1 answer
513 views

MICRO: PIC18LF47K42 compiler: XC8 application: MPLABX I am trying to combine the values in of 12 bit ADC. They go into ADRESH and ADRESL. My ADC is set up for right-justify which does formating as so: ...
TJL6012's user avatar
  • 23
2 votes
1 answer
1k views

I am currently working on a PIC18F and I wonder what the difference is between a PORT and a LAT because looking at the documentation of the PIC18F they both do the same thing.
Celle qui parle aux chiens's user avatar
-1 votes
1 answer
427 views

Here is an example of my code i can place if condition to check While condition flag and put break after each line of the body but it increase overhead. WHAT SHOULD I DO?????? while(!((kvp < (...
Atef El Naggar's user avatar
0 votes
1 answer
227 views

I am writing a boot loader for Pic18F67K22 device. Program data 0x200- 0x1FFFF. Boot code resides in memory location <0x200 and is unaffected by boot load program update. The program 0x200-0x1FFFF ...
Bobby's user avatar
  • 659
1 vote
1 answer
387 views

Can someone explain how this type of loop works, I took it from a code that has a total delay of 1 second, I didn't understand the LOOP 2 and 3 function. DELAY: MOVLW 0X44 MOVWF C1 ...
Dragnovith's user avatar
0 votes
0 answers
110 views

I am building a Voltmeter for a PIC18F using an XC8 compiler on MPLAB and I am having trouble getting my second digit value to update as I rotate my potentiometer. A potentiometer is connected to ...
C_GNARWIN's user avatar
-1 votes
2 answers
1k views

I'm looking to create 250ms delay function with MikroC. In the code below, I don't understand what 165 in the 2nd for section does. void MSDelay(unsigned int itime); // this is the prototype void ...
Empty Name's user avatar
1 vote
1 answer
439 views

Background I am trying to make 16x2 generic LCD display(HD44780) shows some texts on the screen when data is received from HC-05 Bluetooth module via USART interface using PIC184550. The simplified ...
Chris Aung's user avatar
  • 9,622
-1 votes
1 answer
1k views

I am currently working on transmitting from a PIC18F4620, through a FT232, to CoolTerm. I am currently only receiving FF and FE from the PIC though. I was wondering why this may be the case. The Rx - ...
Petertk's user avatar
0 votes
1 answer
284 views

I seem to have issue to receive correct bytes from a PC to a PIC18F27J53. The PIC UART is set standard, asynchronous, 8bits, 9600, No parity. The PC is a win 10, I have made a simple UART program, and ...
random_name1978's user avatar
2 votes
1 answer
91 views

I am programming a PIC1847q processor on the curiosity HPC board. My task is to design a battlestar galactica cyclon visor using the LEDs on the board. My current code does infact create and replicate ...
Max Sorin's user avatar
0 votes
1 answer
592 views

I know that the DAW instruction adjusts the 8bit result in the WREG after adding two packed BCD numbers but is the DAW instruction capable of adjusting a much higher bit result in WREG ?
Luis B's user avatar
  • 1

1
2 3 4 5