Esta versión v6 pasa a ser el nuevo master. Funciona correctamente
Dependencies: ADXL345 Display1602 MSCFileSystem SDFileSystem mbed FATFileSystem
Display1602 Struct Reference
Basic bit of code for using a standard 1602 display in 8 bit mode. More...
#include <Display1602.h>
Public Member Functions | |
Display1602 (PinName registerSelect, PinName readWriteSelect, PinName readWriteEnable, PinName d0, PinName d1, PinName d2, PinName d3, PinName d4, PinName d5, PinName d6, PinName d7) | |
Constructor, here you state the oins used to read and write data on and the control pins. | |
void | Clear () |
Clears the display. | |
void | Print (const char *text) |
Prints the text to the display, will limit the chars read by 16 chars or hitting a null terminator, which ever comes first. | |
void | printf (const char *format,...) |
handy printf funtion for displaying text. | |
void | SetXY (int x, int y) |
Sets the cusor X Y pos. |
Detailed Description
Basic bit of code for using a standard 1602 display in 8 bit mode.
Written by Richard e Collins. Basic bit of code for using a standard 1602 display in 8 bit mode. When wiring one of these displays up make sure the power to the LCD on pin 3 is correct, too high and it will not display anything. About 0.2v is good, I use a POT to set it.
Example use. Display1602 display(p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20); display.SetXY(0,0); display.Print("Hello world");
Definition at line 59 of file Display1602.h.
Constructor & Destructor Documentation
Display1602 | ( | PinName | registerSelect, |
PinName | readWriteSelect, | ||
PinName | readWriteEnable, | ||
PinName | d0, | ||
PinName | d1, | ||
PinName | d2, | ||
PinName | d3, | ||
PinName | d4, | ||
PinName | d5, | ||
PinName | d6, | ||
PinName | d7 | ||
) |
Constructor, here you state the oins used to read and write data on and the control pins.
- Parameters:
-
registerSelect This is the pin used to select if you are sending data or setting a control register. readWriteSelect The pin to state if you are reading or writing data / register. d0 -> d7. The eight pins for the data to be either written to the display or a register.
Definition at line 4 of file Display1602.cpp.
Member Function Documentation
void Clear | ( | ) |
Clears the display.
Definition at line 32 of file Display1602.cpp.
void Print | ( | const char * | text ) |
Prints the text to the display, will limit the chars read by 16 chars or hitting a null terminator, which ever comes first.
Advances the cursor pos.
Definition at line 38 of file Display1602.cpp.
void printf | ( | const char * | format, |
... | |||
) |
handy printf funtion for displaying text.
Advances the cursor pos.
Definition at line 48 of file Display1602.cpp.
void SetXY | ( | int | x, |
int | y | ||
) |
Sets the cusor X Y pos.
Definition at line 60 of file Display1602.cpp.
Generated on Thu Jul 14 2022 18:41:53 by 1.7.2