8051 c code please!

Status
Not open for further replies.

shanky25

New Member
Hello friends. My task is as follows. Lamps are connected in such away that there is communication between them and a keyboard. The ulimate objectibve of the system is to switch on all the lights during night and switch it off during day. A keyboard interface is also used and should be operated in such a way that pressing a specified key should ultimately turn on the required number of lights. I am using an LDr as a sensor in this circuit. and 8051 as an operating microcontroller. I have assigned port 0 to the lamps to be connected. P1.0 is given to sensor and pins from P1.1 to P1.7 are given to a keyboard. now how can i use this keyboard to turn on the required number of lights would you suggest me the algorithm for this please!
 
When you say keyboard, do you mean keypad. There isn't much of an algorithm, only read the key press and give a certain output.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…