Search Code
About NokiaLCD

First published 09 Jun 2010, with 3 revisions since.
Last update: 19 Nov 2010.
View history

Last change message: Update to include doxygen documentation

Related to
SpectrumAnalyzer
This is a simple program that displays a spectrum analyzer on the Nokia LCD from an input through a 3.5mm audio jack. It uses FFT\'s to compute the fourier transform ...

MARMEX_OB_oled__HelloWorld
A class library for OLED on MARMEX_OB board. MARY拡張のMARMEX_OB基板のOLEDをmbed+MAPLE基板で動かすためのライブラリです.このサンプルではMAPLEに用意されているMARMEXスロットの1番に搭載したOLEDを制御するようになっています.詳細はCode&APIからソースやAPI詳細をご覧ください
tag MAPLE, MARMEX_OB, MARY, OLED

GMT_counter
mbed Geiger counter


DCF_Digital_Clock_graphic_V10
DCF77 digital clock giveson graphic Nokia 6610 display: @summer or wintertime hour,minute,seconds Day of week Day Month Year

FourInARow_NokiaLCD
Connect Four style game. More information can be found here... http://www.armtronics.com/tag/mbedpg
tag connect four, game, LCD, Nokia LCD

NokiaLCD

Import this library into a program

NokiaLCD

Published 19 Nov 2010, by   user Simon Ford   tag 6100, 6610, mobileLCD, NokiaLCD, Olimex, PCF8833, sparkfun
Embed: (wiki syntax)

« Back to documentation index

NokiaLCD Class Reference

NokiaLCD Class Reference

An interface for the 130x130 Nokia Mobile phone screens. More...

#include <NokiaLCD.h>

Public Types

enum  LCDType { LCD6100, LCD6610 }
 

LCD panel format.

More...

Public Member Functions

 NokiaLCD (PinName mosi, PinName sclk, PinName cs, PinName rst, LCDType type=LCD6100)
 Create and Nokia LCD interface, using a SPI and two DigitalOut interfaces.
int putc (int c)
 Write a character to the LCD.
int printf (const char *format,...)
 Write a formated string to the LCD.
void locate (int column, int row)
 Locate to a screen column and row.
void cls ()
 Clear the screen and locate to 0,0.
void pixel (int x, int y, int colour)
 Set a pixel on te screen.
void fill (int x, int y, int width, int height, int colour)
 Fill an area of the screen.
void foreground (int c)
 Set the foreground colour.
void background (int c)
 Set the background colour.

Detailed Description

An interface for the 130x130 Nokia Mobile phone screens.

 #include "mbed.h"
 #include "NokiaLCD.h"

 NokiaLCD lcd(p5, p7, p8, p9, NokiaLCD::6610); // mosi, sclk, cs, rst, type

 int main() {
     lcd.printf("Hello World!");
 }

Definition at line 41 of file NokiaLCD.h.


Member Enumeration Documentation

enum LCDType

LCD panel format.

Enumerator:
LCD6100 

Nokia 6100, as found on sparkfun board (default).

LCD6610 

Nokia 6610, as found on olimex board.

Definition at line 45 of file NokiaLCD.h.


Constructor & Destructor Documentation

NokiaLCD ( PinName  mosi,
PinName  sclk,
PinName  cs,
PinName  rst,
LCDType  type = LCD6100 
)

Create and Nokia LCD interface, using a SPI and two DigitalOut interfaces.

Parameters:
mosi SPI data out
sclk SPI clock
cs Chip Select (DigitalOut)
rst Reset (DigitalOut)
type The LCDType to select driver chip variants

Definition at line 15 of file NokiaLCD.cpp.


Member Function Documentation

void background ( int  c  ) 

Set the background colour.

Parameters:
c 24-bit colour

Definition at line 420 of file NokiaLCD.cpp.

void cls (  ) 

Clear the screen and locate to 0,0.

Definition at line 286 of file NokiaLCD.cpp.

void fill ( int  x,
int  y,
int  width,
int  height,
int  colour 
)

Fill an area of the screen.

Parameters:
x horizontal position from left
y vertical position from top
width width in pixels
height height in pixels
colour 24-bit colour in format 0x00RRGGBB

Definition at line 312 of file NokiaLCD.cpp.

void foreground ( int  c  ) 

Set the foreground colour.

Parameters:
c 24-bit colour

Definition at line 416 of file NokiaLCD.cpp.

void locate ( int  column,
int  row 
)

Locate to a screen column and row.

Parameters:
column The horizontal position from the left, indexed from 0
row The vertical position from the top, indexed from 0

Definition at line 254 of file NokiaLCD.cpp.

void pixel ( int  x,
int  y,
int  colour 
)

Set a pixel on te screen.

Parameters:
x horizontal position from left
y vertical position from top
colour 24-bit colour in format 0x00RRGGBB

Definition at line 305 of file NokiaLCD.cpp.

int printf ( const char *  format,
  ... 
)

Write a formated string to the LCD.

Parameters:
format A printf-style format string, followed by the variables to use in formating the string.
int putc ( int  c  ) 

Write a character to the LCD.

Parameters:
c The character to write to the display