2x24 LCD

Hi,

My MIOS midibox64 is up and running, however as I am using a 2x24 LCD, the image presented is not at the center. How to make modification on the firmware to center the display. Thanks

Best regards

Shum

Hi Shum,

in main.asm, set:

#define DEFAULT_LCD_SIZE 1

for 2x20 display mode, and replace

#if DEFAULT_LCD_SIZE == 1      ; 2x20
  #define DEFAULT_YOFFSET_LINE0 0x02
  #define DEFAULT_YOFFSET_LINE1 0x42
  #define DEFAULT_YOFFSET_LINE2 0x16
  #define DEFAULT_YOFFSET_LINE3 0x56
  #define CSMD_YOFFSET_LINE0    0x00
  #define CSMD_YOFFSET_LINE1    0x40
  #define CSMD_YOFFSET_LINE2    0x14
  #define CSMD_YOFFSET_LINE3    0x54
#endif
[/code]


by:
[code]#if DEFAULT\_LCD\_SIZE == 1      ; 2x24  
  #define DEFAULT\_YOFFSET\_LINE0 0x04  
  #define DEFAULT\_YOFFSET\_LINE1 0x44  
  #define DEFAULT\_YOFFSET\_LINE2 0x18  
  #define DEFAULT\_YOFFSET\_LINE3 0x58  
  #define CSMD\_YOFFSET\_LINE0    0x02  
  #define CSMD\_YOFFSET\_LINE1    0x42  
  #define CSMD\_YOFFSET\_LINE2    0x16  
  #define CSMD\_YOFFSET\_LINE3    0x56  
#endif  

Best Regards, Thorsten.

Hi Thorsten,

I looked at the main.asm file in the midibox64 application and replaced the code as recommended (for 2x24 LCD). Using MPLAB, I recompiled the main.asm file to build the main.hex file. This was done successfully. I then uploaded this file through MIOSStudio into the pic. Mios rebooted, but the LCD display remains at 2x16 configuration. I searched through the readme file but could not find information on LCD setting. Could I be doing something incorrect here?. Thanks

Best regards

Shum

Hi Shum,

could it be that you forgot the first modification I mentioned (setting the display type)

The information on LCD setting are in the main.asm file (the comments…). I know that some can be really confused, but nobody took the time for writing a user documentation into the Wiki yet…

Best Regards, Thorsten.

Hi Thorsten

It was carless of me that I missed changing the first line of the code. It is fine now, thanks a lot.

Best regards

Shum

Hey Shum would you like to document this on the wiki?  :slight_smile:

Hi Stryd_one,

Yes, how do I go about doing it?

Regards

Shum

Good on you mate  :wink:

You can find the wiki syntax here: http://www.midibox.org/dokuwiki/doku.php?id=syntax

You can fool around here and do whatever you want to test it out and get a feel for how it works: http://www.midibox.org/dokuwiki/doku.php?id=playground

Then go here and share what you’ve found: http://www.midibox.org/dokuwiki/doku.php?id=midibox_64

Let me know if you need a hand :slight_smile:

Hi Stryd_one,

I had a look at the wiki syntax and the rest of the stuff at the playground, sorry I do not understand all the stuff there. Anyway I have done some work with MS Frontpage. Would it be possible to document what I have done on the LCD in Frontpage and upload it to the web? Thanks

Regards

Shum

If you have a place you can host the files, or could send them to me, I can convert them to wiki format.

Hi Stryd_One,

I shall send you the document on my experience in building the midibox, once I finished it. Need your mail address. Thanks.

Best regards

Shum

I just want to thank Shum for the really good documentation he’s written. I’ll be putting it online soon, but I wanted to say thanks now.

Hi Shum,

in main.asm, set:

#define DEFAULT_LCD_SIZE 1

for 2x20 display mode, and replace

#if DEFAULT_LCD_SIZE == 1 ; 2x20

#define DEFAULT_YOFFSET_LINE0 0x02

#define DEFAULT_YOFFSET_LINE1 0x42

#define DEFAULT_YOFFSET_LINE2 0x16

#define DEFAULT_YOFFSET_LINE3 0x56

#define CSMD_YOFFSET_LINE0 0x00

#define CSMD_YOFFSET_LINE1 0x40

#define CSMD_YOFFSET_LINE2 0x14

#define CSMD_YOFFSET_LINE3 0x54

#endif

by:

#if DEFAULT_LCD_SIZE == 1 ; 2x24

#define DEFAULT_YOFFSET_LINE0 0x04

#define DEFAULT_YOFFSET_LINE1 0x44

#define DEFAULT_YOFFSET_LINE2 0x18

#define DEFAULT_YOFFSET_LINE3 0x58

#define CSMD_YOFFSET_LINE0 0x02

#define CSMD_YOFFSET_LINE1 0x42

#define CSMD_YOFFSET_LINE2 0x16

#define CSMD_YOFFSET_LINE3 0x56

#endif

Best Regards, Thorsten.

a very old post… but a new question. my protodeck is based on 2 MB64 and I’m using a 2x20 too. so, where must I put this

#define DEFAULT_LCD_SIZE 1

I guess the 2nd part of the constant definition should be done in my main.h …?!