I m working on a project implementing a clock using PIC18, LCD, ... etc and I am using mikroC to implement this project.
However, I am not good at C and I am stuck at certain point. The clock has a menu with several options that will enable the user to set time, alarms, alarm sound, etc. The menu has the following:
1. Set Time
2. Add Alarm
3. Select Alarm
4. Add New Tone
5. Select Tone
6. EXIT
The clock has 3 pushbuttons, OK
,RIGHT
, and LEFT
. When the clock power-on, it will show Set Time
on LCD as default. I want to add a feature that when I press RIGHT
pushbutton it should show Add Alarm
but gradually not directly. I have 6 items in the menu so I have to do this gradually movement 12 times (6 for right and 6 for left). I have tried this as follows:
Lcd_Out(2, 2, " set Time ");
Delay_ms(50);
Lcd_Out(2, 2, " set Time ");
Delay_ms(50);
Lcd_Out(2, 2, " set Time ");
Delay_ms(50);
Lcd_Out(2, 2, " et Time ");
Delay_ms(50);
Lcd_Out(2, 2, " t Time ");
Delay_ms(50);
Lcd_Out(2, 2, " Time ");
Delay_ms(50);
Lcd_Out(2, 2, " ime ");
Delay_ms(50);
Lcd_Out(2, 2, " me ");
Delay_ms(50);
Lcd_Out(2, 2, " e ");
Delay_ms(50);
Lcd_Out(2, 2, " ");
Delay_ms(50);
Lcd_Out(2, 2, " ");
Delay_ms(50);
Lcd_Out(2, 2, " ");
Delay_ms(50);
Lcd_Out(2, 2, " ");
Delay_ms(50);
Lcd_Out(2, 2, " A ");
Delay_ms(50);
Lcd_Out(2, 2, " Ad ");
Delay_ms(50);
Lcd_Out(2, 2, " Add ");
Delay_ms(50);
Lcd_Out(2, 2, " Add ");
Delay_ms(50);
Lcd_Out(2, 2, " Add A ");
Delay_ms(50);
Lcd_Out(2, 2, " Add Al ");
Delay_ms(50);
Lcd_Out(2, 2, " Add Ala ");
Delay_ms(50);
Lcd_Out(2, 2, " Add Alar ");
Delay_ms(50);
Lcd_Out(2, 2, " Add Alarm ");
Delay_ms(50);
Lcd_Out(2, 2, " Add Alarm ");
Delay_ms(50);
Lcd_Out(2, 2, " Add Alarm ");
This was one movement and to do the others I need large code while the RAM of the PIC is limited. So, Can you guys help me solving this issue?