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.

[AVR] How to make 4x4 as keymodifiers

Status
Not open for further replies.

Madhurakshi B S

Newbie level 6
Joined
Mar 15, 2021
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
3
Activity points
153
Good Morning Sir/ Madam,

I am working on project to weigh loads. This project needs use of 4x4 keypad where few keys needs to be used as special keys that is same key for both numeric and arrow keys or numeric keys and predefined function like configuring the load cell. In Arduino there is a function called keyboard.press(). I don't know whether this function can be used or not.

Please Do guide me and give me right reference book or links wherein I can study the coding the keys of keypad to perform different functions like arrow keys, shift keys and modifying same key to do two different functions has shared with in the above lines. Because reading many websites for the same i am confused.

Thank you
Madhurakshi B S
 

Hi,

Form your post it is not clear whether you want to design or modify a weigh scale.
It's no clear to me whether you want to read out a keypad, or you want to "control" a keypad (with Arduino to emulate key press).

The Arduino keyboard function is to read out a matrix keypad.
Each function has (at leas should have) a documentation where you can read how it works, how it needs to be connected ... and so on. Read this documentation.

And it's not clear to wether your question is more hardware related or software related.
If you want to write software: the first thing is to write down your requirements, draw a flow chart, or draw a state chart, define tining functions...

Klaus
 
When you find you must make keys do double duty, it's a sign you might need more keys (hence a bigger keyboard).

In conventional programming the keyboard sends ASCII codes. Your 4x4 keypad may be different in the sense it's a grid of 16 switches or diodes and thus may need a detailed routine to read. There's the chance that two keys might be pressed at the same time unintentionally, which is something your code must recognize and handle without a problem.

Then you write a function to accept a keypress (or ascii number), then branch to a routine which acts in a fashion custom designed by you.

There are a few functions for reading Shift, Option, cursor up-down-left-right, etc. These require that you get very familiar with the command set.

Your code must recognize whether some key was pressed before another key. This complicates your job of coding and writing instructions how to operate the keypad. Because if it requires special knowledge to operate it, you'll need to post instructions beside it.
 
Good Evening Sir/Madam,

Firstly I am very much thankful to both of your response with detailed description.

I am working on a project with measure load of an object. This project has LCD for display as output, 4x4 keypad matrix as input and load cell as measuring instrument.

In 4x4 keypad matrix in need to enter password, perform setting, configuring the load to calibrate the readings and do taring operation.

these many operations has to done by inputting the data through 4x4 keypad.

so i need to use keypad as both alpanuberic.

so please give me guildlines.

thank you
madhurakshi B S
 

Reserve one or more keys as a 'shift' control, like a computer keyboard has two characters on some keys. With only 16 keys in total, you still have enough to enter 0 - 9 and you can use the rest as the shift and dual functions.

As most 4x4 keypads are matrixed, is sometimes isn't possible for the rest of the keys to function if one key is held down so you might have to use 'shift' as a toggle control, one press for one function, a second press for the second function, a third press returning to the first function again.

Brian.
 
you would try like # for mode operation, where in normal operation # is not used, if # key is pressed, you go into another subroutine where multifunction operation can me done, here you can use same pin for multiple purpose operation. and you must activate fault key press system, where you upon pressing # key it goes to certain multipurpose function subroutine, after pressing #, if key is not pressed it has to come out of that multipurpose subroutine with time out.. for each multipurpose operation you have to press #key , for easy coding option.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top