12.07.2015 Views

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

void main(){// init AD & Option regANSEL = 0;ANSELH = 0;OPTION = 0xC0;// end of init__delay_ms(250);__delay_ms(250); //wait for stable power supplyI2C_INIT(); // initialize I2C - LCD03 is a I2C LCDunsigned int i = 23456; //32767 is maxunsigned char c = 247;}while (1){LCD03_BACKLIGHT_ON();LCD03_CLEAR_SCREEN();LCD03_SET_CURSOR(3);char String[20] = "Hello World";LCD_WRITE_STRING(String);DELAYSEC();LCD03_SET_CURSOR(23);LCD03_WRITE_INT(i);DELAYSEC();LCD03_SET_CURSOR(43);LCD03_WRITE_BYTE(c);DELAYSEC();LCD03_BACKLIGHT_OFF();DELAYSEC();}int main ( void ){_delay_ms(250);_delay_ms(250); //wait for stable power supplyI2C_INIT(); // initialize I2C - LCD03 is a I2C LCDunsigned int i = 56879;unsigned char c = 247;}while (1){LCD03_BACKLIGHT_ON();LCD03_CLEAR_SCREEN();LCD03_SET_CURSOR(3);LCD03_WRITE_STRING("Hello World!");DELAYSEC();LCD03_SET_CURSOR(23);LCD03_WRITE_INT(i);DELAYSEC();LCD03_SET_CURSOR(43);LCD03_WRITE_BYTE(c);DELAYSEC();LCD03_BACKLIGHT_OFF();DELAYSEC();}Bart Huyskens <strong>Manual</strong> <strong>Elektor</strong> <strong>Proton</strong> V1.0 3 April 2011 47

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!