[PIC] Interrupts in my code. Help me with my project.

Status
Not open for further replies.

FyrewurXedge

Newbie level 5
Joined
Dec 6, 2013
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
78
I am now creating/developing my project in C using PIC16F877A but I don't have any background in using microcontrollers specifically PICs.

I am wondering if I can use interrupts and what it is for.

I want my project to display an idle message in a LCD when no buttons are pressed. and when a button/switch is pressed the LCD screen will display measurements.

For example at idle: LCD DISPLAY - Please press a button.
BUTTON 1 is pressed - The voltage is x.xx value.
(measurement will be display as long the switch/button is on.)
If two buttons are pressed 2 measurements will be displayed after several delay.

If the switch where turned off the welcome message will be displayed again.

Thanks.
 

Use if condition
like
HTML:
if(button==1 or 0){
lcd_clear(); lcd_disp(your desired voltage/message); delay(few seconds);
lcd_clear(); lcd_disp(your welcome message);
 

I'm having a problem in this scenario in VSM. I used the format you've given me, but when turn on and off the button, my circuit doesn't react (the lcd message doesn't change)
 

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…