Unveiling my second project

  • This Monday I'll travel to Barcelona. I'll take this oportunity to acquire new components (do you believe it? I have a lot of 32K SRAM, but no 128K ones! ). As I don't know how much time wil pass until I could travel again and acquire more components, I'll try to get enough material to cover as many projects expected to take place during Summer.


    So I think it's time to present an idea I've been coving since January, when I (accidentally) found a MC-16 schematics scan. The MC-16 was the first sound card the Apple ][ had, and (I may be wrong) it was maybe the first commercial sound card a microcomputer had.


    Examining the diagrams I learnt some things. First, that a simple soundcard contains two sections: an analog one containing an operational amplifier, DACs to control the volume of each voice and resistors to mix the different voices; and a logic one which is a programmable signal generator. In the case of the MC the signal generator is a 8253 PIT, which was made as a support chip for the 8085. The original PIT is not made anymore, but the 82c54 is still in production and they are compatible.


    About the name of this project:

    I decided to name it "Shakuhachi". A shakuhachi is a very simple vertical flute made of bamboo.


    Image courtesy of Wikimedia commons.


    Just that, a bamboo pole with some holes. And the MC is just a counter with some DACs... Do you see the simile? :)


    This project is sure that won't be finished during Summer (so no false expectations). But the goals are the following:

    #1: Clone the design, adapted to use modern-day components

    #2: Experiment the following designs:


    square.jpg

    Square wave


    pulse.jpg

    Pulse


    sawtooth_inversesawtooth.jpg

    Sawtooth/Inverted sawtooth


    Triangle

    #3: If (#2) successful, think about integrating as much as possible in a card.


    Thank you for your time and my apologies for such ugly and dirty drawings.

    When I tried to list all retro systems I have at home, the "The message is too long, must be under 500 characters" error appears! :lol:

  • this is a joke isn't it?


    Stefan



    No, it isn't. I forgot to mention that it is not an Apple ][ project, but a P2 one. While I had not seen this other thread, I see it makes use of the old DACs which I'll try to replace.

    When I tried to list all retro systems I have at home, the "The message is too long, must be under 500 characters" error appears! :lol:

    Einmal editiert, zuletzt von jlopez () aus folgendem Grund: Ortography

  • So , in that case sorry about my doubts.


    Stefan

    Why did you thought I was joking? ::cry::

    After I found the schematics I made some research and found other computers (mainly Russian clones of other systems) implementing sound using the same approach. Why Russian clones can have some good audio and my poor old P2 just a beeper? That's not fair!


    Don't worry, after all it's a hobby and everything here is just for fun and for learning purposes. :)

    When I tried to list all retro systems I have at home, the "The message is too long, must be under 500 characters" error appears! :lol:

  • Hello


    I have a first version of the design, using common parts and adapted to the 96-pin bus of the P2. At first glance it can be seen that an entire byte of the address is unused, so in case of a wirewrap the area near the connector wouldn't be as crowded as the memory card was.



    The analog part is still to be drawn, I have never worked with DACs or OPAMPs. I think I'll use DAC0800 but I don't know about the replacement for the LM307... I'm going to do some good research to find suitable present-day replacement.


    This is enough to add some ICs to my BOM list.


    Thank you very much,

    Jaume

    When I tried to list all retro systems I have at home, the "The message is too long, must be under 500 characters" error appears! :lol:

  • It's been a long time...


    I've done a more exhaustive research and I've drawn parts not expected before into the project. It now doesn't follow the previously shown schematics. Its overall structure resembles that of a MC-16, but every channel behaves more like a Disney Sound Source, without its frequency limitations. I won't be able to wire it, so I ordered a 5-unit batch of prototypes. I don't know if something good will come from this, but for me it's worth to try.



    That's a preview of the front of my board. The only difference with the real boards is color, which is white.


    Regards

    When I tried to list all retro systems I have at home, the "The message is too long, must be under 500 characters" error appears! :lol:

  • Pretty nice Project.


    The original DAC for the MC16 uses a companding u-Law algorithm. It simulates 12 bit dynamic range. Since you don't intend to use the original software, I would advice using a normal linear DAC like the TLC7226 quad-DAC. It reduces the needed cipcount for the basic wave generator stage to 5 or less chips. 1x245 for address buffer, 1x373 for data latch, 1x138 decoder, DAC, 8254 PIT. for the LM307 you can use a LM386 or similar. If you use a quad opamp, you can use one DAC-output directly. A on-off 'VCA' can be archived with a simple diode (the output from the 8254 pulls the DAC-output low through the diode).


    look at the PICSYNTH for a nice waveshaper that will work with the basic wave generator stage:

    http://picsynth.000space.com/schematic.html


    Nice project :)


  • Thank you very much!


    The truth is that, when I saw there was an answer I was a bit scared. It could have been a second attack by angry Apple fans mad at me for I still don't know what reason.


    Thank you for your suggestions. I remain with the DAC0800 family but if I find it not working as expected I'll study again a quad-dac integration. I considered them but I didn't know how to solve conflicts in case more than one channel tried to write at the same time... But I'll consider them again after testing. I used a TDA2003 as amplifier. It should be enough for a 4 ohm speaker. And sure, I'll take a look at the PICSynth schematics. They look interesting.


    My expectations on those first prototypes are not high. I expect to have to patch them in a way or in another in order to make them work (that's a Russian roulette) or to improve their performance.


    Thank you again!

    When I tried to list all retro systems I have at home, the "The message is too long, must be under 500 characters" error appears! :lol:

  • Im happy to see that someone tries to make a PIT based basic sound card as well.


    The DAC0800 is an old design and is not very easy to master.


    The TLC7226 is cheap ($1 per chip) and can be directly accessed by a MCU since it has internal address decoders and latches. It is perfect for 5V peak analog output and only needs 12V and 5V to work reliable. I got a bit less than 4.9V peak (FF) from the analog output with 5V reference from a LM78L05 and it is very stable with little noise. The amplifier part of the MC16 is pretty generic and the TDA2003 is as good as any other AMP. If you use any analog reference voltages, try to get them from separate voltage regulators! don't forget chip decoupling since you will likely have no separate analog ground. You will get a lot of noise otherwise. Every digital chip should have a 10nf decoupling cap to reduce noise. You can create separate power zones by using multiple LM78L05 (a bit overkill ;) ).


    You can try to build a prototype on a breadboard first (worked for me very well). You can use a Microchip or ATMEL MCU to test the function. Try to get the basics out of the way first. Auido-stuff can get complicated at times since leakage and different voltage levels can make things very difficult. Leave that for later until your digital system is working. Start simple and get more complex later on.


    The PIT is very easy to program. Get that running first. then add the DAC and evolve the design step by step. You will only burn money if you directly start off with a complex design on a PCB prototype. If you have a working design for part of the features, make a PCB module with input and output leads for further prototyping.


    The waveshaper part will be really 'ugly' as you want to change the parameters via software. Make modules with dedicated functions until you have a working prototype... If you have everything together, you can try to think everything down to a single PCB. That alone will be a tough challenge as digital and analog parts don't like each other very much ;)


    You will never get the correct 1782Khz quartz like the MC16 uses.

    Just use 1Mhz or 2Mhz for the basic PIT clock or try to get a 3560Khz (or 3562.5KHz) quartz to get close to 2x the MC16 clock. Don't try to use resonators (they sound really bad).


    These are just helpful meant comments. I don't know how much you have developed in the past and you might already have a good grasp on how to archive your goal.


    Im very interested in your further work. Don't get angry or frustrated if you get bad comments or someone is making you angry. These are often only misunderstandings. Most people here likes a nice retro project like yours :)


    -Jonas

  • Hello,


    Your posts are the only helpful comments since I opened this thread and I thank you again for the information you handed to me. My experience consist as assisting repairs during 6 years, repairing computers and consoles by myself for the last two years. But conducting actual hw projects... I'm just starting. I'm a sw man. I've drawn a lot of schematics since I started university and got directly into a box. Some of my ideas are just exiting this limbo, others are just impulses. But in any case I'm limited by what I know (or more likeli, what I don't know).


    A couple of weeks ago I decided not to wire a board again. My hands tremble, but since mid-Summer it has worsened. It's difficult for me to do that. I also learnt from a failed experiment that debugging a point to point design ("spaghetti" is a more suitable term than design) is complex. And surprisingly I found it's cheaper to order crude prototypes than buying a stripboard. But, of course I'll assemble and test section per section and fix any error found. Starting with decode logic, then clock, then PIT...


    I'll try my design as is (mostly because there are five units in production just now). But I'll buy the parts you commented in order to try more than a single option. There is more than a single way to achieve the same thing. I'll consider seriously everything you say, as your experience is a valuable resource.


    About the clock, I expected this and got an aternative. I'm using a 3.579545MHz quartz in a typical not-gate square wave generator and frequency is halved using a flip-flop, therefore having a frequency of 1,789772 which is very close to that of the ALF. It "should" work.


    About long projects.. I know what it is. I've a CBM 3032 which needed some spares and was in the limbo for three years. :)


    Thank you very much,

    Jume

    When I tried to list all retro systems I have at home, the "The message is too long, must be under 500 characters" error appears! :lol:

  • Yesterday I bought most of the parts needed for building a pair of the prototypes. I failed to acquire most of the required resistor networks, and other crucial components such as FIFOs and memories for another project. Harting 96-pin could only get one, mainly because the only store where I could find it was liquidating stocks. Today has closed and won't open again... Onda Ràdio in Gran Via de les Corts Catalanes, rest in peace.


    This morning I had a strange talk about yesterday's purchase. It's messed and... bizarre. An excerpt is transcribed as follows:


    My mother: "Vas comprar molt ahir?"

    Me: "Sí, ho vaig trobar gairebé tot. Vaig comprar un kit. I ara a més tinc dos pits."

    My mother: "??"

    Me: "Si, dos pits"

    My mother: "Dos pits?"

    Me: "Sí, dos 8253 Programmable Interval Timer"


    I leave it untranslated, the confusion only happens when using my native language (Catalan). Google translator will mess it (correctly) for you :).


    In about a month, I will receive the batch. That gives some time to search for the missing parts.


    Regards

    When I tried to list all retro systems I have at home, the "The message is too long, must be under 500 characters" error appears! :lol:

  • Hello Jaume,


    that's a well-known dealer for electronic components - right?

    Onda Ràdio in Gran Via de les Corts Catalanes

    Link from your dealer?

    Too bad that you do not get so much trouble for some components to the project.

    In my area there are no shops - usually you get only about mail order companies at all to get something.

    Come time - come advice, and when you have all the pieces together.


    Good luck and best regards

  • Hello!


    Yes, it is. This web is not updated. Nearest ine is in Sant Feliu (I think). The one they closed was the nearest... and my only provider of Harting connectors. I'll need to order them from other sites (something I tried to avoid). In my country (Andorra) there's only one shop, and there's nearly nothing.


    Regards

    When I tried to list all retro systems I have at home, the "The message is too long, must be under 500 characters" error appears! :lol:

    Einmal editiert, zuletzt von jlopez ()

  • Just for info:

    The Roland CMU800 did use 2 PIT for tone-generation as well. The tones are seemingly generated at 2x the desired clock and then reduced by half (via flipflop) near the analog circuit of the individual tone. There is a rhythm generator in the schematic as well.


    Externer Inhalt soundcloud.com
    Inhalte von externen Seiten werden ohne deine Zustimmung nicht automatisch geladen und angezeigt.
    Durch die Aktivierung der externen Inhalte erklärst du dich damit einverstanden, dass personenbezogene Daten an Drittplattformen übermittelt werden. Mehr Informationen dazu haben wir in unserer Datenschutzerklärung zur Verfügung gestellt.

  • Just for info:

    The Roland CMU800 did use 2 PIT for tone-generation as well. The tones are seemingly generated at 2x the desired clock and then reduced by half (via flipflop) near the analog circuit of the individual tone. There is a rhythm generator in the schematic as well.


    Externer Inhalt soundcloud.com
    Inhalte von externen Seiten werden ohne deine Zustimmung nicht automatisch geladen und angezeigt.
    Durch die Aktivierung der externen Inhalte erklärst du dich damit einverstanden, dass personenbezogene Daten an Drittplattformen übermittelt werden. Mehr Informationen dazu haben wir in unserer Datenschutzerklärung zur Verfügung gestellt.

    Hello!


    Thank you very much! :)

    I didn't know Roland made a design based on the 8253. This one is a very complex design... Too much for me, but I saw they used an 8255. I considered using on of those too, but at the end didn't include it. Is curious that fact you said that tones are generated 2x and halved on the outputs. I don't understand why (I do on the clock input of the timer), but I'm sure they had their reasons. Another curious fact is that IC7 must be NEC-made... Is there any difference with other PITs?


    As you can see, I tried to improve the mood of the thread by including a humorous talk I had, but failed :wand:. I thought it could help but it was maybe a bad idea.


    Regards

    When I tried to list all retro systems I have at home, the "The message is too long, must be under 500 characters" error appears! :lol:

  • The reason for the flipflop to half the tone frequency is most likely due to reduce analog interference with the tone signal. The flipflop produces a clean TTL signal that is directly fed into the analog circuit without beeng routed around the PCB. The tone signal line is therefore simply a TTL-signal and can be routed anywhere on the PCB without signal degradation until it reaches the flipflop. Pretty ingenious, I think.


    Regarding the NEC: I don't really know. Maybe there are power restrictions or the NEC parts have higher current on the output.. or something? Normally this is only relevant at the date of manufacturing as special or especially reliable parts may be only available from certain manufacturers.


    I have 2 CMU800 for the Apple II. They sound pretty nice. The circuit is a bit big but there are some nice designs that may be party reused in other projects. The AR circuit is interesting.


    As you can see, I tried to improve the mood of the thread by including a humorous talk I had, but failed :wand:. I thought it could help but it was maybe a bad idea.

    Nah, don't take it personally, just forget about it ;)

    Keep cool, everything is good.


    -Jonas

  • Hello,


    It's been a while since this was updated for last time. Time to remove dust!


    I've cut traces and rewired some parts to get a minimal framework to work on. Thanks stynx for your advice: it has been gold.


    First successful test: https://youtu.be/wg34Kmr1SPU

    First test with all three channels wired: https://youtu.be/X9GiK0UUjbk


    This is still unfinished, but I'm eager to complete it.


    I had a serious problem as I was underequipped, but now and for three months I have a working scope and a signal generator to help in repairs and projects.


    Regards

    When I tried to list all retro systems I have at home, the "The message is too long, must be under 500 characters" error appears! :lol:

  • First successful test: https://youtu.be/wg34Kmr1SPU

    First test with all three channels wired: https://youtu.be/X9GiK0UUjbk

    Nice!


    I can remember when I first got signals out of my 'ALF MC16'-like circuit. It did not have the volume control connected to the frequency generators and I could only see the waveshapes on an oscilloscope. It was like magic to see the frequencies change and have the volume levels dance around at the same time. I had the advantage to have the ALF MC16 software to test the circuit.


    The first audible sound came later, but this moment to see the system work in principle with only 5 chips... magic.


    btw: there was a Russian sound card for a Russian 8088 based computer Apple II clone that used 8253 PIT for audio generation as well (can't find the link on the web at the moment). It had pretty nice sound... the rectangle wave output was heavily modified by an analog circuit with limited computer control. It has a very organic sound as the waveform changes a bit with volume (normally not wanted).


    Here is a video:

    https://www.youtube.com/watch?v=Pyzk-iZwCPE


    ... and a site with a few schematics to the card:

    http://agatcomp.ru/Reading/jzs52.shtml


    -Jonas

  • I can remember when I first got signals out of my 'ALF MC16'-like circuit. It did not have the volume control connected to the frequency generators and I could only see the waveshapes on an oscilloscope. It was like magic to see the frequencies change and have the volume levels dance around at the same time. I had the advantage to have the ALF MC16 software to test the circuit.


    The first audible sound came later, but this moment to see the system work in principle with only 5 chips... magic.

    Yes, pure magic...


    Talking of software, ALF code won't work: different processor, distinct architecture.

    This is what I used:


    When I tried to list all retro systems I have at home, the "The message is too long, must be under 500 characters" error appears! :lol:

  • Talking of software, ALF code won't work: different processor, distinct architecture.

    This is what I used:

    I though so.

    maybe you can use the ALF sound-files. They are pretty "generic" and are a bit like early midi-files. they use a completely different semantic though. I had programmed a somewhat working interpreter on a PSOC MCU once to interface a Yamaha sound chip.

    The nice thing about the music files for the MC16 and MC1 sound cards are that everything is very much usable on any synthesiser system. The complete description of the format is in the MC1 manual.

    http://www.applelogic.org/file…0MC16%20Manual%201983.pdf

    page 104 .. page 112


    You would have to extract the song-files from the apple II disks but there are a LOT of songs there.

    Most of them are for more than 3 voices, though. I have a sorted folder with the songs files somewhere... I can upload a zip when I find them.


    -Jonas

  • Thank you very much!

    When I tried to list all retro systems I have at home, the "The message is too long, must be under 500 characters" error appears! :lol:

  • Thank you very much!

    i have found an early version of my ALF-player.

    it's programmed in C and may help you interpreting the files..


  • Thank you. I'll take a look on them as soon as possible.:thumbup:

    When I tried to list all retro systems I have at home, the "The message is too long, must be under 500 characters" error appears! :lol:

  • Yesterday I built and patched board nº2. The patch was completed today after lunch. Board nº1 was built having in mind a minimal test, so I cut traces from both 7474 to the PIT and forced them to be high. This way there was always output from the PIT. The issue was that once the chip was programmed, there was no way to stop sound to be generated. To enable data to be stored by the 7474 a revision of the decoding logic has been done, and the required patch has grown considerably.


    Today's test: https://youtu.be/LvucYHNCRVo


    The current boards are obsolete. I knew that they had issues to work when I ordered them, but I guessed (correctly) that could be made work and now that this has happened, I'd like to integrate the changes from the patch into the board, remove the known failing sections, add debug parts and make the rest of the board (approx. >50% of the surface) as a prototyping board to ease construction and testing of an envelope generator.


    Regards

    When I tried to list all retro systems I have at home, the "The message is too long, must be under 500 characters" error appears! :lol:

  • The 8353/8254 has a gate input for each of the 3 outputs. You can use this the mute either all channels together or individually. The inputs are nor really useful for sound-generation as any manipulation is rather done by an analog circuit on the final waveform of each channel.


    The ALF MC16 card had a small circuit to use the gate-inputs of the first 2 channels to be enabled/disabled from the 3rd channel. Some interesting effects were possible but this feature was rarely used in any song (i have fond no song at all!). Its impact was not big enough to loose one channel for it.


    Just use a 8-bit register (74LS373 or 74ls573) to enable or disable the channels.


    Looked at your schematic... you have done that :P


    -Jonas

  • I use the remaining D flip flop from the '74 responsible of halving the clock plus an additional '74 to use those inputs. It was a bit annoying to have that thing making loud tones without control. :D

    It's all under control now.:thumbup:

    I have heard some reduction on volume randomly... noise? I imagine that the amount of wiring to make it work is introducing it.

    When I tried to list all retro systems I have at home, the "The message is too long, must be under 500 characters" error appears! :lol: