EasyManuals Logo

Texas Instruments MSP430 User Manual

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
Page #362 background imageLoading...
Page #362 background image
362
}
void lcd_symbol(void)
{
unsigned char s = 0;
LCD_send(0x40, CMD);
for(s = 0; s < 8; s++)
{
LCD_send(symbol[s], DAT);
}
LCD_send(0x80, CMD);
}
void print_C(unsigned char x_pos, unsigned char y_pos, signed int value)
{
char ch[5] = {0x20, 0x20, 0x20, 0x20, '\0'};
if(value < 0x00)
{
ch[0] = 0x2D;
value = -value;
}
else
{
ch[0] = 0x20;
}
if((value > 99) && (value <= 999))
{
ch[1] = ((value / 100) + 0x30);
ch[2] = (((value % 100) / 10) + 0x30);
ch[3] = ((value % 10) + 0x30);
}
else if((value > 9) && (value <= 99))
{
ch[1] = (((value % 100) / 10) + 0x30);
ch[2] = ((value % 10) + 0x30);
ch[3] = 0x20;
}
else if((value >= 0) && (value <= 9))
{
ch[1] = ((value % 10) + 0x30);
ch[2] = 0x20;
ch[3] = 0x20;
}
LCD_goto(x_pos, y_pos);
LCD_putstr(ch);
}
void print_I(unsigned char x_pos, unsigned char y_pos, signed long value)
{
char ch[7] = {0x20, 0x20, 0x20, 0x20, 0x20, 0x20, '\0'};

Table of Contents

Other manuals for Texas Instruments MSP430

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments MSP430 and is the answer not in the manual?

Texas Instruments MSP430 Specifications

General IconGeneral
BrandTexas Instruments
ModelMSP430
CategoryMicrocontrollers
LanguageEnglish

Related product manuals