" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * @purpose HD44780 LCD Minimal interface for Atmega microcontrollers * http://www.pocketmagic.net/ */ #pragma once #include <stdio.h> #include <avr/io.h> //--------------------------------CONFIGURE LCD--------------
;****************************************************************************** ; Filename: HD44780.INC ; Date: 14.07.2011 ; altered 29.07.2011 ; Author: Ottmar ; Copyright: free for non commercial use ; Code-Source: learnd from: http://www.sprut.de ; ; LCD-Timing: Timing in LCD_Init is fine up
Hallo, ich versuch grad den Zusammenhang zwischen der Anzahl der Linien eines HD44780-Displays und dem Zustand des Number-of-Lines-Bits beim FunctionSet-Kommando zu verstehen. Es gibt ja ein-, zwei- und vierzeilige Displays mit je 16 oder 20 Stellen (in seltenen Ausnahmefällen auch
Stelle in welcher Zeile des Displays zuständig ist. Mir ist nicht bekannt, daß man bei irgend welchen HD44780 kompatiblen Displays in der Programmierung dem Displaycontroller quasi die Anzahl der Zeilen mitteilen müsste. ;) Ciao, Rainer
16F688, HD44780, 20Mhz Quartz, 1k pullup für MCLR, 10k Spannungsteiler für audiomasse, audio auf porta.2, button auf porta.1 http://www.youtube.com/watch?v=ikDbasRm2cc http://www.youtube.com/watch?v=QrRBPopTP5E
bei beiden videos wird das gleiche HD44780 kompatible textdisplay aus einem alten fax verwendet. einmal original, und einmal mit gedrehtem polfilter, zwei farbigen filterfolien und led hintergrundbeleuchtung. der sourcecode im anhang
ich möchte etwas lernen. Deshalb bastele ich ein bisschen mit einem Arduino Uno und habe auch ein HD44780-kompatibles LCD angeschlossen. Wie man auf dem Foto sieht funktioniert auch alles. Ich habe für die Einstellung des Kontrasts des LCDs statt eines Potentiometers eine Potentiometerschaltung aus zwei
Pollin etwa 5 Euro. (Manchmal gibt bei eBay ein Paar preisegünstige angebote, manchmal). Diese sind HD44780 kompatibel, gehen mit Bascom.
Die meisten preiswerten LCD-Textdisplays verwenden einen HD44780-kompatiblen Controller. Man kann also meistens nicht viel falsch machen. Nur auf die Anschlussbelegung, Kontrastspannung und die Initialisierung sollte man achten... das ist teilweise leicht unterschiedlich
Was ich bislang noch vermisse ist die Bezeichnung von dem Ding. evtl. ist ja nur hd44780 "kompatibler" kontroller drauf ... hat ich mal, der war dann doch nicht so ganz kompatibel, vor allem beim init
@Marko: ich bezog mich jetzt nur auf die HD44780-LCDs ;-)
Zeichen immer 2 Leerzeichen aus. Gibt es beim Ks0073 auch so ein 3maliges Power On, wie beim HD44780? Vielen Dank schon mal! Grüße Anne
schauen was dann passiert. Und diese 03h werden nur 1 mal ans LCD geschickt? Nicht 3 mal wie beim HD44780 der Power-On-Befehl?! Wieso rufst Du in deinem Programm 3 mal das Enable auf? Viele Grüße Anne
Beim Schreiben ist im Datenblatt des HD44780U spezifiziert, dass nach der fallenden E-Flanke min. 10ns lang noch die Daten anliegen müssen (t_H). Wenn der Atmega mit 16MHz läuft, dann dauert *einer* der schnellen Befehle 62.5ns. Und du wirst auch in Assembler mehrere benötigen. Wenn also die Software den HD44780 tatsächlich am Timing-Limit betreiben sollten, dann ist der Atmega zu langsam. Oder ich habe mich irgendwo in den Größenordnungen verhauen ;-)
Hallo, ich habe hier ein Gerät mit einem µC unbekannter Art, der ein LCD-Display mit HD44780+HD44100+HD61100 im 4-Bit-Modus steuert. Das angeschlossene Display kann mehr Zeichen darstellen, als vom Gerät benutzt werden. Die Idee ist nun, einen AVR dazwischen zu setzen, der alle Befehle/Daten
spezifikationsgerecht verhält und schön das Busy-Flag und wahrscheinlich auch den Adresszeiger des HD44780 abfragt, was ich ja jetzt irgendwie emulieren müsste. So, und jetzt stehe ich im Wald, da mir nichts einfällt, wie das mit den sportlichen Timing und einem AVR (aus Platzgründen möglichst ohne weitere
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
used to calculate delay timer */ #endif /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 1 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 1 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
#define NOP() asm volatile ("nop" ::) /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 1 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 1 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
used to calculate delay timer */ #endif /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size
Hz, used to calculate delay timer */ /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /** * @name Definitions for Display Size