Questions tagged [pic16f877a]
8-Bit microcontroller from microchip
35
questions
0
votes
0
answers
42
views
Interrupt function (PIC16F MPLAB XC8)
I have two interrupt functions: one for generation of PWM signal for sinewave generation and the other is for (PWM) generating signal to battery charger.
Whenever the supply is available the battery ...
3
votes
1
answer
81
views
Setting PORTA of a PIC16F877a as digital
I have an LCD hooked up to the A ports of a PIC16F877a (A0, A1, A2 etc). However, the display doesn't work because PORTA is configured as analog by default.
In an PIC18F46K22 I'd do it using ANSELA = ...
0
votes
1
answer
68
views
SPWM generation on PIC16F873A is not stable; SPWM shape changes although duty cycle is the same for all
I am using a PIC16F873A for generating an SPWM signal using CCP1 and timer 2. The SPWM is generated successfully but the signal is not stable. I have generated 50 Hz signal of SPWM frequency of 40 kHz,...
0
votes
1
answer
133
views
Why does my ADC reading not increase when the supply voltage decreases?
I am using a 10 bit ADC and 5V supply, so resolution is \$\frac{5}{1023}\$. I decreased my voltage supply to 4V, the resolution now is \$\frac{4}{1023}\$
For both cases, I am reading a constant value ...
0
votes
1
answer
146
views
Is my ACS712 sensor showing normal characteristic?
I bought a new ACS712 current sensor. VIOUT to ground is 2.560 V under no load conditions. This is very accurate as my supply is 5.12 V.
I plug in an old fluorescent tube that needs a ballast and ...
0
votes
1
answer
96
views
Why my LCD not display anything?
This is my PIC circuit connection in Proteus to the LCD display and everything work fine in simulation. However, in practice, my LCD does not display even the very first line "AC Wattmeter" ...
0
votes
2
answers
88
views
Why my timer1 not working?
My purpose is to measure phase angle between 2 square wave as below(yellow represent voltage ZCD and blue represent current ZCD passing through ACS712 hall effect current sensor)
Below is my circuit ...
0
votes
1
answer
85
views
Does interrupt service routine in PIC16F877A work with other self-defined variables?
On internet can seen countless simple example like the one below
void __interrupt() isr()
{
if(TMR1IF)
{Do something}
}
But does it work on self-defined ...
0
votes
0
answers
176
views
Assembly Code for my Microcontrollers Class
I am trying to write some assembly code for my Microcontrollers Class.
Here is the assignment:
Make a program that converts a 4-bit binary number in one hexadecimal number (0-F).
The output value ...
-1
votes
2
answers
228
views
How to display my date in the 2nd line of the LCD?
Below are the codes I using to display dates and times and basically I used the function "write(hr1,hr0,min1,min0,sec1,sec0);" to display the time and "day_compute(day);" to ...
4
votes
2
answers
880
views
Why doesn't the switch command in this code work?
I want to create a clock using a timer (TMR2) to do the calculation and display current time.
I have a problem dealing with the switch statement and couldn’t ...
0
votes
0
answers
368
views
How does 'Interrupt on Change' work on a PIC 16f877A controller?
I have a problem with my program. I am using "interrupt on change" on a 16f877A microcontroller. I use MikroC.
What the program should do:
The program should generate an interrupt when I ...
0
votes
0
answers
139
views
NodeMCU AT Commands with UART not working
Hi, here are my specs :-
PIC16F877A microcontroller
NodeMCU (reflashed and got AT commands working via software only)
XC8 Compiler (using MPLAB X IDE)
Question :-
What I'm trying to do is, trying to ...
0
votes
1
answer
2k
views
Buzzer circuit problem in Proteus
In this circuit, the buzzer should sound when the button is pressed.
...
0
votes
1
answer
129
views
PIC16F877A not working with 4MHz oscillator
I was trying to do a LED flashing program, but the LED didn't turned on. I tried also with a program to just light the LED, but it didn't work either. I searched and one solution says to change the ...
0
votes
2
answers
173
views
Problem in simple LED Blinker Circuit using PIC16F877A
After a lot of trials & errors I was able to come up with a circuit to blink an LED using a PIC16F877A microcontroller.
Components I use are,
PIC16F877A
LM7805
20MHz Crystal Oscillator
IN4007 ...
0
votes
1
answer
345
views
PIC16F877A I2C MSSP not sending data
Sup, guys.
I'm in the violent war with PIC MCUs and they're clearly winning, so I'm asking once again for your intellectual support.
I have PIC16F877A on a breadboard, external 8Mhz+2x20pf, bypassed, ...
2
votes
2
answers
326
views
PIC16F877A External Crystal giving 60Hz
I'm new around here. Usually I read a lot of stuff and find all info I need, but this once I googled my fingers till blood, yet to no avail.
Recently got my hands on PIC16F877A. It wasn't MCU of my ...
0
votes
0
answers
33
views
Matlab and pic integration
i' m working in an exercise of integrating between pic16f877a and Matlab GUI. Although spending much time searching, i still have not found out how to display ADC value on a GUI panel. Hope you could ...
3
votes
2
answers
271
views
PIC16F877 pin functions order in pin name
For example, one pin's name is RA2/AN2/VREF so I wondered what the order is of the functions on this pin. Are they the same or left to right or reverse?
Thank you for your answer.
-1
votes
1
answer
86
views
Designing a frequency detection circuit [closed]
Hi i was wondering if its possible to make a digital frequency detection signal which detects which generation is being used by nearby mobile phone ie:gsm 3g 4g the frequency band varies according ...
0
votes
2
answers
542
views
pic16f877a problem in timers with proteus simulation
I used PIC16f877A at proteus to do timer interrupt.
The code is pretty simple it has nothing to do rather than setting the timer1 registers , the while(1) loop is ...
1
vote
1
answer
365
views
PIC MCU PIC16F887 not working with external power
I am a newbie with PIC doing my first project to understand how PICs work. I have some experience with Arduino and trying to learn PIC now.
I have chosen PIC16F887 (40 pin DIP package) as my first ...
2
votes
3
answers
4k
views
How do I perform division of two numbers in PIC16F877A in assembly language?
I'm currently using MPLABX IDE to develop for a PIC16F877A microcontroller. I want to divide two numbers and find out the quotient (let the two numbers be 10 and 4) and store in a register.
I was ...
1
vote
0
answers
75
views
PIC16F877A stops working when I remove the PICkit 3
I've made codes of different sequences of lights but somehow this one does not work when I remove the PICkit 3, as long as the PICkit is on the circuit works.
I am supplying my circuit with a 5V-3A ...
6
votes
1
answer
2k
views
"Not enough RAM " error in PIC16F877a
I have been trying to run the following code:
...
0
votes
1
answer
1k
views
MPLAB X __delay_ms() hangs on PIC16F77A
I'm trying to use the __delay_ms() function to make an LED blink on the PIC16F77A.
The reason I think it stalls on the __delay_ms() function is because whatever I set RB0 to before the delay ...
0
votes
2
answers
806
views
Interrupt works only once - PIC16F877a
In my code, I have two interruptions, one is coming from the overflow of the TMR0, and the other one is when a button is pressed.
this is the code in MikroC :
...
0
votes
2
answers
137
views
About PIC programming
Hi friends iam new to PIC programming , I'm coding my pic in mikroC pro , please help me out.. iam attaching my file with this!the code i want is message from transceiver should receiver and check ...
0
votes
0
answers
733
views
PWM Calculation on PIC16F877
I have an assignment where the PIC is clocked at 16kHz and the output of the the PWM has to be on channel two. The PWM frequency has to be 400Hz and the duty cycle is 10%
Following the manual I ...
-1
votes
1
answer
916
views
Simple LED Blinking project - PIC16F877A microController problem
I am trying to simply blink an led light using pic16f877a microcontroller. softwares i am using are, MPLABX IDE, MPLAB IPE and XC8 compiler. I use Pickit 3.5 programmer. My head-aching question is, i ...
0
votes
1
answer
50
views
Getting different values while connecting LM35 with PIC16F877A
I am getting different values while giving LM35 output as input to ADC (Pin RA0/AN0) PIC16F877A.
I am not providing any Reference voltage to the microcontroller. I want to make sure that is the ...
2
votes
1
answer
464
views
PIC16F877A don't work properly - led blink and 7 segment display problem
I'm trying to control a 7 segment display using PIC16F877A. I'm programming my PIC with a replica PICKIT 3.
I'm uploading my hex code using PICKIT 3 software and MPLABX IDE. I have no problem while I'...
1
vote
1
answer
5k
views
Programming PIC16F877a using PICKIT3
I'm trying to program a pic16f877a using PICKIT3 and MPLAB without success.
I'm powering the pic with the pickit.
I verified the connections almost 20 times, everythings plugged at the right place , ...
1
vote
1
answer
247
views
While loop instructions in pic disassemby not clear
In an efford to save space I try to reduce the generated C code with inline asm("");
Looking at the original disassembly and good working code I do not understand line 0x17E4.
void MENU_BUTTON(...