Jump to content

Recommended Posts

Posted

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! ;)

Posted

When you get your LCD up and running, you should try the LCD Benchmark application and post your findings. I am interested in what the results are for a 4 bit mode.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...