Jump to content

4-bit LCD question


Recommended Posts

Posted

I just received 2 new 20x2 LCDs from BGMicro and didn't realize they only have a 4 bit interface!  Can I still use these for a Midibox64 and a SID?  They only have 12 pins to solder out from, is it possible to simply skip D0-D3 when I connect it to the core?

Thanks for your help.

Posted

Since I had to release a new MIOS version anyhow, I added some code which is necessary to access a 4bit display.

Just use mios_v1_5b (or higher) and add following lines below USER_Init:

        ;; use a CLCD, E input of first CLCD at D.7, E of second CLCD @C.4
        ;; using the 4-bit interface:
        ;; -> connect MBHP_CORE:J15:D7-D4 of the core module to D7-D4 of the LCD
        ;; -> left MBHP_CORE:J15:D3-D0 of the core module open!
        ;; -> tie D3-D0 of the LCD to ground
        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

It doesn't matter if you connect a second display or not to the core, this is just an excerpt from the MIOS_LCD_TypeSet example...

Best Regards, Thorsten.

Posted

I am not sure exactly where this code is entered.  Would it be within "user_vectors.inc" under USER_Init?  

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...