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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

I2C_TRANSMIT_BYTE(Device_ID); //Transmit Device AddressRetVal = I2C_RECEIVE_BYTE(1); //Read data at addressI2C_STOP();//Stop Transactionreturn RetVal;//Return data}/*************************************************************************LCD FUNCTIONS - LCD FUNCTIONS - LCD FUNCTIONS - LCD FUNCTIONS**************************************************************************///Set the Cursor to a position specified by the next byte, where 1 is the top left and 80 is the bottom rightvoid LCD03_SET_CURSOR(char FCL_CURSOR){I2C_START();I2C_TRANSMIT_BYTE(0xC6);I2C_TRANSMIT_BYTE(0);I2C_TRANSMIT_BYTE(2);}I2C_TRANSMIT_BYTE(FCL_CURSOR);I2C_STOP();//Clears the whole Screenvoid LCD03_CLEAR_SCREEN(){I2C_START();I2C_TRANSMIT_BYTE(0xC6);I2C_TRANSMIT_BYTE(0);I2C_TRANSMIT_BYTE(12);I2C_STOP();}// put backlight onvoid LCD03_BACKLIGHT_ON(){I2C_START();I2C_TRANSMIT_BYTE(0xC6);I2C_TRANSMIT_BYTE(0);I2C_TRANSMIT_BYTE(19);I2C_STOP();}//put backlight offvoid LCD03_BACKLIGHT_OFF(){I2C_START();I2C_TRANSMIT_BYTE(0xC6);I2C_TRANSMIT_BYTE(0);I2C_TRANSMIT_BYTE(20);I2C_STOP();}/*call LCD_WRITE_STRING in main programas follows:char String[20] = "Hello World";Bart Huyskens <strong>Manual</strong> <strong>Elektor</strong> <strong>Proton</strong> V1.0 3 April 2011 166

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

Saved successfully!

Ooh no, something went wrong!