347
0x00, 0x06, 0x09, 0x09, 0x06, 0x00, 0x00, 0x00
};
void GPIO_graceInit(void);
void BCSplus_graceInit(void);
void System_graceInit(void);
void WDTplus_graceInit(void);
void lcd_symbol(void);
void print_C(unsigned char x_pos, unsigned char y_pos, signed int value);
void print_I(unsigned char x_pos, unsigned char y_pos, signed long value);
void print_D(unsigned char x_pos, unsigned char y_pos, signed int value, unsigned
char points);
void print_F(unsigned char x_pos, unsigned char y_pos, float value, unsigned char
points);
void main(void)
{
float t = 0.0;
/* Stop watchdog timer from timing out during initial start-up. */
WDTCTL = WDTPW | WDTHOLD;
/* initialize Config for the MSP430 GPIO */
GPIO_graceInit();
/* initialize Config for the MSP430 2xx family clock systems (BCS) */
BCSplus_graceInit();
/* initialize Config for the MSP430 System Registers */
System_graceInit();
/* initialize Config for the MSP430 WDT+ */
WDTplus_graceInit();
DS18B20_init();
LCD_init();
lcd_symbol();
LCD_goto(1, 0);
LCD_putstr("MSP430 DS18B20");
LCD_goto(0, 1);
LCD_putstr("T/ C");
LCD_goto(2, 1);
LCD_send(0, DAT);
while(1)
{
t = DS18B20_get_temperature();
print_F(9, 1, t, 3);
delay_ms(1000);
};
}
void GPIO_graceInit(void)
{