Recent changes
Slingshot user guide
tag Guide, user
NFCLamp user guide
tag Guide, user
Homepage
MPL115A2
Compiler Error 42
From the mbed microcontroller Cookbook.  

Newhaven LCD

The NHD-320240WG model listed here.

Wiring

Pin NameLCD Pin #mbed Pin #
Ground1Gnd
+5 V2Vu
Op. Enable4p5
RW select5p6
Reg. select6p7
Data bus7-14p8 - p15
Chip select15p16
Reset16p17
Frame Ground18Gnd
Backlight Powerp19Vu
Backlight Groundp20Gnd

Sample Code

Code

#include "mbed.h"
#include "newhaven.h"

BusInOut  MyBus(p8,p9,p10,p11,p12,p13,p14,p15);
NHLCD   MyLCD(p5,p6,p7,p16,p17,&MyBus);

int main() {
    int i;
    MyLCD.Init();
    MyLCD.clearScreen();
    wait(.5);
    while(1)
    {
        MyLCD.text("Hello World!", 10, 1);
        wait(1);
        for(i = 0; i < 20; i++){
            MyLCD.setPixel(i,i);
        }
        wait(1);
        MyLCD.clearScreen();
        wait(1);
    }
}

/media/uploads/pbevans89/nhd1.png

Functions

Program

ยป Import this programNewhaven_LCD

Newhaven 320x240 LCD

The above program includes a sample Pong demonstration:

/media/uploads/pbevans89/a.jpg




calendar Page history
Last modified 28 Feb 2011, by   user Paul Evans   tag No tags | 0 comments  

Please login to post comments.