es la misma libreria que se descarga
Dependents: 02_serial_cheto_facuclop
Fork of TextLCD by
Diff: LCD.cpp
- Revision:
- 9:befde34054fb
- Parent:
- 7:44f34c09bd37
- Child:
- 10:c9add656c693
diff -r 308d188a2d3a -r befde34054fb LCD.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LCD.cpp Tue May 27 07:22:43 2014 +0000 @@ -0,0 +1,34 @@ +#include "LCD.h" +DigitalOut RS(p25); +DigitalOut E(p24); +BusOut data(p23,p22,p21,p20); +void toggle_enable(void){ +E=1; +wait(0.001); +E=0; +wait(0.001); +} +void LCD_init(void){ +wait(0.02); +RS=0; +E=0; +data=0x2; +toggle_enable(); +data=0x8; +toggle_enable(); +data=0x0; +toggle_enable(); +data=0xF; +toggle_enable(); +data=0x0; +toggle_enable(); +data=0x1; +toggle_enable(); +} +void display_to_LCD(char value){ +RS=1; +data=value>>4; +toggle_enable(); +data=value; +toggle_enable(); +}