raid_ox
13.02.2007, 20:20
Hallo Alle,
Hier veröffentliche ich AsuroLCDLib v0.2b
Anwendung: https://www.roboternetz.de/phpBB2/viewtopic.php?t=27620
v0.1 Features:
- Unterstützt PCF8574P (Beispiel: https://www.roboternetz.de/wissen/index.php/LCD-Modul_am_AVR#Ansteuerung_.C3.BCber_I.C2.B2C )
- Flexiblere Pinbelegung (Veränderbar in lib)
- HD447XX kompatibel
- Print Interger
- PrintSetLCD( cursor, line, string );
- PrintAlignLCD( alignment, line, string );
- ClearLCD();
- SetIOLCD jetzt so: (ON/OFF, Pinbits);
v0.2 released!!
features:
- Veränderbare Init
- Kein Zeilensprünge mehr bei längeren String
- SetCursorLCD jetzt mit line und cursor: SetCursorLCD(cursor, line);
- Backlight Support
- PrintWrapLCD
- GetIOLCD
v0.2b features:
- ein bisschen optimiert (inline funktionen weg)
- PrintLCD und PrintWrapLCD zusammengesetzt zu PrintLCD(string, wrap[ON/OFF]);
Feedback please...
@m.a.r.v.i.n: - kannst du mal das mit deinem mehrzeiligen LCD testen?
@m.a.r.v.i.n: - Mit dem Init, kannst du es flexiblerer machen? ich kennt dein LCD nämlich nicht.
Tester, Verbesserungen und Verbesserungvorschläge sind willkommen.
Testprogramm:
#include "lib/i2cmaster.h"
#include "lib/essential.c"
#include "lib/lcd.c"
#define DELAY 1500
int main(void)
{
Init();
i2c_init();
InitLCD();
PrintLCD("LCD Testing...");
Msleep(DELAY);
while(1)
{
ClearLCD();
PrintLCD("Normal");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(3, 0, "Set Cursor");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(0 , 1, "Set Line");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(1 , 1, "Set Cursor Line");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(0 , 0, "Test Int");
SetCursorLCD(9);
PrintIntLCD(10);
Msleep(DELAY);
ClearLCD();
PrintAlignLCD(LEFT , 0, "LEFT");
Msleep(DELAY);
ClearLCD();
PrintAlignLCD(CENTER , 0, "CENTER");
Msleep(DELAY);
ClearLCD();
PrintAlignLCD(RIGHT , 0, "RIGHT");
Msleep(DELAY);
}
return 0;
}
Testprogramm v0.2
#include "lib/i2cmaster.h"
#include "lib/essential.c"
#include "lib/lcd.c"
#define DELAY 1500
int main(void)
{
Init();
i2c_init();
InitLCD();
PrintLCD("LCD Testing...");
Msleep(DELAY);
while(1)
{
ClearLCD();
PrintLCD("Normal");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(3, 0, "Set Cursor");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(0 , 1, "Set Line");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(1 , 1, "Set Cursor Line");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(0 , 0, "Test Int");
SetCursorLCD(9, 0);
PrintIntLCD(10);
Msleep(DELAY);
ClearLCD();
PrintAlignLCD(LEFT , 0, "LEFT");
Msleep(DELAY);
ClearLCD();
PrintAlignLCD(CENTER , 0, "CENTER");
Msleep(DELAY);
ClearLCD();
PrintAlignLCD(RIGHT , 0, "RIGHT");
Msleep(DELAY);
ClearLCD();
SetCursorLCD(1,0);
PrintWrapLCD("WRAPWRAPWRAPWRAPWRAP WRAP");
Msleep(DELAY);
}
return 0;
}
Initialisierung bei v0.2:
////// LCD INIT COMMANDS
// !SEE DATASHEET
// EXAMPLE:
// #define LCD_INIT {(LCD_4BIT | LCD_1LINE | LCD_5x7), COMMAND2, COMMAND3}
#define LCD_INIT {(LCD_4BIT | LCD_1LINE | LCD_5X7)}
v0.2b test:
#include "lib/i2cmaster.h"
#include "lib/essential.c"
#include "lib/lcd.c"
#define DELAY 1500
int main(void)
{
Init();
i2c_init();
InitLCD();
PrintLCD("LCD Testing...", OFF);
Msleep(DELAY);
while(1)
{
ClearLCD();
PrintLCD("Normal", OFF);
Msleep(DELAY);
ClearLCD();
PrintSetLCD(3, 0, "Set Cursor");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(0 , 1, "Set Line");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(1 , 1, "Set Cursor Line");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(0 , 0, "Test Int");
SetCursorLCD(9, 0);
PrintIntLCD(10);
Msleep(DELAY);
ClearLCD();
PrintAlignLCD(LEFT , 0, "LEFT");
Msleep(DELAY);
ClearLCD();
PrintAlignLCD(CENTER , 0, "CENTER");
Msleep(DELAY);
ClearLCD();
PrintAlignLCD(RIGHT , 0, "RIGHT");
Msleep(DELAY);
ClearLCD();
SetCursorLCD(1,0);
PrintLCD("WRAPWRAPWRAPWRAPWRAP WRAP", ON);
Msleep(DELAY);
}
return 0;
}
[/code]
Hier veröffentliche ich AsuroLCDLib v0.2b
Anwendung: https://www.roboternetz.de/phpBB2/viewtopic.php?t=27620
v0.1 Features:
- Unterstützt PCF8574P (Beispiel: https://www.roboternetz.de/wissen/index.php/LCD-Modul_am_AVR#Ansteuerung_.C3.BCber_I.C2.B2C )
- Flexiblere Pinbelegung (Veränderbar in lib)
- HD447XX kompatibel
- Print Interger
- PrintSetLCD( cursor, line, string );
- PrintAlignLCD( alignment, line, string );
- ClearLCD();
- SetIOLCD jetzt so: (ON/OFF, Pinbits);
v0.2 released!!
features:
- Veränderbare Init
- Kein Zeilensprünge mehr bei längeren String
- SetCursorLCD jetzt mit line und cursor: SetCursorLCD(cursor, line);
- Backlight Support
- PrintWrapLCD
- GetIOLCD
v0.2b features:
- ein bisschen optimiert (inline funktionen weg)
- PrintLCD und PrintWrapLCD zusammengesetzt zu PrintLCD(string, wrap[ON/OFF]);
Feedback please...
@m.a.r.v.i.n: - kannst du mal das mit deinem mehrzeiligen LCD testen?
@m.a.r.v.i.n: - Mit dem Init, kannst du es flexiblerer machen? ich kennt dein LCD nämlich nicht.
Tester, Verbesserungen und Verbesserungvorschläge sind willkommen.
Testprogramm:
#include "lib/i2cmaster.h"
#include "lib/essential.c"
#include "lib/lcd.c"
#define DELAY 1500
int main(void)
{
Init();
i2c_init();
InitLCD();
PrintLCD("LCD Testing...");
Msleep(DELAY);
while(1)
{
ClearLCD();
PrintLCD("Normal");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(3, 0, "Set Cursor");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(0 , 1, "Set Line");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(1 , 1, "Set Cursor Line");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(0 , 0, "Test Int");
SetCursorLCD(9);
PrintIntLCD(10);
Msleep(DELAY);
ClearLCD();
PrintAlignLCD(LEFT , 0, "LEFT");
Msleep(DELAY);
ClearLCD();
PrintAlignLCD(CENTER , 0, "CENTER");
Msleep(DELAY);
ClearLCD();
PrintAlignLCD(RIGHT , 0, "RIGHT");
Msleep(DELAY);
}
return 0;
}
Testprogramm v0.2
#include "lib/i2cmaster.h"
#include "lib/essential.c"
#include "lib/lcd.c"
#define DELAY 1500
int main(void)
{
Init();
i2c_init();
InitLCD();
PrintLCD("LCD Testing...");
Msleep(DELAY);
while(1)
{
ClearLCD();
PrintLCD("Normal");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(3, 0, "Set Cursor");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(0 , 1, "Set Line");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(1 , 1, "Set Cursor Line");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(0 , 0, "Test Int");
SetCursorLCD(9, 0);
PrintIntLCD(10);
Msleep(DELAY);
ClearLCD();
PrintAlignLCD(LEFT , 0, "LEFT");
Msleep(DELAY);
ClearLCD();
PrintAlignLCD(CENTER , 0, "CENTER");
Msleep(DELAY);
ClearLCD();
PrintAlignLCD(RIGHT , 0, "RIGHT");
Msleep(DELAY);
ClearLCD();
SetCursorLCD(1,0);
PrintWrapLCD("WRAPWRAPWRAPWRAPWRAP WRAP");
Msleep(DELAY);
}
return 0;
}
Initialisierung bei v0.2:
////// LCD INIT COMMANDS
// !SEE DATASHEET
// EXAMPLE:
// #define LCD_INIT {(LCD_4BIT | LCD_1LINE | LCD_5x7), COMMAND2, COMMAND3}
#define LCD_INIT {(LCD_4BIT | LCD_1LINE | LCD_5X7)}
v0.2b test:
#include "lib/i2cmaster.h"
#include "lib/essential.c"
#include "lib/lcd.c"
#define DELAY 1500
int main(void)
{
Init();
i2c_init();
InitLCD();
PrintLCD("LCD Testing...", OFF);
Msleep(DELAY);
while(1)
{
ClearLCD();
PrintLCD("Normal", OFF);
Msleep(DELAY);
ClearLCD();
PrintSetLCD(3, 0, "Set Cursor");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(0 , 1, "Set Line");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(1 , 1, "Set Cursor Line");
Msleep(DELAY);
ClearLCD();
PrintSetLCD(0 , 0, "Test Int");
SetCursorLCD(9, 0);
PrintIntLCD(10);
Msleep(DELAY);
ClearLCD();
PrintAlignLCD(LEFT , 0, "LEFT");
Msleep(DELAY);
ClearLCD();
PrintAlignLCD(CENTER , 0, "CENTER");
Msleep(DELAY);
ClearLCD();
PrintAlignLCD(RIGHT , 0, "RIGHT");
Msleep(DELAY);
ClearLCD();
SetCursorLCD(1,0);
PrintLCD("WRAPWRAPWRAPWRAPWRAP WRAP", ON);
Msleep(DELAY);
}
return 0;
}
[/code]