Jump to content

Page scroll with 4x20 LCD


sebiiksbcs
 Share

Recommended Posts

I'm one of those guys with a 4x20 LCD and 10 buttons  on their SID v2 (5 above, 5 below). Menu scrolling is great, just not perfectly intuitive. Right now I am diving into the code and trying  to make the necessary changes to make the menu scroll 5 (or even 10) parameters at a time (which equals one full line, or a full page). I just feel like this is more intuitive than the current way of scrolling through the parameters one at a time. Even, say, on a 2-line LCD it doesn't feel optimal for me because it would feel better to know that, i.e. I can find OSC always at the first entry either in line 1&2 or 3&4, instead of having the positions just floating around arbitrarily

Long story short, I'd like the menu scrolling to scroll 5 parameters at a time instead of 1.

This is the passage I believe I need to edit: (found in /src/cs_menu.inc)

;; --------------------------------------------------------------------------
;;  called by cs_menu_enc.inc when the menu pos should be updated
;;  item in CS_MENU_PARAMETER_L
;; --------------------------------------------------------------------------
CS_MENU_MenuPosUpdate
	;; copy result to cursor pos and request display update
	movf	CS_MENU_PARAMETER_L, W
	andlw	0x3f
	movwf	CS_MENU_CURSOR_POS

	;; set page offset directly
	movwf	CS_MENU_PAGE_OFFSET

	;; now request a display update so that we see the new parameter on screen
	bsf	CS_STAT, CS_STAT_DISPLAY_UPDATE_REQ
	;; clear counter so that cs_menu_timer.inc counts from zero and the menu item is marked for a short time
	clrf	CS_CURSOR_CTR
	;; clear "CS_STAT_CURSOR_FLASH" bit (see cs_menu.inc for the handling)
	bcf	CS_STAT, CS_STAT_CURSOR_FLASH
	;; thats all
	return

I did have limited success by changing the number "3F" to values like "3E", "3D" etc. but then the binary counting the encoder works with (does it?) got messed up, meaning the page scrolled by x times 1 parameter, buy only on every x-th turn of the encoder.

I also was able to indeed make the page scroll in full lines by adding values with ADDLW instead of doing the ANDLW but then obviously scrolling back didn't work.

 

Has anyone been working on something similar and could point me in the right direction?

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