Projekte
BirgerT
nibo2_fork#01
bt_lib_glcd.h
Projekte
Forum
Doku
Öffentliche Projekte
Startseite
Beispielprogramme
Projekte von anderen
Welcome
Username
Passwort
Eingeloggt bleiben
Zugangsdaten vergessen?
Registrieren
Projektverwaltung
⇨ Please choose! ⇦
——————————————————
✎ Create new project...
★ Browse existing projects...
——————————————————
⚬ MotorTest#1
⚬ C Tutorial 8#1
⚬ NIBO2 C Project#1
⚙ C Tutorial 15#1
⚬ 2010_11_18_el_test001#1
nibo2_fork#01
BSD_license.h
bt_lib_debugutil.c
bt_lib_debugutil.h
bt_lib_glcd.c
bt_lib_glcd.h
bt_lib_grafix.c
bt_lib_grafix.h
bt_lib_terminal.c
bt_lib_terminal.h
bt_lib_uart.c
bt_lib_uart.h
bt_lib_utils.h
lumpylumpy.h
main.c
nibo2_audio.c
nibo2_audio.h
nibo2_copro.c
nibo2_copro.h
nibo2_copro_cmd.h
nibo2_font.h
nibo2_global.h
nibo2_main_menu.h
nibo2_pwm_leds.c
nibo2_pwm_leds.h
nibo2_register.c
nibo2_register.h
nibo2_sensors.c
nibo2_sensors.h
test_debugutil.h
test_gfx_draw.h
xmas1.h
Project details
Compiler settings
Nachrichten
Sie sind nicht eingeloggt.
Neuigkeiten
★
NiboRoboLib 3.6
2017-01-17: Neue Version 3.6
★
NiboRoboLib 3.4.1
2016-04-16: Neue Version 3.4.1
★
Coding Tutorial
2015-11-22: Jetzt auch für den NIBO burger!
Site-Statistic
7426 private projects
385 public projects
16180353 lines compiled
58212 builds
NIBO
@
nibo2_fork_01/bt_lib_glcd.h [read only]
////////////////////////////////////////////////////////////////////////// // // BT LIB GLCD Ansteuerung Grafikdisplay 128x64 mit 2x KS0108 // // (c) Birger Töpelmann toepelmann(A)web.de Version 141014a // // INIT // // // SCHREIBEN // // // LESEN // // TODO // Funktionen dokumentieren // ////////////////////////////////////////////////////////////////////////// // // #ifndef _BT_LIB_GLCD_H_ #define _BT_LIB_GLCD_H_ // // BSD License see "license.h" // #include "BSD_license.h" // //#include "bt_lib_utils.h" // Sammlung von Makros und Typedefs //#include "bt_lib_grafix.h" // Grafik Display Buffer #include "nibo2_global.h" // Nibo2 Global Header // ////////////////////////////////////////////////////////////////////////// // #define GLCD_WIDTH 128 #define GLCD_HEIGHT 64 // ////////////////////////////////////////////////////////////////////////// // // ////////////////////////////////////////////////////////////////////////// // // ////////////////////////////////////////////////////////////////////////// // // GLCD Low Level Funktionen // // GLCD Initialisieren // void glcd_init(); // //uint8_t glcd_wait(uint8_t cmd); void glcd_write(uint8_t cmd, uint8_t data); uint8_t glcd_read(uint8_t cmd); // ////////////////////////////////////////////////////////////////////////// // // GLCD FILL: Den Speicher des Displays mit Daten füllen // -> data = 0 Displayspeicherinhalt löschen // void glcd_fill(uint8_t data); // Funktionen arbeiten mit Grafix Buffer void glcd_ISR(); void glcd_enable(uint8_t pagemask); uint8_t glcd_enabled(); // ////////////////////////////////////////////////////////////////////////// // //* ****************************************** LCD CONNECTOR // Die Pins am LCD Connector #define LCD_DATA_DDR DDRA // LCD lesen o. schreiben #define LCD_DATA_OUT PORTA // LCD Daten schreiben #define LCD_DATA_IN PINA // LCD Daten lesen // PORT G = LCD Steuerung, nur Ausgang #define LCD_CTRL_DDR DDRG #define LCD_CTRL_PORT PORTG // KS0108 Chip1 oder 2 auswählen #define LCD_CHIP1 CLRBIT(PORTG,PG1), SETBIT(PORTG,PG0) #define LCD_CHIP2 CLRBIT(PORTG,PG0), SETBIT(PORTG,PG1) // KS0108 Enable = Strobe für Datenübernahme #define LCD_EN_H SETBIT(PORTG,PG2) #define LCD_EN_L CLRBIT(PORTG,PG2) // KS0108 RW 0 = Write / 1 = Read #define LCD_RW_RD SETBIT(PORTG,PG4) #define LCD_RW_WR CLRBIT(PORTG,PG4) // KS0108 RS 0 = Instruction / 1 = Daten #define LCD_RS_DTA SETBIT(PORTG,PG3) #define LCD_RS_CMD CLRBIT(PORTG,PG3) // Display 0 = Reset (! CoPro Reset muß auch 0 sein) #define LCD_NORESET SETBIT(PORTB,PB0) #define LCD_DORESET CLRBIT(PORTB,PB0) //* ****************************************** LCD Kommandos #define LCD_ON 0x3f #define LCD_OFF 0x3e #define LCD_OFS0 0xc0 #define LCD_PAG0 0xb8 #define LCD_ADR0 0x40 #define LCD_BUSY 0x80 //* ****************************************** Bitmasken für RS und CS #define LCD_CMD1 0x00 #define LCD_CMD2 0x01 #define LCD_DAT1 0x02 #define LCD_DAT2 0x03 //* ****************************************** Test und Demo GLCD #endif //_NIBO2_GLCD_H_
Compiler results:
Werbung
Online
AitanaAlmaguer
Antoniotzj
carmelopetty36638757
KylieSat
warrenhinder6456