How to add numbers in lcd on avr (atmega16)?
what lcd? You'll need to be a bit more precise with your question
You need to tell us a lot more. Don't expect us to gaze into a crystal ball and to know exactly what you're asking.
So, you've got a 16x2 lcd - which one? Link to product page?
What code are you using to talk to it?
How have you wired it?
What have you done so far? Have you got it to display anything yet?
A zillion people have probably done exactly the same thing as what you want to do and posted it onto the internet. Have you searched?
Do you mean, "how to display numbers" ?
Note that using an LCD does require you to be familiar with a number of basic concepts in both general programming, and microcontrollers in general.
It seems that you need to spend some time on these basics before starting with an LCD: https://www.avrfreaks.net/commen...
See Tip #6 for some more "Getting Started" tips ...
The two C functions usually used for converting binary values to a human displayable form (ASCII digits) are either itoa() (that is Integer TO Ascii) or just use sprintf() with %d or %u. In either case you end up with a "string" (or rather a character array). You probably already will have an LCD_printchar() style function for driving your LCD so if the LCD support does not already offer LCD_printstring() then you can create it by repeatedly calling LCD_printchar() for each character in the string until you reach the 0x00 at the end.
© 2018 Microchip Technology Inc.