Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Final351CW_FINAL by
lglcd.h
00001 /* ELEC351 COURSEWORK 2018 00002 DESIGNED USING MBED ONLINE COMPILER IMPORTED TO KEIL 00003 LIAM GRAZIER // DOUG TILLEY // ALEX BARON 00004 */ 00005 #ifndef __LGLCD_H 00006 #define __LGLCD_H 00007 #define CMD 0 //adapted from 2nd year code 00008 #define TXT 1 00009 #define CLEAR 1 00010 #define HOME 2 00011 #define READ 1 00012 #define WRITE 0 00013 #define LEFT 0 00014 #define RIGHT 1 00015 #define LINE1 0x80 // Start address of first line 00016 #define LINE2 0xC0 // Start address of second line 00017 #define LCD_CLR (writedata(CLEAR,CMD)) 00018 #define LCD_HOME (writedata(HOME,CMD)) 00019 #define LCD_BUSYBIT 0x8000 //correct value for the lcd BUSYBIT 00020 //mylcdclass 00021 class lglcd 00022 { 00023 public: 00024 lglcd(PinName RS, PinName E, PinName D4, PinName D5,PinName D6, PinName D7); //statement for pin enables 00025 void clear(void); //function for clearlcd 00026 void writedata(unsigned char info, unsigned char type); //function forwiring data on the screen 00027 void lglcd::setline(int row,int column); //setline command row/column 00028 void write(char charq[]); //wirint char/str on mylcd. 00029 int l; 00030 protected: 00031 BusOut _lcdinfo; //output define for D4-D7 00032 DigitalOut _lcdrs; //output define for RS Pin 00033 DigitalOut _lcde; //output define for E pin 00034 }; 00035 #endif
Generated on Mon Jul 18 2022 05:40:54 by
1.7.2
