August 09, 2010 by kle8309 Can anyone explain how does or why we use a integer16 (16 bits)lcd write function to write a uint8_t (8 bits). A different question but isn't it a bad idea to short the pin when connecting the switch to ground. It draws about 85mA of current when I measured it. Is there is safer way to do it. int main() { // start up the LCD lcd_init(); lcd_home(); // Set the 6 pins to input mode - Two 3 bit numbers DDRC &= ~(1<> PC0; a2 = (PINC & (1<> PC1; a3 = (PINC & (1<> PC2; b1 = (PINC & (1<> PC3; b2 = (PINC & (1<> PC4; b3 = (PINC & (1<> PC5; lcd_home(); lcd_write_string(PSTR("Adding: ")); lcd_write_int16((a1<<2) + (a2<<1) + a3); lcd_write_data('+'); lcd_write_int16((b1<<2) + (b2<<1) + b3); lcd_write_string(PSTR(" ")); lcd_line_two(); lcd_write_string(PSTR("Equals: ")); lcd_write_int16( ((a1<<2) + (a2<<1) + a3) + ((b1<<2) + (b2<<1) + b3) ); lcd_write_string(PSTR(" ")); //delay_ms(500); `````` } return 0; } Hi kle8309, When you attempt to call a function that takes a 16 bit integer with an 8 bit integer the 8 bit integer is cast into a 16 bit integer when it gets passed to the function. Seeing as most of the time we use either 16 bit or 8 bit integers we just made one lcd_write_int16() function and use it for both. Hope that answers your question. Humberto Thanks Humberto!