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?  

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...
×
×
  • Create New...