Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[51] using backspace option

Status
Not open for further replies.

gauravkothari23

Advanced Member level 2
Joined
Mar 21, 2015
Messages
640
Helped
5
Reputation
10
Reaction score
4
Trophy points
1,298
Activity points
6,922
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top