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.
Dependents: 02_serial_cheto_facuclop
Fork of TextLCD by
LCD.cpp
00001 #include "LCD.h" 00002 DigitalOut RS(PTE0); 00003 DigitalOut E(PTA4); 00004 BusOut data(PTA1,PTA2,PTD3,PTA12); 00005 void toggle_enable(void){ 00006 E=1; 00007 wait(0.001); 00008 E=0; 00009 wait(0.001); 00010 } 00011 void LCD_init(void){ 00012 wait(0.02); 00013 RS=0; 00014 E=0; 00015 data=0x2; 00016 toggle_enable(); 00017 data=0x8; 00018 toggle_enable(); 00019 data=0x0; 00020 toggle_enable(); 00021 data=0xF; 00022 toggle_enable(); 00023 data=0x0; 00024 toggle_enable(); 00025 data=0x1; 00026 toggle_enable(); 00027 } 00028 void display_to_LCD(char value){ 00029 RS=1; 00030 data=value>>4; 00031 toggle_enable(); 00032 data=value; 00033 toggle_enable(); 00034 }
Generated on Tue Jul 19 2022 20:47:47 by
1.7.2
