pilo Posted October 23, 2004 Report Share Posted October 23, 2004 Well, I make some mods in the C wrapper to support the switch matrix stuff, but with sm_simple.inc and sm_fast.inc I get always the same probleme : when I press a switch, it can't stop toggle between on and off... don't know why, it works with the example app (so it's not a hardware problem).I want to use the same dout for driving switch and led matrix (led matrix not yet solder). Maybe it would be a better idea to make those change in mios? I want to use encoder too... so I think there I can't use sm_fast.inc?Thanks! ;)Pilo Quote Link to comment Share on other sites More sharing options...
TK. Posted October 23, 2004 Report Share Posted October 23, 2004 Hi Pilo,Well, I make some mods in the C wrapper to support the switch matrix stuff, but with sm_simple.inc and sm_fast.inc I get always the same probleme : when I press a switch, it can't stop toggle between on and off... don't know why, it works with the example app (so it's not a hardware problem).well, what should I say to this statement? I don't know your code ;-)I want to use the same dout for driving switch and led matrix (led matrix not yet solder). Maybe it would be a better idea to make those change in mios?no, because matrices are always very hardware dependent and require customizations which are better located in the application, because parametrized code would be too slow.MIOS already provides a hook which allows to prepare the DOUTs before they are updated. However, currently it is not possible to use this hook in C... I know... this will be added to the C wrapper once I find the time.I want to use encoder too... so I think there I can't use sm_fast.inc?you can use two seperate DIN/DOUT chains, one for the standard MIOS stuff, one for the button matrix stuff. You only need to change the pinning in sm_fast.incThis would be the most performant solutionBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
pilo Posted October 24, 2004 Author Report Share Posted October 24, 2004 Thanks for the answer ;)Actually I add stuff in mios_wrapper.asm file : USER_Tick extern _Tick call SM_ButtonHandler lfsr FSR0, STACK_HEAD ;; initialize stack lfsr FSR2, STACK_HEAD goto _Tick USER_SR_Service_Prepare ;; TODO ;; not forwarded to C yet -- no problem at all, but some additional ;; SFRs needs to be saved. call SM_PrepareCol return USER_SR_Service_Finish ;; TODO ;; not forwarded to C yet -- no problem at all, but some additional ;; SFRs needs to be saved. call SM_GetRow return I try to customise to make the matrix works... I need to check again maybe my error is stupid ;) Quote Link to comment Share on other sites More sharing options...
TK. Posted October 29, 2004 Report Share Posted October 29, 2004 maybe my error is stupid ;)ok, so lets assume that it is a stupid error - maybe the reister addresses declared in app_defines.inc are overlapping the C variables?You can check this in the projects.map file, where all addresses are listed.Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.