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: DigitaleingabeBluetooth_TI4 Temperatursever_TI4 BelueftungMitDS1820 ZustandCodeschloss ... more
LCD.h
00001 /** Verwendet SoftwareI2C von: 00002 * mbed Library to use a software master i2c interface on any GPIO pins 00003 * Copyright (c) 2012 Christopher Pepper 00004 * Released under the MIT License: http://mbed.org/license/mit 00005 * 00006 * Example: 00007 * @code 00008 * #include "LCD.h" 00009 00010 * lcd myLCD; 00011 * int main() { 00012 * int x=0; 00013 * myLCD.clear(); 00014 * myLCD.cursorpos(0); 00015 * myLCD.printf("x=%d",x); 00016 * while(1) { 00017 * } 00018 * } 00019 * @endcode 00020 */ 00021 00022 //Anpassungen in SoftwareI2C.cpp: _frequency_delay = 3; 00023 00024 #include "mbed.h" 00025 #include "SoftwareI2C.h" 00026 00027 class lcd 00028 { 00029 private: 00030 uint8_t Adresse;//=0x3F; 00031 //DigitalOut *ok; 00032 //DigitalOut *nok; 00033 //PortOut *po; 00034 //DigitalIn *t; 00035 SoftwareI2C *i2c; 00036 uint8_t wert; 00037 public: 00038 /** Create LCD Instance 00039 */ 00040 lcd(void); 00041 00042 /** löscht das Display 00043 */ 00044 void clear(void); 00045 00046 /** Positioniert den Cursor 00047 * @param pos 0.. 0xF 1. Zeile, 0x40..0x4F 2. Zeile 00048 */ 00049 void cursorpos(uint8_t pos); 00050 00051 /** Print formattet 00052 * @param *format Formatstring 00053 * @param ... Variablenliste 00054 */ 00055 int printf(const char *format, ...); 00056 00057 /** Locate to a screen column and row 00058 * 00059 * @param column The horizontal position from the left, indexed from 0 00060 * @param row The vertical position from the top, indexed from 0 00061 */ 00062 void locate(int column, int row); 00063 00064 /** Clear the screen and locate to 0,0 */ 00065 void cls(); 00066 /** Write a character to the LCD 00067 * 00068 * @param c The character to write to the display 00069 */ 00070 void putc(int c); 00071 00072 00073 private: 00074 void warte(void); 00075 void sendeByte(char b,uint8_t rw, uint8_t rs ); 00076 void sendeNippel(char b,uint8_t rw, uint8_t rs ); 00077 void init(void); 00078 00079 };
Generated on Mon Jul 18 2022 14:47:38 by
1.7.2