Questions tagged [pic16f877a]
8-Bit microcontroller from microchip
30
questions
0
votes
2
answers
61
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
32
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
127
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
114
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 ...
0
votes
0
answers
64
views
Why timer (tmr2) calculated for a 1 sec delay produces a much higher delay when running a clock
Below is the code I used using TMR2 to display a clock. I calculated the parameters required so TMR2 will give a 1 sec delay.
However, I noticed the pin enable delay function ...
4
votes
2
answers
871
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
157
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
78
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
710
views
Buzzer circuit problem in Proteus
In this circuit, the buzzer should sound when the button is pressed.
...
0
votes
1
answer
77
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
82
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
175
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
164
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
31
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
160
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
79
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
352
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
162
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 ...
1
vote
4
answers
3k
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
66
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
1k
views
"Not enough RAM " error in PIC16F877a
I have been trying to run the following code:
...
0
votes
1
answer
945
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
555
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
119
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
556
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
791
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
42
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
370
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
4k
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
195
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(...