[SOLVED] Lcd backlight control with button

Status
Not open for further replies.

shahbaz.ele

Advanced Member level 1
Joined
Aug 12, 2008
Messages
454
Helped
72
Reputation
146
Reaction score
73
Trophy points
1,308
Location
Islamabad, Pakistan
Activity points
3,669
Dear all
I am using 16x2 LCD with ATmega32 microcontroller.
I need to save my power so I want that LCD back light should remain OFF during day time and when it is needed I should have switch to ON it.
the two intrrupts are busy in my circuit.
can I add a button (ON-OFF switch for it directly connected to 15 and 16 pin with supply.
 

LCD backlight could be ON and OFF with a switch directly, but it is not recommended you have to write a programme through third intrrupt nad add transistor to ON back light.
 
shahbaz.ele said:
the two intrrupts are busy in my circuit.
I don't see a reason why an interrupt should be used. You could do that with polling method, that is read it every some ms and debounce it. Actually I think it is better this way. You are OK without interrupt don't worry about it.
 

LCD backlight could be ON and OFF with a switch directly, but it is not recommended you have to write a programme through third intrrupt nad add transistor to ON back light.

why not? could you please explain in detail..
 

@kamranravian, can you explain why switching backlight with a switch is not recommended?

As for the interrupts, the interrupts are powerful weapon in uC's so should not be wasted for silly things.
 

ZASto thanks for your comments
I mean to say normally you should use uC for switching BL.
you can also directlly do by on-off button.
 

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…