Solina String Synth DIY - hex from .ino?

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: luketeaford, Joe., lisa, Kent

Post Reply
stekme
Common Wiggler
Posts: 57
Joined: Tue Jan 22, 2019 12:30 pm

Solina String Synth DIY - hex from .ino?

Post by stekme » Mon Sep 09, 2019 10:34 am

Hi.
Find interesting DIY midi synth
https://moroccodave.com/2017/09/13/diy- ... ing-synth/

I open in Arduino solina_code.ino
But can't convert it into HEX to upload with AVISPmkII.
Because have error:
solina_code:24:18: error: MIDI.h: No such file or directory
compilation terminated.

As I understand - there man include this external MIDI.h file into .ino
I not work before with Arduino (and now need just classical HEX to use). Cant find this midi.h

Also project is unclear to me about how to add firmware to ATMega328P?
I think to use just 2x14 legs IC. But as understand J1 and J2 not for firmware upload?

If anybody interesting - it can be helpful for me. Thank You

User avatar
Starspawn
Ultra Wiggler
Posts: 771
Joined: Tue Mar 06, 2012 8:12 pm
Location: Norway

Post by Starspawn » Mon Sep 09, 2019 12:20 pm

I think you need that midi library to compile.

User avatar
guest
Super Deluxe Wiggler
Posts: 4326
Joined: Mon Aug 19, 2013 11:49 am

Post by guest » Mon Sep 09, 2019 2:56 pm

openmusiclabs.com

quarterturn
Learning to Wiggle
Posts: 17
Joined: Thu Apr 04, 2019 10:49 am
Location: derptown

Post by quarterturn » Mon Sep 09, 2019 5:41 pm

Interesting, but a long way from the Solina sound. It needs a proper ensemble chorus. Sounds like maybe it can do the Randy Neuman vox humana sound though.

User avatar
JimY
Wiggling with Experience
Posts: 323
Joined: Wed Nov 09, 2016 10:03 am
Location: Middle of Wales

Post by JimY » Tue Sep 10, 2019 3:54 am

Get it working on an Arduino Uno or compatible board that uses the 328 chip but find one with the 28pin DIP version of the chip in a socket (you can get it in kit or barebones versions). Upload the compiled sketch via the Arduino USB. The pre-programmed bootloader in the Arduino 328 will take care of that.

Remove the programmed 328 and fit it in your own board that provides the 16Mhz crystal and 5v power for the 328. In the Arduino board, the 328 UART is used for the USB interface, but you will need the UART for the MIDI interface instead.

It ought to be possible to compile to HEX and program a bare 328 chip using 6pin ISP serial connection. But I think it's better to program an Arduino sketch in a complete Arduino environment in order to reduce uncertainty.

stekme
Common Wiggler
Posts: 57
Joined: Tue Jan 22, 2019 12:30 pm

Post by stekme » Tue Sep 10, 2019 9:46 am

Thank You. Found localised version of UNO in my country.
Does I need to use boot loaded versions of ATMega?

User avatar
JimY
Wiggling with Experience
Posts: 323
Joined: Wed Nov 09, 2016 10:03 am
Location: Middle of Wales

Post by JimY » Tue Sep 10, 2019 4:14 pm

The Arduino method does require a chip with the bootloader in it.
You can get cheap UNO type boards without USB with which you also need a separate USB to Serial adapter which you only need to program it with, but it still needs a bootloader in the target chip.

A big advantage with Arduino AVR's is that they should also have the option fuses set to run from the 16Mhz clock crystal. A raw chip from Atmel is set to run from the internal clock at 1Mhz. This causes a lot of trouble for those wishing to program directly with compiled code unless they know how and when to set those fuses.

User avatar
Grumble
Super Deluxe Wiggler
Posts: 1664
Joined: Thu Dec 17, 2015 5:24 am
Location: U aint much if U aint Dutch
Contact:

Post by Grumble » Tue Sep 10, 2019 4:21 pm

I have built this solina some time ago, and it sounds realy good, especially when playing three notes simultanious.
Different from moroccodave I just used an arduino board I bought for less than 2$ from one of the chinese stores.
You do not have the required permissions to view the files attached to this post.

stekme
Common Wiggler
Posts: 57
Joined: Tue Jan 22, 2019 12:30 pm

Post by stekme » Wed Sep 11, 2019 12:47 pm

Thank You for HEX. But now I not understand where to connect programmatic pins on board)) pins marked at J1 and J2 for other connections... Already buy UNO to program ICs with DIP slots. Try to build it at near time.

User avatar
JimY
Wiggling with Experience
Posts: 323
Joined: Wed Nov 09, 2016 10:03 am
Location: Middle of Wales

Post by JimY » Thu Sep 12, 2019 3:55 pm

I do not know which J1 or J2 you are referring to. If you want to program a standard Mega328 directly with the AVRISP device, I think you have to use the 6pin ISP cable and connect to the appropriate chip pins. I use an AVR Dragon programmer and that's the method I usually use.

User avatar
Grumble
Super Deluxe Wiggler
Posts: 1664
Joined: Thu Dec 17, 2015 5:24 am
Location: U aint much if U aint Dutch
Contact:

Post by Grumble » Thu Sep 12, 2019 4:01 pm

you can also use an arduino to program the chip using isp pins.

https://www.instructables.com/id/Progra ... no-As-ISP/

User avatar
JimY
Wiggling with Experience
Posts: 323
Joined: Wed Nov 09, 2016 10:03 am
Location: Middle of Wales

Post by JimY » Fri Sep 13, 2019 4:13 am

Unfortunately, many programming tutorials don't work for one reason. The author worked with target chips that had already been programmed and forgets that that means the clock fuses have already been set for the external 16Mhz clock crystal.

A brand new Mega328 chip...

1: Program flash memory blank and no bootloader.

2: Set to use the internal 8Mhz RC oscillator clock.

3: Have the Div8 fuse set and will, therefore, only run at 1Mhz (1/8th of 8Mhz).

4: The maximum programming speed will be 250Khz (1/4 of 1Mhz).

5: At 1Mhz, the onboard UART communication speed settings will not work for an application expecting a 16Mhz CPU clock.

So on connecting an AVR chip to a programmer, the first thing to do is assume a 250kHz programming speed and then read the device signature and fuses. If you cannot get it to do this then something is wrong and you must fix that before attempting to program anything.

Post Reply

Return to “Music Tech DIY”