Interrupt Handling Application in PIC16F877 in Hi-Tech C

Status
Not open for further replies.

ecaits

Member level 4
Joined
Jan 16, 2014
Messages
76
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Visit site
Activity points
579
I have used 3 analog input (0-5V) through pin RA0, RA5 and RE0 (in terms of three parameter like pressure, TDS and Turbidity) and I am displaying output of ADC on LCD at interval of few second each in PIC16F877 using hi-tech compiler.

Now during scrolling of parameter, I want to hold the current parameter by pressing one switch and by using another switch called Reset, I want to again scroll the parameter on LCD at interval of few second.

I think that I have to use external interrupt but I dont know how to implement it.

I have attached code for your reference.

Plz suggest me that how can I implement the code.

Waiting for your support,

Thank you in advance.
 

Attachments

  • interrupt.txt
    7.2 KB · Views: 55
Last edited:

The interrupt would be the correct route. You can wire the switch up to the RB0 port for the interrupt interaction and classify it as falling or rising trigger depending on how you wire the switch. You would right your interrupt routine to do the scrolling. The only problem is the two switch system. I can't recall how many interrupts are on the PIC16F877 so I would check that. You could also do this with one switch to do all the functions based on how many clicks.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…