[51] using backspace option

Status
Not open for further replies.

gauravkothari23

Advanced Member level 2
Joined
Mar 21, 2015
Messages
644
Helped
5
Reputation
10
Reaction score
4
Trophy points
1,298
Visit site
Activity points
6,950
Hi friends.
Can anybody please help for using backspace option. i have made a small project in which i have used 16x2 character lcd and 4x4 matrix keypad. output is nothing but only the numbers pressed in keypad will be shown on screen. i want to use a backspace button.
pleaee help me.
 

probably the simplest way is to keep a copy of the strings you have written to the lcd (as char arrays with 16 characters) and as keys are pressed update the string and then write the 16 characters to the LCD
otherwise note the column you have last written to on the LCD and when you get a backspace move one column back and write space over the last character (taking care not to move back past column 1)
 

sorry....did not get u
consider 1 line of the LCD define an array char line1[16]={' '};
1. as the keypad is hit
if a printable character add to line1[] taking care not to overrun the array
if backspace replace last character with ' ' (taking care not to got past first character)
2. write line1[] to the LCD
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…