Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Building a MIDI keytar

Status
Not open for further replies.
Mmmmm lots to digest there ... as posted my velocity was static ( preset) . did not do transpose as MiDi sound was enhancing the organ sounds the sound box (XG100) fed back into the organ amps ..
 
Here's the first pass of the schematic. I still have to add the AC244 and its' associated connector.
I'll do that over the weekend. It'll give me a chance to redo the AC238 outputs (I'm not too keen on the way they look.)

Next week, I'll pick up a display unit and set up the SPI interface to the display.

The final schematic will be done in Kicad. Then, I can generate the necessary files for making a PC board.

And now, on to the software.

Stay tuned. :)
 
Last edited:
Wow - Your development speed is abnormal!

For "normal" usage of this display You need 7 lines to the Controller, but You can switch it to serial mode via solder point.
But I think You've known this.
And I guess it's quite expensive.

Don't forget the power supply, the contrast pot and backlight for the display in your schematic - I've done this a time ago.

Such displays are availible es OLED version too, that will increase the viewing angle.
E.g. https://www.reichelt.de/display-oled-2x20-116x37mm-gelb-ea-w202-xlg-p113323.html?&trstct=pos_15
20x2 chars. SPI ? - I've not explored.

My favorite would be a grafic display, You know.
But with an 4 Wire SPI Bus You can change it when want any time.
You only have to use an other library.
 
Out of curiosity, how fast does the count have to be? For example how long has a key taken to travel from top to bottom if the velocity is 25?

BTW, Those 20x4 displays are available with spi interface on ebay for around US$4 if you can wait a month.

Mike.
 
MJ .. You must be eating your meals at the work bench :) you seem to have MiDi well under control.. Hope the PIC's 32k Flash is enough... as a side issue...If you have a spare IO , for a prototype I put a Led on a pin that flashes at startup so I know the 'beast' is running... LCD, writing to this display may eat up into your scan uSecs.
 
Last edited:
Wow - Your development speed is abnormal!

For "normal" usage of this display You need 7 lines to the Controller, but You can switch it to serial mode via solder point.
But I think You've known this.
And I guess it's quite expensive.

Don't forget the power supply, the contrast pot and backlight for the display in your schematic - I've done this a time ago.

Such displays are availible es OLED version too, that will increase the viewing angle.
E.g. https://www.reichelt.de/display-oled-2x20-116x37mm-gelb-ea-w202-xlg-p113323.html?&trstct=pos_15
20x2 chars. SPI ? - I've not explored.

My favorite would be a grafic display, You know.
But with an 4 Wire SPI Bus You can change it when want any time.
You only have to use an other library.

@wkrug,granddad: Thanks for the compliment. I'm a New Yorker. We're always pushed into getting everything done "yesterday". :)

wkrug: I was looking at displays and the one I picked from Mouser seemed to be the best compromise.
The cheapest and the most readily available.

Pommie: As far as what scan time will produce a specific velocity, I'm not sure.

Typically, the keybed scan rate is around 2000Hz. That seems to be what everybody else is doing. (Roland, et.al.)
I'm guessing that the geometry of the actual key switch seems to be a standard that was established by Fatar.

Once I get the system up and running, I'll hook a Logic Analyzer up to the pins and see. I'll post pics here. :)

Something just dawned on me. If I add one more AC573 and one more OE strobe, I can make this board handle keybeds of up to 88 keys.

Going to investigate that. :)
 
Typically, the keybed scan rate is around 2000Hz. That seems to be what everybody else is doing. (Roland, et.al.)
You can put an DSO at the 2 sample lines ( or a logic analyzer ), when pressing a key.
The diode lines can be set to a fix potetial.
Then press a key once hard as You playing and once super soft.
So You get 2 reaction times, between the 2 contacts that will give You the span of useable velocity.

When start the keyscan via timer in CTC Mode You can change the scan time very easy, only by changing one value ( Comparematch Value ). Terminology is from AVR - In PIC the functions are possibly named different.
 
granddad: I'm using it as this very moment. :D

It was a royal PITA at first, but I figured out how to use the assembler.

Here's what I have so far.
EDIT: See post #154 for the latest code

Please take a look and let me know if anything looks wrong.
 
Last edited:
This is the latest firmware for the keytar project. It was built using MPLAB-X version 5.1 and the XC16 Assembler.

It is designed to go with the schematic diagram in post #143
This post will be updated as I update source code.

There's still a lot to do. I need to set up and test the A/D convertors, as well as the UART settings.
Then, the SPI display needs to be made working. For that, I have some time because I haven't ordered the display yet.

If you see something that doesn't look right or have some suggestions, please post a reply here. :)

I'm releasing this source to the public domain, with the proviso that you agree to indemnify me and hold me harmless
for any problems or issues that you may have using this source code.

Use it at your own risk and peril. ;)

And please! Be sure to mention this forum if you're asked where it came from.

The folks here have been very kind and helpful. They give freely and ask for nothing in return.

Thanks everyone for all your help and input. :)
 
Last edited:
Well I have the basic ports working. I'm investigating a bug with the OE lines for the AC573s.

Stay tuned... :)
 
MJ .. All the CN pins have a pull up and pull down connections. CNPUxx CNPDxx registers .
 
granddad: Thanks for the heads up. I just made changes to the Change Notification Initialization routine.
I think that should completely shut off pullups / pulldowns on the ICN pins.

Post #154 should be the latest source. :)
 
Ok. The source code has been updated. All of the signals are toggling correctly, albeit a little slow.

Take a look at post #154 for the latest source.

Time for a dinner break. Then I'll do some timing tests and show some pics with the logic analyzer.
 
Last edited:
Here's a picture of the timing. I've been itching to try this logic analyzer out. :)

I'm still in the process of adjusting the timing, so I'll post another pic with more detail at a later time.

2dqhz6.jpg
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top