Jump to content

DIN Velocity UnMuxed


Recommended Posts

From the README.txt


DIN Velocity UnMuxed V1.0              © 2005 Thorsten Klose (tk@midibox.org)


This application can be used to do some experiments with "velocity buttons"

The buttons must provide three contacts: one contact, which is closed with

the "middle pin" when the button is pressed, and another contact,

which is closed with the "middle pin" when the button is depressed.

Such buttons are mostly called "On-(On) pushbuttons", "push-push

momentary buttons" or "SPDT buttons (Single Push, Double Throw).

The outer contacts have to be connected to a pair of two digital

input pins of a DINX4 module, the middle contact to ground.

See also http://www.ucapps.de/mios/din_velocity_unmuxed.pdf

Note that this application is not able to scan a keyboard matrix, but

it could be useful to realize some simple drumpads

Velocity measuring works in the following way: so long the "depressed"

contact is closed, a velocity counter is preloaded with 127

Once it is released, this counter will be decremented each millisecond

until the "pressed" contact is closed (see din_vel.c, DIN_VEL_Tick())

The measured delay will be scaled to the velocity value

(see DIN_VEL_NotifyToggle())

The scaling can be changed in din_vel.c, velocity_table[]

Currently this table contains an exponential scaling which has been

generated with utils\velocity_table.pl

Depending on the button you are using a modification of this table

might lead to better results.

By default 16 buttons are handled by the application, this number can

be increased to up to 64 in din_vel.h


A precompiled binary is already part of this package:

  o project.hex (can be loaded into MIOS Studio)

  o project.syx (can be loaded into any SysEx upload tool)

Following tools are required to recompile the code:

  o SDCC v2.5.0

  o gputils

  o perl

The details are described under http://www.ucapps.de/mios_c.html


Required hardware:

  o one MBHP_CORE module

  o at least one DINX4 module for 16 push-push buttons

Optional hardware:

  o up to 4 DINX4 modules for up to 64 push-push buttons

  o a 2x16 LCD


Configuration steps:

  o check the "general application settings" in main.h if changes are

    required for your hardware setup (e.g., number of shift registers)

  o check the "DIN velocity settings" in din_vel.h

  o the application can be rebuilt with the "make.bat" file

    (type "make" in a DOS command shell)


Description about the most important files:

  - mios_wrapper\mios_wrapper.asm and mios_wrapper\mios_tables.inc:

    The MIOS wrapper code and MIOS specific configuration tables

  - pic18f452.c: exports PIC18F452 specific SFRs

  - main.c: the main program with all MIOS hooks

  - din_vel.c: the velocity handler

  - utils\velocity_table.pl: has been used to generate the scaling table

There are additional .h files for all .c files which contain

general definitions and the declaration of global functions/variables

These .h files must be included into the program parts which

get use of these globals



Download: http://www.ucapps.de/mios_download.html

Interconnections: http://www.ucapps.de/mios/din_velocity_unmuxed.pdf

Have fun! :)

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.

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.


  • Create New...