= Mobile LCD = [[PageOutline]] This is a 130x130 pixel Mobile LCD with a serial interface. It can be used to display text and graphics through the experimental library provided. * LCD available from Sparkfun Electronics [http://www.sparkfun.com/commerce/product_info.php?products_id=600 LCD Breakout Board] == Hello World! == * Connect your Mobile LCD according to the schematic and photo below * Try out this hello world example: * [http://mbed.org/users/simon/programs/16mhsD MobileLCD Hello World!] * If the Mobile LCD is wired correctly, it will display "Hello World!". If it does not, check your wiring against the schematic/photo || [[Image(source:/MobileLCD/doc/MobileLCDSchematic1.png, title="Mobile LCD Schematic", nolink)]] || [[Image(source:/MobileLCD/doc/MobileLCDPhoto.jpg, title="MobileLCD Photo", nolink)]] || || ''Schematic'' || ''Photo'' || == Software == Before you can use the Mobile LCD in your own program, you must import the library. One way is to pull in the Hello World, of you can right-click the program you are working on, select "Import Library..." and use cut and paste to insert the following details: * http://mbed.co.uk/projects/cookbook/svn/MobileLCD/trunk When you have the "Hello World", try creating your own program in the compiler, using the source code below as a reference. {{{ #include "mbed.h" #include "MobileLCD.h" MobileLCD lcd(p5, p6, p7, p8, p9); int main() { lcd.printf("Hello World!"); } }}} == Hardware == || [[Image(source:/MobileLCD/doc/MobileLCDInterface.png, title="MobileLCD Interface", nolink)]] || [[Image(source:/MobileLCD/doc/MobileLCDProduct.jpg, title="MobileLCD Product", nolink)]] || == Resources == ''' Datasheets ''' * [http://www.sparkfun.com/datasheets/LCD/ColorLCD-Carrier-Datasheet.pdf Carrier PCB Datasheet] * [http://www.sparkfun.com/datasheets/LCD/ColorLCD-Carrier-Schematic.pdf Carrier PCB Schematics] {{{ #!comment ''' PCB Library and Footprint ''' The Eagle PCB repsitory can be found at the [wiki:Eagle] page. The Library for the MobileLCD is * [source:/Eagle/lbr/MobileLCD.lbr MobileLCD.lbr] ----- }}} == More Examples == ''' Drawing Example ''' Here is an example where we take the screen, which is 130x130 pixels, and divide it into four quadrants. We then cycle round each quadrant in turn forever, filling it with a random colour. {{{ #include "mbed.h" #include "MobileLCD.h" MobileLCD lcd(p5, p6, p7, p8, p9); int main(){ while (1){ lcd.fill(0,0,65,65,rand()); lcd.fill(64,0,65,65,rand()); lcd.fill(0,64,65,65,rand()); lcd.fill(64,64,65,65,rand()); wait (0.2); } } }}} == MOD-NOKIA6610 == A module similar to the sparkfun one, by olimex, available at Cool Components * http://www.coolcomponents.co.uk/catalog/product_info.php?cPath=24&products_id=147 * Datasheet: http://www.coolcomponents.co.uk/resources/MODLCD6610/S1D15G00_REV1_0.pdf Summary: older driver, annoying form factor for breadboarding, has both pins and cable mount [[Image(source:MobileLCD/doc/MOD-NOKIA6610.jpg, 50%)]] This seems to use an Epson 15G00 driver (rather than 15G10) - this means it only supports 12-bit mode, unlike the ones from sparkfun which support the 16bit colour protocol. Apparently, GE-8 stickers usually mean Epson driver. A test library for MOD-NOKIA6610 * http://mbed.co.uk/projects/cookbook/svn/MobileLCD/tests/MobileLCD [[Image(source:MobileLCD/doc/MOD-NOKIA6610-Hello.jpg, 50%)]] {{{ #include "mbed.h" #include "MobileLCD.h" MobileLCD lcd(p5, p6, p7, p8, p9); int main() { lcd.background(0x0000FF); lcd.cls(); lcd.fill(2, 51, 128, 10, 0x00FF00); lcd.fill(50, 1, 10, 128, 0xFF0000); lcd.locate(0,3); lcd.printf("Hello World!"); for(int i=0; i<130; i++) { lcd.pixel(i, 80 + sin((float)i / 5.0)*10, 0x000000); } } }}}