Jump to content

LCD driver to support 20*4 char


Recommended Posts

Hi,

I'm new to MIOS, but I did have some experience and success with modifying the MB64 code (V0.34 I,think) to better use the 20*4 display I built into my box.

As a way into MIOS programming I thought I would do a similar small project.

I'm having trouble finding the location in the code where the low level interface takes place.  ???

Excuse my naivety, but can anyone advise?

thanks for any guidance

Link to comment
Share on other sites

Yo duggle, top stuff man, good on you...

I'll be watching your work very closely, and I'll be learning from you, but if you need a hand, count me in...

I'm working right now (well I SHOULD be! heheh) but I'll read the docs and take a look at the new bits in MIOS 1.3 (with it's new LCD driver stuff) and see if I can help you out soon...

Knowing TK, he'll have his answer posted before I finish typing this hehehhe

Link to comment
Share on other sites

Hi Duggle,

especially based on your  (yes, really!) idea with character offsets I integrated a special function into MIOS called "MIOS_LCD_YAddressSet" (see the documentation) - one advantage of this function is that it allows you to shift a 2x16 screen to the middle of a bigger LCD

However, the interface to MIOS functions can be found in mios_vectors.inc, to user functions in user_vectors.inc

A MIOS function can be overloaded by disabling the appr. entry in mios_vectors.inc and by adding a replacement with the same name into the application.

Best Regards, Thorsten.

Link to comment
Share on other sites

hi,

Done! Thanks, Thorsten.

For those interested, centering the display (on a 4*20LCD)was done by adding the following lines to main.asm below USER_DISPLAY_Init and above the comment ;;clear the screen

USER_DISPLAY_Init

     movlw      0x00+2

     movwf      MIOS_PARAMETER1

     movlw      0x40+2

     movwf      MIOS_PARAMETER2

     movlw      0x14+2

     movwf      MIOS_PARAMETER3

     movlw      0x54+2

     call      MIOS_LCD_YAddressSet

     ;; clear the screen

     call      MIOS_LCD_Clear

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