Hi all,
im a newbie here, so please excuse me if this question's already been asked.
As part of my current project, im trying to display a 16 bit counter value on to the LCD. It has to be converted from hex to BCD , n then to ascii (obviously) before sending to LCD. I know there are two ways to write it- using Embedded C or ASM. my questions are:
1) could anyone tell me if there is going to be a huge difference in the code length between the two methods?
2) I have just started working on a ASM approach which seems to be quite lengthy. But i don't mind doing it, as long as it'll reduce my end HEX-file's (the one to burn on chip) size. Anyone know about this?
3) If any of you have already done this, could you please help me out with the principle or pass me your code?
NOTE: I have taken care of the ascii part. I have also written a program to convert from 16 bit hex to unpacked BCD. This isn't what i want. Im looking to convert 16bit hex to packed BCD(so that i can send it to the ascii routine to display on the LCD).
Cheerio!
im a newbie here, so please excuse me if this question's already been asked.
As part of my current project, im trying to display a 16 bit counter value on to the LCD. It has to be converted from hex to BCD , n then to ascii (obviously) before sending to LCD. I know there are two ways to write it- using Embedded C or ASM. my questions are:
1) could anyone tell me if there is going to be a huge difference in the code length between the two methods?
2) I have just started working on a ASM approach which seems to be quite lengthy. But i don't mind doing it, as long as it'll reduce my end HEX-file's (the one to burn on chip) size. Anyone know about this?
3) If any of you have already done this, could you please help me out with the principle or pass me your code?
NOTE: I have taken care of the ascii part. I have also written a program to convert from 16 bit hex to unpacked BCD. This isn't what i want. Im looking to convert 16bit hex to packed BCD(so that i can send it to the ascii routine to display on the LCD).
Cheerio!