electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Microcontrollers and Programmable Logic
where to start?
Post new topic   Reply to topic Moderators: State Machine
Page 1 of 1 [8 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
loss1234



Joined: Jul 24, 2007
Posts: 1536
Location: nyc
Audio files: 41

PostPosted: Tue May 18, 2010 5:47 am    Post subject: where to start? Reply with quote  Mark this post and the followings unread

it seems there are so many options. DSp chips, fpgas, arduino, etc etc

what i'd like to do is start by learning one system. some people tell me to start with something that allows for C. some say assembly.

i dont know either so i will have to learn..

but id like to learn something that lots of books and code is out there already


i am very serious about jumping into this but is such a wide field


any advice appreciated on platforms, books, dev brds,et

thanks!

_________________
-------------------------------------------- check out various dan music at: http://www.myspace.com/lossnyc
http://www.myspace.com/snazelle
http://www.soundclick.com/lossnyc.htm http://www.indie911.com/dan-snazelle
Back to top
View user's profile Send private message
Rykhaard



Joined: Sep 02, 2007
Posts: 1290
Location: Canada

PostPosted: Tue May 18, 2010 6:39 am    Post subject: Reply with quote  Mark this post and the followings unread

I recently took the plunge and jumped into it purchasing the PICkit 3 from www.microchip.com
There's a huge amount tutorials available for it and it were cheap at $70 U.S.
PICs available for it allow you to program them in C++ and assembler as well as some version of Basic. Though, I don't know yet which PICs, are open to which languages.
I haven't gone any farther yet than reading the beginnings of tutorials but I will in time, be teaching myself, to begin transferring some of my circuits to, PIC operation.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
loss1234



Joined: Jul 24, 2007
Posts: 1536
Location: nyc
Audio files: 41

PostPosted: Tue May 18, 2010 7:07 am    Post subject: Reply with quote  Mark this post and the followings unread

let me ask (and i must say I am excited that you too are getting into these things as I always respect what you do!!!), can this chip do things like shift registers, oscillators, a/d, d/a? do you know if its an 8bit or a 24bit?


what are some of the things you want to learn to do with it?

and i wonder if there is a book on this one.\


i might just go ahead and order it

thanks so much

love your forum by the way

_________________
-------------------------------------------- check out various dan music at: http://www.myspace.com/lossnyc
http://www.myspace.com/snazelle
http://www.soundclick.com/lossnyc.htm http://www.indie911.com/dan-snazelle
Back to top
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Tue May 18, 2010 8:35 am    Post subject: Reply with quote  Mark this post and the followings unread

There are C compilers for PICs, but I don't believe they are free. MPLAB from Microchip contains a free assembler (which I have used).

dsPIC chips have more DSP capability than PICs, but many modern PICs have a built in DAC and ADC and can do some DSP though with a bit more effort than using a dsPIC.

PICs and other similar devices can do LFO, NCO (numerically controlled oscillator), EG, you name it. The limitation is it's rather low clock rate. These devices also have a limited number of writes available to the Flash program store. You would need to read the datasheet on the device of interest, but the number of write cycles is in the low thousands, some as low as 1000. This means that you write your code, send it to the device for testing and once you have what you want, you stop. Of course, if you've not used many write cycles, you can still do updates and bug fixes as needed. The point is, that it's not meant to be reprogrammed an infinite number of times.

Selecting a device depends on your end intentions.

For creating a board that has a specific function that will not change after development, PICs, dsPICs and related devices are great because the program is stored in Flash - meaning when you power it up, it's live. Monosynths are possible with reasonable complexity. Polysynths - perhaps - but not very many voices if complexity is a focus.

I cannot speak for "true" DSP ICs (such as Shark), I've never used them. They are fast (hundreds of MHz clock speed) and efficient. They are capable of polysynths with reasonable complexity.

An FPGA is _very_ powerful, rivaling traditional DSP ICs, even modest sized ones will support a fairly complex complete polysynth (I've done 8 and 16 voice polysynths in smallish FPGAs). The downside is that you need to learn an HDL (hardware description language) such as Verilog or VHDL. The languages themselves are not horribly complex in my opinion, but the use of them requires a change in thinking from "programming". HDLs are not programming languages despite what they look like. If you are accustomed to thinking in terms of counters, blocks of RAM, gates, adders, subtractors etc., you use the HDL to connect these things together to make a functional system.

Unlike PICs, dsPICs, AVRs, etc., FPGAs are not Flash based, so they must be programmed at each power up. This is normally done one of two ways. 1) FPGA systems will normally have a Flash RAM on the same board which is used to programm the FPGA at power on. 2) An FPGA (which is static RAM based) can be programmed at any time manually via a JTAG interface. Because FPGAs are static RAM based, they can be programmed an infintite number of times.

The software I use to "compile" an FPGA design is called ISE (from Xilinx) and is free. There is a "buy it" version that has more features, but I'm told isn't all that much better than the free one, especially for hobbyist use.

I've purchased FPGA development boards (which support my synthesizer designs) with prices from $50 to $300.

If you're interested in what I've done with FPGAs, the FPGA link in my sig will take you to my FPGA website where you can find descriptions, source code and sound samples.

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
monokinetic



Joined: Aug 01, 2006
Posts: 100
Location: prague

PostPosted: Tue May 18, 2010 1:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hi loss1234,
If you are going to learn about embedded processors then I would say that C is lot easier to wrap your brain around than assembler. Plus learning C for one embedded device will set you up with the knowledge to go on to other devices, assembler is often quite device specific. Personally I couldn't handle assembler, bit too deep for me Smile

I have used both the Microchip C compiler and SDCC for developing PIC based stuff (nothing fancy, flashing LEDs on an off is about my level!). The Microchip C compiler is available as a student edition,which is free. Last time I checked you could compile up to a limited size with the free version, but I never hit the upper limit in my experiments.

SDCC, found here:
http://sdcc.sourceforge.net/

is a totally open source C compiler which supports PICs. This is free and there's loads of info online for using it. I played around with it a bit during some Midibox experiments. (I can recommend having a look at the programming sections of the Midibox forum as well, loads of useful info there).

The other cheap hardware route to go is Arduino, which runs on an Atmel chip. I don't have much experience with it, but one friend of mine uses it with the Wiring programming environment to do some pretty cool stuff as well.

I'd say look at learning to program as the main objective, then the skills you learn will be portable to many different processor platforms and toolchains. The key IMO is to get your head around the actual programming concepts, then you can apply that background knowledge when learning the syntax of different languages.

HTH

David
Back to top
View user's profile Send private message
droffset



Joined: Feb 02, 2009
Posts: 515
Location: London area
Audio files: 2

PostPosted: Tue May 18, 2010 7:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

I have an Arduino but haven't put it to much use. Not really sure what to do with it. Most of the projects on the web look like little proofs of concept that you do, see that it's working, then take apart. Some are great though, like the MIDIvox which certainly has potential as a starting point but I wonder if it also highlights the platform's limitations. The MIDI to Gameboy synth stuff is also cool. But is that basically it? Can the Arduino do one, maybe two main tasks and that's it?

Since I've had my head in CMOS land for a while now the FPGA stuff sounds interesting (the way ScottG describes it) just for the reason that it appears to be a methodology I'm already thinking with. Sounds like a mega Lunetta, to be honest. Kind of dreamy if that's the case.

No real point to this post, just thinking out loud.

_________________
==================
Check out the FREE Intro to Lunettas Document
https://docs.google.com/document/d/1V9qerry_PsXTZqt_UDx7C-wcuMe_6_gyy6M_MyAgQoA/edit?usp=sharing

Edit: Spelling mistakes.
Back to top
View user's profile Send private message
okvern



Joined: Feb 05, 2008
Posts: 78
Location: Seattle, Washington
Audio files: 5

PostPosted: Tue May 18, 2010 9:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hi loss1234 (dan),

Just at a guess, considering your posts here and on Synth DIY, I'd say that you'd be happiest starting with an Arduino. The Arduino IDE is cross platform (so it'll run on the Mac OS, which I recall you have), it's a hybrid C/C++ environment (life is too short to learn assembler for a specific chip--in my opinion, of course), and you can connect to the board via USB. The IDE is free; the boards cost around $20.

There really isn't a simpler way to get started--the whole point of the Processing/Wiring/Arduino approach is to get artists connected with programming and hardware.

Once you get the hang of things, you can use your Arduino board as a development platform, and deploy circuits using just an ATMega 168 (or 328), a crystal oscillator, and a couple of capacitors. Cheap!

There are many examples of synth-related projects in the Arduino forums, or via a simple Google search.

Note that the Arduino itself is not ideal for generating sound. It's not terrible, it's just that it's too slow/limited to do it well. It's fine for generating MIDI messages or control voltages (via a DAC, generally--the PWM outputs are not really sufficient). The point is to get familiar with programming microcontrollers, then move on to more complex/capable circuits.

If you do choose to go the Arduino route, there are a couple of libraries that you should be aware of right off the bat--the MIDI library from "Frankie" (who sometimes appears on this forum) and the Scheduler library by A. Brevig. Scheduler can be extended to be a great method of timing MIDI events.

I've written MIDI sequencers, clock dividers, rhythm generators, etc. using the Arduino (there's a movie clip in the FractalSynth thread of a four-channel MIDI sequencer I built around an Arduino and a VS1053 general MIDI chip). I've also tested real-time audio generation with the Arduino and found it quite limited.

As usual, it all depends on what you want to do.Smile

Thanks,

Ole
Back to top
View user's profile Send private message
Rykhaard



Joined: Sep 02, 2007
Posts: 1290
Location: Canada

PostPosted: Wed May 19, 2010 4:16 am    Post subject: Reply with quote  Mark this post and the followings unread

loss1234 wrote:
let me ask (and i must say I am excited that you too are getting into these things as I always respect what you do!!!), can this chip do things like shift registers, oscillators, a/d, d/a? do you know if its an 8bit or a 24bit?


I am quite excited in return, that you are as well! Smile As well - much respect and thanks in return, for your respect. It's been cool watching your building develop over time, as I've reflected on how I had progressed myself, back from '82 and on. Smile

From what I've read everywhere so far (including here, in the past) - yes, to everything that you asked about, above. Smile
8, 16 and 32 bit processor wise, from them.

Quote:

what are some of the things you want to learn to do with it?


Mostly, controllers. When I finally learn what I have to build, to support the PIC itself, that will plug in to the PICkit 3 (Voltage Reference and anything else that may be required - THAT, is what I'm trying to find examples of, online - and haven't yet. Sad )

I'd like to start with a simple Attack / Decay envelope generator.
Once successful with that, then adding voltage control to each of them.
Once successful with THAT, then going back to my idea that I had late last month or early this month, of a Voltage Controlled Peak / VC Attack / VC Decay, EG.
From there - next to LFOs, then VCLFOs, then VCLFOs with controllable waveshapes, then VCable waveshapes.

From there - other types of controllers including 1V/octave sequencers and drum machines. (To replace my current functioning, hardware designs.)

My overall goal, is to shrink my circuit board sizes, hugely, as they have been becoming quite large, with all of the features that I continue to add on to most of them. Surprised Sad

Quote:

and i wonder if there is a book on this one.\

i might just go ahead and order it

thanks so much

love your forum by the way


There IS a tutorial book that I downloaded, from their site, that is very well written. Since you'd posted though, there've been many other very good responses! If I hadn't already invested in the PICkit 3 - I MIGHT have had a look at the Arduino one.
But from what I've seen around, especially at the MIDIbox site - www.ucapps.de - all based around Microchip PICs - I've been blown away at the potential possible from them.

The biggest thing holding me back so far, has been in learning how to build the interface for my PICs that I bought, as well as relearning C / C++.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic Moderators: State Machine
Page 1 of 1 [8 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Microcontrollers and Programmable Logic
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use