Discussion in "Project Doubts" started by    onyot    Nov 23, 2010.
Wed Nov 24 2010, 06:30 pm
#51
hi onyot, see the post of majoka. In declaring password n ur system u dont need to use multidementional array just a simple array with string inside.

Onyot. We are here to help u. Majoka is my teacher here . Dont worry. Lol hehe
Wed Nov 24 2010, 11:24 pm
#52
hi Onyot
first decide that u want to work on lcd or 7-segment then focus on that
 romel_emperado like this.
Thu Nov 25 2010, 06:15 am
#53
I think it is better to use LCD but, romel, the program that you gave, is it an LCD compatible program? or is it a 7segment?
Thu Nov 25 2010, 06:23 am
#54


hi

unsigned 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 do

unsigned 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 transistors

majoka



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?
Thu Nov 25 2010, 10:29 am
#55




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
Thu Nov 25 2010, 10:57 am
#56
hi onyot.josephian

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 ]
Thu Nov 25 2010, 11:50 am
#57
yeah I think so..... sorry I am just pressure that is why I have so many questions. if you already saw the original program, there is a unsigned char keypad and unsigned char displayb what are their functions? especially the unsigned char displayb, i didn't understand it..... will you give me further explanation?
Thu Nov 25 2010, 12:06 pm
#58
hi onyot.josephian
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 ]
 onyot.josephian like this.
Thu Nov 25 2010, 12:21 pm
#59
sir majoka, I have decided to use LCD, so, is it mean that the program I have is not suitable for LCD interfacing? Should I make another program for the LCD? For you sir, which of one is easy to understand, and to use, is it LCD or 6 pieces of 7segment?


[ Edited Thu Nov 25 2010, 12:23 pm ]
Thu Nov 25 2010, 12:26 pm
#60
hello onyot.josephian

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/

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Lewisuhakeply
Thu Apr 18 2024, 06:00 pm
Darrellciz
Thu Apr 18 2024, 11:07 am
Charlessber
Thu Apr 18 2024, 09:29 am
BartonSem
Thu Apr 18 2024, 04:56 am
DonaldKnown
Thu Apr 18 2024, 12:24 am
utaletxcyw
Wed Apr 17 2024, 10:21 am
Anthonyvab
Wed Apr 17 2024, 08:48 am
RobertCix
Wed Apr 17 2024, 06:46 am