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.

Experience: We u<strong>se</strong> this LCD in I2C mode – SO we only u<strong>se</strong> the 4 pin connector marked with(GND-SCL- SDA-VCC) .Leave the mode jumper open and we do not connect a keypad.Serial/I2C Mode <strong>se</strong>lectionA single jumper link is u<strong>se</strong>d to <strong>se</strong>lect Serial or I2C mode. When the jumper is pre<strong>se</strong>nt (factorydefault) the module is in <strong>se</strong>rial mode. When the jumper is removed the module is in I2Cmode. The mode jumper is only checked as part of the power-up <strong>se</strong>quence, so make surethe display is off before changing modes. If you change the link position while the module ispowered, nothing will change until next time you switch on.FIFOBecau<strong>se</strong> the I2C communications operate faster than the display can accept data, allcommands and text you <strong>se</strong>nd to the display are placed in the FIFO (First In, First Out) buffer.This data is <strong>se</strong>nt to the display as fast as it will accept it. The FIFO is 64 bytes in length andthe number of free bytes can be returned in either mode. When <strong>se</strong>nding lots of text to thedisplay, you should check the number of free bytes so you don't overflow the buffer. If thebuffer does overflow, the excess bytes are ignored.I2C OperationI2C BusThe I2C display is located on the I2C bus at an address of 0XC6. The SCL and SDA lines shouldhave pull-up resistors on them somewhere on the bus. You only require 1 pair of resistorsfor the whole I2C bus, not specifically for the LCD03. They are already on the mastercontroller. Anything between 1k8 and 10k should work. We u<strong>se</strong>d 1k8 for best noi<strong>se</strong>immunity.Display control commandsThe LCD03 has four registers, three of which are read only information registers. Register 0 isa dual purpo<strong>se</strong> register, when written, it is the command register where all of theBart Huyskens <strong>Manual</strong> <strong>Elektor</strong> <strong>Proton</strong> V1.0 3 April 2011 49

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

Saved successfully!

Ooh no, something went wrong!