Page 1 of 1

LCD2USB plugin extension for KS0073 controller - resolved

Posted: July 18th, 2009, 5:24 pm
by Votan
Hi,

I have an LCD2USB converter by Till Harbaum and an 4x20 char display with KS0073 controller.
This doesn't run with the LCD2USB plugin. I get no Text. I can change the brightness.
I found some lines in the original AVR microcontroller firmware by Peter Fleury

Code: Select all

file lcd.c
#define KS0073_EXTENDED_FUNCTION_REGISTER_ON  0x24   /* |0|010|0100 4-bit mode extension-bit RE = 1 */
#define KS0073_EXTENDED_FUNCTION_REGISTER_OFF 0x20   /* |0|000|1001 4 lines mode */
#define KS0073_4LINES_MODE                    0x09   /* |0|001|0000 4-bit mode, extension-bit RE = 0 */


#if LCD_LINES==4
#if KS0073_4LINES_MODE
    if ( pos < LCD_START_LINE2 )
        addressCounter = LCD_START_LINE2;
    else if ( (pos >= LCD_START_LINE2) && (pos < LCD_START_LINE3) )
        addressCounter = LCD_START_LINE3;
    else if ( (pos >= LCD_START_LINE3) && (pos < LCD_START_LINE4) )
        addressCounter = LCD_START_LINE4;
    else
        addressCounter = LCD_START_LINE1;
#else
    if ( pos < LCD_START_LINE3 )
        addressCounter = LCD_START_LINE2;
    else if ( (pos >= LCD_START_LINE2) && (pos < LCD_START_LINE4) )
        addressCounter = LCD_START_LINE3;
    else if ( (pos >= LCD_START_LINE3) && (pos < LCD_START_LINE2) )
        addressCounter = LCD_START_LINE4;
    else
        addressCounter = LCD_START_LINE1;
#endif
#endif


#if KS0073_4LINES_MODE
    /* Display with KS0073 controller requires special commands for enabling 4 line mode */
    lcd_command(KS0073_EXTENDED_FUNCTION_REGISTER_ON);
    lcd_command(KS0073_4LINES_MODE);
    lcd_command(KS0073_EXTENDED_FUNCTION_REGISTER_OFF);
#else
Maybe is it possible to integrate this parameters as startup parameter in LCD2USB plugin.

Greetings, Votan

Edit: The Problem ist resolved. I have programed an extension in the LCD2USB plugin. Feedback is welcome ;)

two features are added:
- external button support - code by henk http://forums.lcdsmartie.org/viewtopic. ... it=lcd2usb
- backlight brightness switch to zero, if LCD Smartie shut down

Re: LCD2USB plugin extension for KS0073 controller - resolved

Posted: July 21st, 2009, 1:03 pm
by tiggerlator
I have the same 20x4 display and controller,i would be very grateful if you could post the plugin for me.Also,did you get it to work on vista x64?

Thank you

tiggerlator

Re: LCD2USB plugin extension for KS0073 controller - resolved

Posted: July 22nd, 2009, 8:09 pm
by Votan
I did add a download link in the first post.

Votan