Weighing Scale

I am an engineering student, i want to design a digital kitchen weighing scale with calories Calculator, as my mini project.

main components:
load cell sensor(5kg, resolution 2g)
8051
12-bit ADC
3x4 matrix keypad

Here is my questions
Can you give me example on how to write the program, so that when the user entered the foodcode through keypad, the calories values will be retrieved and used for the calories calculations.
each food code has an equivalent calories values.

Foodcode Calories values 01 63
02 10
03 70
04 68

an example is shown below.

number entered from keypad [03] is == to foodcode(03) with cal value of 70.

I only need the calories value for my calculations

the calories are calculated by multiplying the weight of the food with its calories values

Cals = weight of the foodcode * calorie value

i got a table with list of foods and their calorie values example

Thank you very much for your help

More questions in this forum