You can see an example in the video HERE
The above image shows the letter designation for the individual segments a thru h, This is pretty much the same for all seven segment displays. hex values for the code are: a= 0x08; b= 0x40; c= 0x20; d= 0x10; e= 0x08; f= 0x04; g= 0x02; h= 0x01
The LOOP image shows the designated segments that are switched on and off to make the roll animation.
C, D, E, G or 0x20, 0x10, 0x08, 0x02
The code for this is shown below, and is located near the top of iv.c
Code: Select all
#define TIME_SEP_SIZE 4
uint8_t time_sep1[] = {0x20, 0x10, 0x08, 0x02};
uint8_t time_sep2[] = {0x20, 0x10, 0x08, 0x02};
uint8_t time_sep_idx = 0;
#define TIME_SEP_DELAY_MAX 200
uint16_t time_sep_delay = 0;
DELAY_MAX (200) is for time duration
Code: Select all
if(++time_sep_delay >= TIME_SEP_DELAY_MAX) {
time_sep_delay = 0;
if(++time_sep_idx >= TIME_SEP_SIZE) {
time_sep_idx = 0;
}
}
if(displaymode == SHOW_TIME) {
display[3] = time_sep1[time_sep_idx];
display[6] = time_sep2[time_sep_idx];
}
Code: Select all
#define TIME_SEP_SIZE 8
uint8_t time_sep1[] = {0x02, 0x40, 0x80, 0x04, 0x02, 0x20, 0x10, 0x08};
uint8_t time_sep2[] = {0x02, 0x08, 0x10, 0x20, 0x02, 0x04, 0x80, 0x40};
uint8_t time_sep_idx = 0;
#define TIME_SEP_DELAY_MAX 200
uint16_t time_sep_delay = 0;
There are three folders included, one for rolling colons, and one for figure 8, both include full code and hex, so you can just flash and try. The third folder is the original kit hex, just in case you want to flash back. There are two other changes to the code. I removed the leading zero from hours, in 12 hour mode, and I added display time duration to day, date and alarm time of about 2.5 seconds, when corresponding button is pressed. I did try all these, so, everything should be good to go. I compiled in WINAVR.
Russell