Jump to content

lcd 4bits


Recommended Posts

Posted

hello everybody,

i've got some lcd (with ks0066 chipset)

How can i adapt this on mios because they are 4 bits models.

Thanks

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...