Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[MOVED] Falling edge detection code for PIC16F877A and MikroC Compiler

Joined
Nov 28, 2023
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Location
Rawalpindi Pakistan
Activity points
16
I am using the Counter on Button and Count on depressing the button, which means on falling edge. After lots of searching and different experiments, I have done it.
MikroC code chunk:
while(1)
{// UP counting using Falling Edge
led=0;
if(up==1){up_pr++;}
if(up==0 && up_pr>=1){count++;led=1;Delay_ms(100);up_pr=0;}

for more details, You can Visit this Link

The falling edge detection code for PIC16F877A and MikroC Compiler

 

Attachments

  • falling edge.PNG
    falling edge.PNG
    802.7 KB · Views: 50
  • falling edge 1.png
    falling edge 1.png
    677.6 KB · Views: 47
Hi,

almost any microcontroller can count falling edge events without the use of software.
Much faster than the software can do. And the microcontroler can in parallel perform other tasks like communication, display...

Besides this... what is your question?

Klaus
 

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top