hemnath
Advanced Member level 3
- Joined
- Jun 24, 2012
- Messages
- 702
- Helped
- 61
- Reputation
- 120
- Reaction score
- 57
- Trophy points
- 1,308
- Location
- Chennai
- Activity points
- 6,589
Using, PIC 18F2520, CCS C Compiler, 6.144 Mhz crystal,
unsigned char UNITS[7][16] = {"PRESSURE ", "TEMPERATURE ", "LEVEL ", "VOLUME ", "FLOW ", "FREQUENCY ", "PERCENTAGE "};
unsigned char PRESSURE[9][16] = { "BAR ", "mbar ", "psi ", "KSC ", "cmWC ", "mmWC ", "inWC ", "KPa ", "Mpa "};
like this i have declared many variables, for temperature, level, volume, flow, frequency, percentage....
void main()
{
while(1)
{
if(button_pressed)
{
i++;
printf(lcd_data,"%s",units);// print the string on LCD
// conditional checking and printing the string.
}
}
}
Above shown is sample program. When i declared like this, my RAM memory gets 90%. Is there any other possible methods to print the string on LCD.
Tried using switch, but the program very large.
need help.
Thanks in advance
unsigned char UNITS[7][16] = {"PRESSURE ", "TEMPERATURE ", "LEVEL ", "VOLUME ", "FLOW ", "FREQUENCY ", "PERCENTAGE "};
unsigned char PRESSURE[9][16] = { "BAR ", "mbar ", "psi ", "KSC ", "cmWC ", "mmWC ", "inWC ", "KPa ", "Mpa "};
like this i have declared many variables, for temperature, level, volume, flow, frequency, percentage....
void main()
{
while(1)
{
if(button_pressed)
{
i++;
printf(lcd_data,"%s",units);// print the string on LCD
// conditional checking and printing the string.
}
}
}
Above shown is sample program. When i declared like this, my RAM memory gets 90%. Is there any other possible methods to print the string on LCD.
Tried using switch, but the program very large.
need help.
Thanks in advance