Jump to content

need advise to do 16*16 butons matrix


moxi
 Share

Recommended Posts

hi,

someone ask me how to do a 16*16 matrix,

looking to the sm example v1, i've found two point where change have to be made, iwant to know if it's the only point i need to make change:

first , in sm_simple.inc:

* at "SM_GetRow" :

;; increment column, wrap at 8 <--- i want to wrap at 16, right?

incf SM_SELECTED_COLUMN, W, BANKED

andlw 0x07                            <------------so, here i change 0x07 by 0x0f, right?

movwf SM_SELECTED_COLUMN, BANKED

* at "SM_ButtonHandler_Loop"

"""IFSET        INDF0, 7, rcall SM_NotifyToggle_Pin7 """  --> here, go on the intruction to :

"""IFSET INDF0, 15, rcall SM_NotifyToggle_Pin15"""

* at "SM_ButtonHandler_Loop_Next":

incf SM_BUTTON_COLUMN_CTR, F, BANKED

movlw 0x10-1 ; (16 columns)<------change here

*at :

"" SM_NotifyToggle_Pin0 ---> go on with this instructuction to "SM_NotifyToggle_Pin15"  ""

will this change be suffisant ?

thanks

Link to comment
Share on other sites

Hi Moxi,

My proposal: just try it out, there are always cases which nobody do consider, regardless how often they look into the code (it's also my own problem - therefore I cannot release variations without the possibility to try it with the appr. hardware)

Best Regards, Thorsten.

Link to comment
Share on other sites

hi,

ok, i will try to add some more line of button to my already build matrix..and spend more time in the code..but if someone have do such experience, tell us what you report...

and i suppose that if you don't say "impossible" ,it's cause that's possible! ;)

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