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.

[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,665
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.
 

kamranravian

Junior Member level 3
Joined
Dec 3, 2010
Messages
26
Helped
16
Reputation
32
Reaction score
16
Trophy points
1,283
Activity points
1,385
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.
 

alexxx

Advanced Member level 4
Joined
Apr 17, 2011
Messages
1,013
Helped
273
Reputation
552
Reaction score
270
Trophy points
1,383
Location
Greece
Activity points
7,938
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.
 

nandhu015

Advanced Member level 5
Joined
Feb 11, 2006
Messages
1,965
Helped
300
Reputation
600
Reaction score
224
Trophy points
1,353
Location
India
Activity points
9,867
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..
 

ZASto

Advanced Member level 3
Joined
Jan 9, 2008
Messages
820
Helped
158
Reputation
321
Reaction score
150
Trophy points
1,323
Location
Messy Corner, 44°47'31.56"N, 20°28'9.16"E
Activity points
5,717
@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.
 

kamranravian

Junior Member level 3
Joined
Dec 3, 2010
Messages
26
Helped
16
Reputation
32
Reaction score
16
Trophy points
1,283
Activity points
1,385
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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top