Jump to content

Recommended Posts

Posted

Hello all, been playing about with the Scan Matrix examples for PIC cores, that's all working fine. 

Is there a way to use the DIn for some other buttons?

 

TIA

 

S

Posted

I guess that you mean sm_c_example1 with the sm_simple.asm driver, and that you want to use the DIN shift register selected with SM_ROW_DIN only partly for a matrix. Some remaining pins of this SM_ROW_DIN should be used for normal button functions, right?

 

Yes, this is possible. Since the driver uses "MIOS_DIN_SRGet" instead of "MIOS_DIN_ChangedSet00", you even don't need to touch the .asm file

 

DIN_NotifyToggle() should be called on any pin toggle. So, just filter out the pins which are part of the matrix, all other pins can be used like "normal" inputs.

 

Best Regards, Thorsten.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...