Discussion in "Project Help" started by    Deepakvaishu    Mar 20, 2017.
Mon Mar 20 2017, 08:24 AM
#1
hello,
I am using a keypad to type the text message,I am using a 8051 microcontroller and a 4X4 matrix keypad . I tried too much,But not getting the exact logic to use a single key to type 3 different alphabets ,eg key 1 is used to type a, b, c depending upon the number of times the key is pressed.
I have used a variable 'count ' to check the number of times key pressed, again I have to display the letter on the lcd .....plz give me the idea how actually the multiple letters are identified depending upon the key pressed.
Since the Col are input(1) and Row are output(0).
Is the key released() before it is pressed second time to print the 'b' letter,
Plz help for the coding of this program.

Tue Mar 21 2017, 02:55 PM
#2
HI,
There are two ways I'd tackle thiss.

Key down only - Use a timer and have 3 consecutive time slots - read 1=character, If read 2 = read 1 then use second character on the key, If read 3 also= reads 1 and 2 use third character associated with that key, read 4 resets read counter and goes back to character 1.

Key up then down - Read matrix, use character, start a timer on key up, if timer not run out and read 2=read 1 then use second character on that key. etc.

Hope that helps.
Steve



Thu Mar 23 2017, 05:34 AM
#3
hello,
I can type the letters now when the particular key is pressed.But the problem now I am facing is that when the same key is pressed twice after a long delay I want the second letter to be printed to the adjacent position, How to recognise that the delay is more and the key should be printed at the next position on lcd.
How should recognise the delaybetween two keys pressed..If the delay is more than I want to increament the position on my lcd...
Plz help.

Deepakvaishu
Thu Mar 23 2017, 09:14 PM
#4
You have largely answered your own question.
Use one of the timers to track time, say in 10mS counts.
Note the count each time a key is pressed.
Calculate the interval.
A short interval is to select values for the same key.
A long interval is a new selection.


[ Edited Fri Mar 24 2017, 01:34 AM ]
 Deepakvaishu like this.
Fri Mar 24 2017, 05:22 AM
#5
Hi,
I got that we should use timer......But I am a little bit confused that we can use timer to create the delay of particular time interval....But I really dont know , how to track the time ?
I am new in this field...should I use a timer as a counter to count the delay?
plz help.
Fri Mar 24 2017, 06:05 PM
#6
The best way is to use an interrupt to run the counter.
What software are you using ?
Sat Mar 25 2017, 07:59 AM
#7
I am using Keil and 8051 microcontroller
Sat Mar 25 2017, 09:49 PM
#8
I have attached code showing one method you could use.
It deals with timing, you will have to add the code to
scan a matrix to read a key.


Attachment


[ Edited Sat Mar 25 2017, 09:53 PM ]

Get Social

Information

Powered by e107 Forum System

Conversation

ExperimenterUK
Sat Mar 25 2017, 09:56 PM
@Noreen I suggest you log in and post a full description of what you need in our PIC forum
Sat Mar 25 2017, 03:10 PM
Noreen
Hello I worked on a project related to Wireless Electricity theft detection using GSM during my bachelors. I used Nokia 6230 for sending sms using AT commands. I chose to work with SMS text mode. The microcontroller I used was PIC16F877A and its software coding done through PIC Basic Pro. Unfortunately, I lost my account password and do not have coding for generation sms using AT commands. I need that coding. Can some one help me to provide complete Pic Basic Pro code. In which step by step guidance is given so that I can understand easily. Regards,
Wed Mar 22 2017, 09:13 PM
ajay kumar
help me nokia lcd light
Wed Feb 22 2017, 06:14 AM
ChollyMo
Indeed, on the LCD tutorial, many missing Tables and figures !!
Wed Feb 22 2017, 06:06 AM
ChollyMo
I don't see any Table 3. I'm using Chrome.
Fri Feb 03 2017, 05:56 AM
irfan shaikh
hi, i want interface WS2811 pixel led using NUVOTON N79E352, but i dont know how to code it. can anyone help me or provide me sample coding for interfacing WS2811 PIXEL LED. THNX
Thu Jan 19 2017, 08:42 PM
abhays
Hi...i have made a circuit for interfacing PT100 with LM358 whose temperature is shown on the LCD...But the temperature is not getting incresed slowly ..a small change directly increses the temp...can any one help me
Thu Jan 19 2017, 04:27 PM
roba
send me alarm clock simulation using proteus software
Mon Jan 16 2017, 03:15 PM
Rutuja
How can we read notepad file using random acess file
Fri Jan 06 2017, 06:18 AM
muhammad Umar
i need cd4047 library file for protious please help me i s

Downloads

Comments

SAUnwin
Tue Mar 21 2017, 02:29 PM
letonarolikah
Mon Mar 20 2017, 11:21 AM
nerodear
Tue Mar 14 2017, 07:08 AM
XuZiling
Wed Feb 22 2017, 02:40 AM
diwakar_96
Thu Feb 16 2017, 02:40 PM
Helia
Thu Feb 09 2017, 09:59 AM
fasihaftab
Sat Jan 28 2017, 08:58 AM
jmunjr
Tue Jan 17 2017, 06:25 PM

Online

Guests: 67, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 37804
Newest member: SAUnwin
Forum Activity
ExperimenterUK Avatar
Posted By ExperimenterUK
Sat Mar 25 2017, 09:49 PM
I have attached code showing one method you could ...
Deepakvaishu Avatar
Posted By Deepakvaishu
Sat Mar 25 2017, 07:59 AM
I am using Keil and 8051 microcontroller
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Mar 24 2017, 06:05 PM
The best way is to use an interrupt to run the cou...
Deepakvaishu Avatar
Posted By Deepakvaishu
Fri Mar 24 2017, 05:22 AM
Hi,I got that we should use timer......But I am a ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Mar 23 2017, 09:14 PM
You have largely answered your own question.Use on...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Mar 23 2017, 07:03 AM
I have looked at your code.I think you are confuse...
Deepakvaishu Avatar
Posted By Deepakvaishu
Thu Mar 23 2017, 05:34 AM
hello,I can type the letters now when the particul...
SAUnwin Avatar
Posted By SAUnwin
Tue Mar 21 2017, 02:55 PM
HI,There are two ways I'd tackle thiss.Key down on...
Deepakvaishu Avatar
Posted By Deepakvaishu
Mon Mar 20 2017, 08:24 AM
hello,I am using a keypad to type the text message...
Helia Avatar
Posted By Helia
Thu Mar 16 2017, 09:15 AM
hi.. the following code is not working on hardware...