Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
68 views

I am quite new to the PICs and especially with XC8 pic-as and MPLAB-X I have a ultra minimal project i am working on, and i have some questions regarding the OSCCAL values located at the reset vector, ...
nipil's user avatar
  • 138
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
2 votes
2 answers
102 views

I am currently trying to load a value stored in the code area. The C equivalent is const char val = 25; char x = val; All the examples I can find only load values from the data area. If I ...
cup's user avatar
  • 8,558
2 votes
1 answer
147 views

This is my first post ! I recently bought a Cambridge Audio Azur 651A with no remote, I just want to make sure everything on the remote side works. It uses the Philips RC-5 protocol. I wrote a very ...
guizmo1967's user avatar
3 votes
2 answers
117 views

I’m working on a PIC16F18877 project where I’m trying to read a digital motion signal from an HC-SR501 PIR sensor. I’ve run into an issue where my PIR sensor seems to always read LOW (0) on my PIC ...
boy's user avatar
  • 41
0 votes
0 answers
75 views

Change Password function ChangePassword: MOVLW 0x01 MOVWF CHANGEMODE MOVLW b'01000011' ;c CALL LCDDisplay MOVLW b'01001000' ;H CALL LCDDisplay MOVLW b'01000001' ;A ...
hai xiang tan's user avatar
2 votes
1 answer
101 views

I made a code using ADC_Read function in MikroC PRO IDE, but the code doesn't build, and the following error message appears: the variable ADC_Read isn't declared I'm using a PIC12F675 with an ...
Gustavo mota's user avatar
3 votes
2 answers
175 views

For this assignment I'm using the PicKit3 microchip PIC16F1829, lesson 8 from the PicKit starter guide. I wrote the following code for my assignment that turns DS3 on (but for some reason it turns on ...
learningtoomuch's user avatar
4 votes
1 answer
161 views

When I have finished a software, I carry out a stack overflow test at the end. Why don't I have to do this with a compiled stack? Are overflows really completely impossible here or only very rare?
Mike's user avatar
  • 4,431
2 votes
0 answers
94 views

I’m encountering some issues with the CAN BUS module on the PIC18F2580. I should probably mention that I’m new to working with CAN, so I may have overlooked something quite simple. Currently, I’m ...
Nik Name's user avatar
0 votes
0 answers
98 views

I have a question, when I use this code in MPLAB IDE v8.92, Windows 11, when it arrives to the rlf line it behaves weird either if I use 0 or 1 for "d" in rlf. Values for j and k are 0xFF. ...
Adolf RJ's user avatar
1 vote
1 answer
94 views

I am using a PIC32MZ2048EFM144 uC. I wanted to know time taken for a routine called adc7768(). When I go to window->debugging->stopwatch and try to debug it gets hung. Debug will not happen. ...
maxy's user avatar
  • 75
1 vote
0 answers
60 views

I have a simple circuit (with PIC16F628) which repeatedly measures the frequency of a signal connected to Timer1. I use Timer2 as a timing gate. To simulate the 'system', I used GPSIM, but I'm having ...
jcoppens's user avatar
  • 5,470
2 votes
2 answers
77 views

I have the following problem with XC8 compiler I had an array --> char my_array[8]; but for convenience, I want to declare the variable --> unsigned int cont_up; at the same address of ...
abimarper's user avatar
2 votes
1 answer
76 views

Suppose i have two numbers n1 & n2, one in bank 0 and the other in bank 2, i want to do a sum operation on them using the indirect addressing approach, here is the code from my lecture which is ...
HellBoy's user avatar
  • 149
1 vote
0 answers
63 views

I've been working on a project with PIC18F25K80 MCU for a while. My main purpose is to collect some sensor data based on user-defined intervals(like 1min) and since this is a battery-powered ...
ceryankolik's user avatar
1 vote
0 answers
426 views

I need to do software testing and validation for the PIC16f15214 source code using VectorCAST. But when I build the environment it shows the "compiler error" / "can't open the 'XYZ.h' ...
PUSHPAK LADAKE's user avatar
2 votes
1 answer
481 views

My code builds fine in the MPLAB X IDE (v5.454), but for usability I want to use VS Code with the MPLAB extensions. My requirements include the use of the xc32 compiler v2.40. The example video does ...
spaceKelan's user avatar
0 votes
1 answer
148 views

I'm struggling to implement a function jump table and hoping someone can help out. device is PIC16F1503 MPLAB X IDE v6.20 and XC8 v2.46 called functions Function1 and Function2 are in a separately ...
NomadAU's user avatar
  • 129
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
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
1 vote
3 answers
124 views

Wonder if anybody knows the correct C syntax to store context (in my case just one int) before a PIC 24F sleeps and then recover it when woken. The example code (Microchip app note), which is supposed ...
Ralph's user avatar
  • 205
2 votes
2 answers
105 views

My project consists in: Using a 4 digit 7-segment display to show certain numbers, representing the amount of cash stored in a moneybox. I am using both .c and .S files. To rotate between the 4 digits ...
lachoprime's user avatar
2 votes
2 answers
106 views

I was looking at a pic 10 include file (p32mk1024gpk064.h) and was wondering why they added a struct with a single element instead of an union between a struct and an uint_32. typedef union { struct ...
FlexTapeDude's user avatar
1 vote
1 answer
751 views

enter image description here I am receiving this error when trying to launch MPLAB IPE 6.20 after downloading MPLAB IDE 6.20. Does anyone know how I can fix this? I have uninstalled it and reinstalled ...
Lindsey McVay's user avatar
0 votes
1 answer
117 views

For my hobby I used to get boards for a particular device, and used to reprogram the microchip PIC 18F87J10 using MPLAB ICD-2 (I run it from my VM VirtualBox running Windows XP). Now the company from ...
gciriani's user avatar
  • 689
0 votes
0 answers
98 views

I'm using a PIC18F microcontroller with mikroC PRO for PIC. The PIC micro reads strings over the UART, which Software implemented because there is only one UART, and I need two. I'm trying to write a ...
Isay's user avatar
  • 9
-1 votes
1 answer
119 views

I am searching for PIC32 Library Functions' context. For example there is a uart.h library and "void UARTEnable( UART_MODULE id, UART_ENABLE_MODE mode );" in it. When I used that function ...
123 456's user avatar
  • 23
3 votes
0 answers
94 views

I am using the PIC24FJ128GA306 microcontroller and trying to reserve a block in flash memory to store persistent data. Here is the code snippet I am using to define and allocate the persistent data: ...
user24822085's user avatar
1 vote
1 answer
100 views

This is a large program now so just a bit of the source code below. **DISASSEMBLED CODE:** 0164 0739 ADDWF 0x39, W 531: addwf Trigger777,0 ;to get proper patch table 0165 0733 ...
Dan Laskowski's user avatar
0 votes
0 answers
88 views

I'm writing my first PIC16F1618 project. I got stucked in a pretty strange error/behaviour. This's the repository of the project: Github repo The problem is the value resulting from the ADC sampling: ...
weirdgyn's user avatar
  • 1,038
1 vote
2 answers
124 views

This Analog data is read and the number 1-5 is shown on the 7 segment common anode display with 7447, but I can't set this number for analog value because I can't show analog values or output I wrote ...
CrazyProgrammer's user avatar
0 votes
1 answer
162 views

I can't program this microchip (using a PicKit5, should be no issues), either because its too old or I'm lacking a lot of knowledge. So the program gets written correctly with no errors, but when I'm ...
I have no enemies's user avatar
0 votes
2 answers
98 views

I am working on several home automation projects with PIC12F675. To maximize portability, I am using bit-shift operations to map GPIOs, like this: // Hardware Mapping #define pressure_pin (1<<0)...
Nelson's user avatar
  • 333
0 votes
0 answers
141 views

I'm using the dsPIC33ck128mc105 and the FreeModbus library. I need to add Modbus RTU (RS232), but I'm facing a small problem. I understand the timer period calculation as "11 bits / UART baud ...
Readrive's user avatar
0 votes
0 answers
62 views

USB pd Max76958 and restarting negotiation without disconnecting Hi there, I am in a bit of a pickle and I was hoping someone could help. I am using a maxim max77958 pd control to negotiation power ...
thisisdarlensonl's user avatar
0 votes
2 answers
123 views

Task 1: Create a 1 Hz Square Waveform on PORT.A0 Write an assembly language program to create a 1 Hz square waveform on PORT A0. a) First write your code to toggle PORT A0 without any delay b) Then ...
user25136115's user avatar
0 votes
1 answer
190 views

Building on top of this question Writing Device Drivers for a Microcontroller(any) I am just starting to learn deep inside microcontrollers, more specifically PIC16F690. I already know a whole lot of ...
Clóvis Fritzen's user avatar
0 votes
2 answers
143 views

Very new to assembly programing and im trying to make a blinking LED, here is my code: #include p16f877a.inc counter equ 0x20 org 0x00 goto main org 0x04 goto ISR main bsf INTCON, ...
omar sweiss's user avatar
0 votes
1 answer
335 views

I have a project that was built in MPLAB 8 using the Hi Tech C compiler. When I load it into MPLAB 8 to program a device I get a checksum (I use Unprotected checksum), then when I load it into MPLAB X ...
Georgem's user avatar
1 vote
1 answer
115 views

Using MPLAB to code for PIC16 in C using the XC8 compiler. I am trying to capture some baud rate settings from a string, for example "115200,8,N,1". For the purpose of my application, I have ...
GeoReb's user avatar
  • 53
0 votes
1 answer
210 views

I am trying to compile this code in order to generate a PWM signal 15us HIGH and 9us LOW. #include <xc.h> void g() { for(char val=0; val<20; val++) { GPIO = 0xFF; NOP()...
Dragos Makovei's user avatar
-1 votes
1 answer
165 views

I have written/copied/modified an I2C client written in C which works. When I translate it to assembly language it fails. Where am I going wrong? The master/slave design is very simple. Master ...
NomadAU's user avatar
  • 129
0 votes
1 answer
41 views

I'm using MPLABX XC16 on a PIC24F16KA102 and attempting to migrate from a PIC16 and mpasm. A simple loop which sequences some LEDs should test a switch between each LED on/off and then branch out to ...
Ralph's user avatar
  • 205
0 votes
1 answer
775 views

My partner and I are currently building out an interface code set for a PIC16F877A microcontroller and a LCD1602 I2C screen We can onboard everything perfectly fine however nothing shows on the screen....
Andrew Schelb's user avatar
0 votes
2 answers
239 views

I'm trying to get 2 MCUs to communicate using one-way SPI, i.e. Master sends to Slave. The master code appears to block after writing to the output buffer at the point where I am testing for the BF ...
NomadAU's user avatar
  • 129
-1 votes
1 answer
95 views

list P=16f54 #include <p16f54.inc> ; CONFIG ; __config 0xFFFB __CONFIG _OSC_RC & _WDT_OFF & _CP_OFF org 1FFH GOTO Start ; go to beginning of program ...
Michael Walker's user avatar
0 votes
1 answer
733 views

I was trying to create a UART driver for the PIC32MX320F128H, when I noticed that any time the UART IRQ occured, it would crash the system. The Debugger told me that the program was halting at these ...
Jacob Dennon's user avatar
0 votes
2 answers
109 views

I am simulating a project in Proteus where I show a three-digit number (456) on a 7-segment display, but instead of showing 456 it shows 006.......... the calculations are well done but I can't figure ...
Autoradio RBB's user avatar
1 vote
1 answer
272 views

I'm new to assembly language and I wrote a simple program to learn. I run into a problem of program counter (I believe) with a "goto" instruction. I use a PIC 10f202 and I use MPLAB v.6.15 ...
Dominique Tremblay's user avatar

1
2 3 4 5
34