1
\$\begingroup\$

Okay guys, I searched the forum and didn't find anything relevant. Here it is:

I am planning on building an arpeggiator project based on the Yamaha YM2612 IC which was the sound chip used in the Sega Genesis console. I ordered the chips online and am waiting patiently for them to get here, and meanwhile researching as much as I can to find out what I need to do to make this project work.

My question is: which of these microcontrollers would be the best to use for this project? (These are the microcontrollers I already own, although I could buy another one if none of the ones I have will work)

*-Arduino Uno R3

-PIC 18

-Raspberry PI

-Arduino Nano

-Teensy x.x* (I do not own one of these but this may be the best option based on other projects I have seen.)

I would guess that the PIC18 would be the best to use since I could program it in assembly language, but I am just now beginning to learn assembly language and C would be much easier for me. I saw a guy on YouTube who was using an Arduino Uno who built a project like this and it wouldn't run corrently, and he suspected that it was due to latency problems, so maybe the Arduino is out. Any help here is welcome.

For a little bit of background on the YM2612, it is a 6-channel FM synthesis chip with 4 operators which can be routed in 8 different configurations. It uses data exchange to write values to its internal registry to alter parameters like attack, decay, sustain, release, frequency, amplitude, etc. It is suggested to operate at a 7.67 MHz frequency and so I was planning on using an 8 MHz crystal oscillator (resonator) to provide the clock. Eventually I will integrate this project with a keyboard that outputs midi data (or maybe even bypassing midi, just using the microcontroller to control the chip manually) so I will be leaving this project open for further changes/revisions.

Also this is my first project of this type, I know it could be considered a big bite but I am here to learn. Any help is welcome, thanks guys

P.S. Here is a datasheet for the YM2612: - http://www.datasheetspdf.com/PDF/YM2612/865751/1

...and here is a video of something similar: - https://www.youtube.com/watch?v=XlDlF1MOaUA

\$\endgroup\$
  • \$\begingroup\$ So, what number of commands per second does it need to compute and send when running at the maximum speed. Or, put another way, what is the data control max throughput rate for the YM2612. Calculate, calculate and calculate. \$\endgroup\$ – Andy aka Sep 22 '16 at 22:13
  • \$\begingroup\$ did you consider YM3438 avail in 3 days? utsource.net/… \$\endgroup\$ – Sunnyskyguy EE75 Sep 22 '16 at 22:23
2
\$\begingroup\$

YM2612

This chip was designed to be used as a peripheral to 8 bit CPUs running at a handful of MHz. When you look at the "datasheet" (just a pinout, really), you'll find that there are three groups of pins you have to care about:

  • D0 to D7
  • Control pins (CS, WR, RD, A0, A1)
  • IRQ

The data bus is bi-directional, the control pins are input-only, and the IRQ is output-only. It is obvious that this chip was originally designed to be mapped into the address range of an 8-bit CPU, but none of the devices you have on your list can do that (to my knowledge).

What you need

There are two features you want on your board that will make your life easier, and this rules out a few of them:

  • 5 V I/O so you can hook the board up directly to the chip, without having to bother with level-conversion.
  • At least one complete 8 bit bi-directional port so you can write values directly without having to split your data up and write it several times.
  • 6 more pins for the control signals

This rules out the Raspberry Pi, the Arduino Nano, and some of the Teensy boards, and leaves the Arduino Uno, PIC, and some older Teensy.

I would consider these three more or less equivalently suited for your purpose. The latency problem you hinted is likely a newbie mistake, trying to use some software-delays in the Arduino. That just won't work for these things, you need a stable hardware timer to synchronize every write. You can do this with the integrated Arduino IDE.

Suggestion

Considering that you already have a PIC, and you seem to know how to program it in assembly (even if you're not yet comfortable doing so), I would suggest that this is your best option for a number of reasons:

  • Nothing is stopping you from programming most of it in C using MPLAB X, perhaps using a mix of assembly routines where you think it's required.
  • It has the requisite timers and interrupt mechanisms.
  • You already have one.
  • Depending on the PIC, you may be able to use its internal FOSC/4 clock output as your 8 MHz clock.
\$\endgroup\$
  • \$\begingroup\$ The Teensy 3.1 & 3.2 are 5v tolerant. It's not clear that there are that many read signals anyway. Have you determined that the write levels from a 3.3v output would be insufficient for the chip? \$\endgroup\$ – Chris Stratton Sep 23 '16 at 1:56
  • \$\begingroup\$ @ChrisStratton No, I haven't. They might be, but that doesn't make them suitable for this particular project when there are a lot of "real" 5 volt devices on the list, IMO. \$\endgroup\$ – pipe Sep 23 '16 at 2:09
  • \$\begingroup\$ That's a rather un-thought-through thing to say. Without checking, you are arguing that a much more limited part is a better choice than a much more capable part. \$\endgroup\$ – Chris Stratton Sep 23 '16 at 2:12
  • \$\begingroup\$ Indeed. The information I can find with a quick search only gives me register maps, nothing about the hardware levels. Considering it was designed for a 5 volt system and the author unlikely has the means to debug potential issues, I don't feel comfortable recommending anything else. Since the platforms that are left after removing 3.3 volt devices are still perfectly capable, I don't see the point of gambling here. \$\endgroup\$ – pipe Sep 23 '16 at 2:18
  • \$\begingroup\$ (To be fair: @ChrisStratton has a very valid point, in that most of these chips would work perfectly well in a 3.3 volt system, with a low enough VIH) \$\endgroup\$ – pipe Sep 23 '16 at 2:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.