8051 based project That can save up to 60 codes with max of 6 combination of numbers
Onyot. We are here to help u. Majoka is my teacher here . Dont worry. Lol hehe
first decide that u want to work on lcd or 7-segment then focus on that
hiunsigned char displayb [4][3]={1,2,3, 4,5,6,7,8,9, 0,0,0}
here u r going to declare array of 4*3
4 rows and 3 column array no need here
simply dounsigned char code displayb[]="123456789000";
if u want two seperate passwords then
unsigned char code displaya[]="12345";
unsigned char code displayb[]="6789000";
as reference to ur 7-seg multiplexing schmetic u r right there
code will enable the piece to display using transistorsmajoka
Majoka, I think you misunderstood it, the displayb is a variable for the display, not for the password.
unsigned char keypad[4][3]= { '1', '2', '3', '4', '5', '6', '7', '8', '9', '*', '0', '#'}; unsigned char displayb[4][3]= { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0, 0 , 0}; unsigned char code password[5]= "12345";
what does it mean?
Majoka, I think you misunderstood it, the displayb is a variable for the display, not for the password.onyot.josephian
hi onyot, displayb is just only a variable u can use any word to name your array..
if you want to use LCD then study first the tutorial for LCD in the tutorial section..
here is the link I studied before
LCD Interfacing tutorial
Majoka, I think you misunderstood it, the displayb is a variable for the display, not for the password.
if is is variable then declare it as its data type
unsigned char displayb;
unsigned int displayb;
etc
in case of array it should has some dimensions
now as u write
unsigned char displayb [4][3]={1,2,3, 4,5,6,7,8,9, 0,0,0}
it can not be a variable its an array name
[ Edited Thu Nov 25 2010, 10:58 am ]
keep remember 2 things
lcd can display ascii characters let say u want to display 3 then u has to send 0x33
0x33 means 33 in hex it is an ascii of 3
when u want to use 7 segments
there r two options
1) use decoder ic
2) use programming
when u use decoder ic u just insert input to this ic as 1,2,3,4.....
whenu do programming then no need to ude decoder all alogo is done in coding
here romel use decoder ic
when u send binary of 1 to ic it display 1 on 7 seg
when u send binary of 2 to ic it display 2 on 7 seg
and so on
now romel use two array 1 has ascii values of 0 to 9 that is keypad[4][3]
'3' means ascii of 3 mean 00110011
simple 3 means binary 3 mean 00000011
this array is used for lcd display but romel not use lcd
he use this array valuse as aa password one key 1 or 2 presses an ascii of 1 or 2 is stored in memory locations
later on these compared with password string is it equal or not
string also has ascii characters
unsigned char password[]="12345";
it is in fact 0x31 , 0x32 , 0x33 , 0x34 , 0x35
unsigned char keypad[4][3]= { '1', '2', '3',
'4', '5', '6',
'7', '8', '9',
'*', '0', '#'};
this array is used to display values on port decoder is attach to port that will decode it
unsigned char displayb[4][3]= { 1 , 2 , 3 ,
4 , 5 , 6 ,
7 , 8 , 9 ,
0, 0 , 0};
[ Edited Thu Nov 25 2010, 12:08 pm ]
[ Edited Thu Nov 25 2010, 12:23 pm ]
so, is it mean that the program I have is not suitable for LCD interfacing? Should I make another program for the LCD?
yes ur right
this is a complete step by step LCD tutorial read it
http://www.8051projects.net/lcd-interfacing/