Jump to content

lcd 4bits


Guest komodo
 Share

Recommended Posts

Does anybody know an elegant way to do this?

MIOS supports 4bit LCD mode on HD44780 controllers, and KS0066 seems to be compatible.

To set data communication in 4 bit mode, you have to override settings made by MIOS_LCD_TypeAutoSet function at startup. This can be done by MIOS_LCD_TypeSet function, read MIOS functions page:

http://www.ucapps.de/mios_fun.html

My uneducated guess:

Appending (quoting MIOS function reference):

       movlw        0x37 | 0x80        ; E1: D.7, 4bit interface

       movwf        MIOS_PARAMETER1

       movlw        0x24 | 0x80        ; E2: C.4, 4bit interface

       movwf        MIOS_PARAMETER2

       movlw        0x00                ; LCD type 0

       call        MIOS_LCD_TypeSet

In main.asm of the application, in "USER_Init" section ,will do ;)

Bye, Moebius

p.s. Be sure to check MIOS function reference for minor hardware changes needed! ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...