Jump to content

LCD Offset Questions


Jidis
 Share

Recommended Posts

Hey again!,

Could anyone here *very briefly* describe the purpose of the different LCD settings? I've been stuck mixing the past few nights, but when I left off, I had gotten so frustrated trying to get different display sizes or layouts, that I jumped it and moved to the buttons & lights, figuring I'd get back to it later.

From what I remember, the only thing I really got was the first offset parameter. I did figure out a "centered" 2x16 display on a 2x40, and also some sort of dual display with four different lines of stuff in two 2x16 combos on the 2x40, like if you flipped to the next display mode and it showed up on the right. I also got "8" different knob value parameters across the screen simultaneously, but they went from channels 1-4 and then jumped way up to 20 or 30 something.

The 2nd, 3rd, and 4th parameters were confusing. The decimal from hex equivalents didn't usually come out to any multiples of the display width, even though they were. (guessing that's not what they mean)

And before I waste too much learning time, how many of the following "desired functions" are impossible with a standard MB64 app:

- Obviously, the full width (non-centered) 2x40 mode

- The spacing of 4 (or more) named pot or button values across a 2x40 to align with the physical layout (like the LC)

- A way to flip or scroll from the display of one pot's parameter page to the next, without actually touching that particular control.

  For instance, if you wanted to check Nuendo's settings for your channel parameters or cue mix remotely, in snap mode, without

  the risk of changing them. Ideally, non-consecutive controls, like if a musician wanted to see what his levels were for the 12th-16th

  knobs, and had a button at that knob group to jump there from the first few knobs, and maybe go knob to knob with additional

  button hits. (probably asking too much)

- Thanks again, and sorry for the long post. Just trying to get in all the details. :)

                                                                          - George

PS- If the above is spread over more than a couple of the included MB64 project files, which ones should I focus on?     

   

Link to comment
Share on other sites

Hi George,

the display offsets are handled by MIOS in a way which allows to use the same cursor positions on any kind of LCD. With MIOS_LCD_YAddressSet the LCD specific cursor offsets are mapped to the MIOS specific cursor offsets.

64 characters (0x40) are reserved for each line, up to 4 lines are (natively) supported:

1st line begins at 0x00

2nd line begins at 0x40

3rd line begins at 0x80

4th line begins at 0xc0

And these lines have to be mapped to the real address offsets of your LCD - this can normaly be found in the datasheet, the most common cases are documented in the functional description of MIOS_LCD_YAddressSet: http://www.ucapps.de/mios_fun.html#MIOS_LCD_YAddressSet

For a 2x40 following settings are working:

Y0: 0x00

Y1: 0x40

Y2: doesn't matter (*)

Y3: doesn't matter (*)

(*) note: if a value between 0x80...0xff is specified here, it is assumed that the 3rd and 4th line is mapped to a second LCD

Centering the screen just means to add additional offsets to these addresses, e.g. let's say you've a 2x40 display, but only 16 columns are used, this means that you need to add 12 to each offset:

Y0: 0x00 + (40-16)/2

Y1: 0x40 + (40-16)/2

Y2: doesn't matter (*)

Y3: doesn't matter (*)

Thats how MIOS supports LCDs.

The MB64 application now simplifies the configuration for people without programming skills by providing 4 predefined display types with premade (and tested) setups.

They can be selected with DEFAULT_LCD_SIZE

This setting selects the Yx values and the cs_m_display_*.inc file

You can see this when you are searching in main.asm for "DEFAULT_LCD_SIZE"

Unfortunately nobody sent me the required definitions and .inc file for a 2x40 display yet.

This either means, that nobody found it useful yet, or that the guys who did such a customization haven't thought about a public release yet (they are always welcome to bring their code into the mb64 package)

So - if you are not able to re-use existing code, it means that you have to program it by yourself. And this requires to understand the code in the cs_m_display_*.inc files --- they are partly different, depending on the guy who programmed the extension, and depending on the available screen size of course (than larger the size, than more features for the display layout can be found).

Very tricky is the implementation of the CSMD page (provided by Duggle), because it uses alternative display offsets, which are not the same like on all other display pages (just select the last page within the display menu, and you should notice this).

The MB64_LCD_SetDefaultOffsets and MB64_LCD_SetCSMDOffsets (in mb64_lcd.inc) routines are switching between the two parameter sets (the ones which are defined in main.asm), so you don't need to change anything there.

Instead you only need to define a new display type (let's say: number 4), you need to define new Yx settings (in main.asm), and you need to create a new cs_m_display_2x40.inc file (hint: just copy cs_m_display_2x20.inc to cs_m_display_2x40.inc and change it for your needs).

Simplest way to do this: search in main.asm for DEFAULT_LCD_SIZE == 3, copy the lines from "#if ..." to "#endif", change "DEFAULT_LCD_SIZE == 3" to "DEFAULT_LCD_SIZE == 4", and adapt the code in between the copied conditional statement.

(there are only two!)

Your (personal) requirements can mainly be realized by changing the CSMD routine in the newly created cs_m_display_2x40.inc file. This isn't easy for somebody who never programmed the simple stuff, so maybe it's better when you are beginning with easier changes in order to get a feeling about the way how assembly language works. Sooner or later you should be able to customize the whole display handler exactly for your needs :)

Best Regards, Thorsten.

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

×
×
  • Create New...