EasyManua.ls Logo

Texas Instruments MSP430

Texas Instruments MSP430
413 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
315
/* USER CODE START (section: RTC_B_graceInit_epilogue) */
/* User code */
/* USER CODE END (section: RTC_B_graceInit_epilogue) */
}
void show_value(unsigned char x_pos, unsigned char y_pos, unsigned char value)
{
char chr = 0;
chr = ((value / 10) + 0x30);
LCD_goto(x_pos, y_pos);
LCD_putchar(chr);
chr = ((value % 10) + 0x30);
LCD_goto((x_pos + 1), y_pos);
LCD_putchar(chr);
}
void display_time(void)
{
LCD_goto(6, 1);
LCD_putchar(' ');
LCD_goto(9, 1);
LCD_putchar(' ');
delay_ms(450);
show_value(7, 1, rtc.hr);
show_value(10, 1, rtc.min);
show_value(4, 1, rtc.sec);
LCD_goto(6, 1);
LCD_putchar(':');
LCD_goto(9, 1);
LCD_putchar(':');
delay_ms(450);
}
Simulation
DS1307 simulation encountered some weird issues but it does work.

Table of Contents

Other manuals for Texas Instruments MSP430

Related product manuals