Jump to content

SRIO, DOUT, DIN, 16 bit , 8bit Confusion


robinfawell
 Share

Recommended Posts

Would it be possible to modify this project to add either another DIN or DOUT in order to achieve a 24 X 16 scan matrix? I am working on a 192 key velocity sensitive keyboard (axis-64 clone).

Is it just a matter of changing these:

// scan 16 rows

#define MATRIX_NUM_ROWS 16

// maximum number of supported keys (rowsxcolumns = 16*16)

#define KEYBOARD_NUM_PINS (16*16)

I think the correct answer is "yes, it is possible..to achieve a 24 X16".

I say this because if it turns out to be constrained by i/o speed, it is possible to substantially increase the SPI clock.

I havn't closely analysed the code but I have the impression that there is plenty of spare CPU cycles, as well.

Link to comment
Share on other sites

  • Replies 60
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Thorsten commented that the 16 x 16 matrix loaded the CPU by ~40% so I am assuming a 24 x 16 matrix would load the CPU by ~60%. I have a 32 bit core on order so I am going to give it a try when it comes in. It might not be necessary to change the SPI clock, but that will offer another lever to pull if I have issues with speed.

Link to comment
Share on other sites

  • 4 weeks later...

Hi !

I'm sorry, I don't want to hijack your thread, but I just want to be 100% I understand well.

Since DIN and DOUT modules have both 32 parallels inputs or outputs, this mean that this keyboard matrix would use half of those I/O (16x16). This mean I could easily add, let's say, 16 push buttons and 16 LEDs without any additional shift registers or modifications.

Could you confirm I'm right ?

Thank you !

William

Link to comment
Share on other sites

Since DIN and DOUT modules have both 32 parallels inputs or outputs, this mean that this keyboard matrix would use half of those I/O (16x16). This mean I could easily add, let's say, 16 push buttons and 16 LEDs without any additional shift registers or modifications.

Correct, the spare hardware is spare for you to use.

Link to comment
Share on other sites

Ok thanks...

I'm currently scratching my head studying the Roland keybed matrix. Since I want to build the BEST 88 notes MIDI controller, I'm currently ordering a new Roland PHA III Ivory keybed (found in the V-Piano or RD700NX). The difference with Fatar (or maybe other keybeds) is that the 2 switches are not in the same position. The easiest way I can explain it is this:

Fatar = 2 switches (1 switch = note up, 1 switch = note down)

Roland = 2 switches (1 switch = note almost down, 1 switch = note down)

This mean that the IC must be REALLY fast to calculate the velocity. Does anyone have a clue on this ? What's the fastest delta (time between the 2 switches) the STM32 can compute ?

Will

Edit: You know it's a bit confusing. I don't have access to a Fatar keybed, but by looking to some pictures on the web, it looks that there's also 2 switches on the Fatar in the same position. Maybe I'm misunderstanding something...

Edited by wsimard
Link to comment
Share on other sites

I'd suggest that the timing between switch closures will be of a similar order of magnitude. (Eg if they're half the distance of the Fatar, then it is straightforward to compensate ie double the scan rate and adjust the timer count to velocity calculation)

There is some flexibility at the Core end to increase SRIO scan rate if necessary and the timer used is of high resolution.

Link to comment
Share on other sites

  • 1 month later...

I have my 24 x 16 matrix working. It works pretty well as is, but I want to experiment with scanning faster. I have been poking around in the ST reference manual and the code trying to understand how to change the SPI clock. It looks like I need to change the APB low-speed prescaler (APB1) is this correct? Will other peripherals used by midibox be effected by changing this prescaler? Where is this set in the code?

Thanks,

TIm

Link to comment
Share on other sites

  • 3 weeks later...

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