Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

program for Creating look up table for 8051 microcontroller

Status
Not open for further replies.
Hi

I'm doing a project "PREPAID ENERGY METER" . I need to interface a 4×4 keypad with 89c51 .. For this i need to create a look up table .. I dont know to write the program to create a look up table.. can anyone help me, please ??

I'm using Keil software for programming..


-- Kavitha
 
Hi, can you clarify for me - you do not know how to read the lookup table to see which button has beenpressed. Or you dont know how to make the lookup table in the first place.? for a 4x4 matrix, you would only have 16 elements in the table. so you would just enter the codes yourself. no need fora program to generate it.
 
i dnt knw to make the look up table and also dnt knw to read the lokup table to find which key has been pressed...... i dnt knw the codes for that .. I'm new to this ... pls help ..
 
In Keil C, I use an array of values like this, where 'code' puts the data in ROM with the program:

code unsigned char look_up_table[] = {14,23,97,5,18,122,58};// ROM table

Then access the 'nth' value like this:

value=look_up_table[n];

I hope I remembered properly.
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top