Announcement

Collapse
No announcement yet.

Visual Basic & LCD

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Visual Basic & LCD

    Hello!

    Someome have a sample code to drive a lcd 40x4 lines HD 44780 connected to lpt in Windows Xp. Thand You...

  • #2
    Check out www.phidgets.com for VB friendly LCD displays (and servos, and relays and other fun stuff)

    Comment


    • #3
      VB6, HD44780 LCDs

      Instead of reinventing the wheel, try this.

      This is the module which i wrote for Xipe (my custom HD44780 display app). It has a dependency: dlportio from scientific software which lets you read and write directly to an address (the parallel port), and it assumes that you have your LCD wired up in "winamp" style wiring.

      It won't work for your 40x4 LCD without modifications, you have to set one of the Parport pins high to alternate between the two HD44780 controllers on your LCD.

      It's ported from Markus's Winamp LCD plugin, so it's a derivative work and hence falls under GPL.

      How to use it:
      LCD_Init
      LCD_Clear
      LCD_SetPosition(SomeX, SomeY)
      LCD_Write("SomeText")

      You can create custom chars as well, just put in ascii characters 0 to 7 in the string.

      Custom chars are created like this:
      LCD_CreateCustomChar(Char number between 0 to 7, strChar)
      strChar is a comma delimited set of 8 numbers (one for each line), with the least significant 5 bits representing the cell row data.

      You may need to change:
      DEF_DELAY_SHORT
      DEF_DELAY_MED
      DEF_DELAY_LONG
      DEF_DELAY_INIT

      depending on how fast your CPU is and how fast your HD44780 controllers read, so you don't write to the device faster than it can grab the data.

      Good luck
      Attached Files

      Comment

      Working...
      X