News:

SMF for DIYStompboxes.com!

Main Menu

Microprocessor preferences?

Started by Unlikekurt, November 13, 2019, 06:26:53 PM

Previous topic - Next topic

Unlikekurt

Hello
I'd like to start delving into some microprocessor stuff.  It seems to come up time and time again on forum posts as being the obvious and simple solution to a lot of design wishes and design issues.  The downside of course being that there is a new language to learn; which is often a daunting prospect.
That being said, I'm wondering if there are any standout preferences between processors and how language impacts selection?
I've seen some projects that utilize the ATtiny chips and some that use the PIC chips.  Is there a common language that these processors utilize?  I believe ATTiny utilizes C, but I couldn't find anything declarative regarding PIC, lots of reference to Arduino, of course.

Can someone who has tackled this mountain over some direction to a beginner as to where to set forth?  Perhaps an instructional book for beginners, etc?

Thanks!
James

Blackaddr

Teensy 3.X for projects with lots of switches or knobs. Teensy 4.0 for brute DSP speed.

I make and sell these on Tindie but the schematics are public in the documentation so you can always build your own design for the Teensy processors. Just don't underestimate how hard it is to create a low-noise design when combining analog and digital in a guitar effects project!
Blackaddr Audio
Digital Modelling Enthusiast
www.blackaddr.com

ElectricDruid

Both the AVRs and the PICs can be programmed in C. Both processor families can also be programmed in assembly language. Assembly is probably an acquired taste.

The Arduino is based on AVR processors and has a set of libraries and pre-built code that can help get you up and running very quickly with a lot of common stuff. From the hardware side, there are loads of Arduino format 'shields' which plug together with your Arduino board and add extra features (MIDI In/Out, say, or Relay control). The Arduino language is basically C, so if you start with Arduino, you'll learn stuff you can take to other platforms or chips later on. Most microprocessors need some kind of programmer-hardware-gizmo that you plug into your computer to talk to the chip, but the Arduino boards include all that so you only need a USB cable. It's very easy.

The Teensy that BlackAddr mentioned are a series of much more powerful and mostly Arduino-compatible boards that provide a big step up in terms of performance.

It depends a bit what you want to do. For doing control functions like producing interesting LFO outputs, adding LEDs or LCD screens, talking to digipots and adding memories to your pedals, you won't need more than a normal Arduino/PIC/AVR. If you want to get into actual processing of audio (so building fully digital pedals, instead of *digitally-controlled* pedals) then you'll need the extra horsepower that the Teensy provides.

As an idea of the sort of thing that's possible even with very basic chips, there's various threads on the site that mention stuff people (mostly Kipper!) have done with my StompLFO chip, which is an LFO designed on a small 8-pin PIC chip. I used this for my FilterFX LFO-controlled filter pedal. Other people here have done similar things with Arduinos or AVRs. I also did a combined LFO+BBD clock on a single PIC as the basis of my Flangelicious project.

https://electricdruid.net/filterfx-lp-bp-hp-lfo-filter/
https://electricdruid.net/flangelicious-a-super-dooper-flanger/



audioartillery

I don't know why anyone would choose AVR or PIC for audio processing.  The ARM-based boards like the Teensy that BlackAddr suggests are so much better.  And there's a lot more to it than just the microprocessor.  You need a good audio interface (codec).

ElectricDruid

Quote from: audioartillery on November 22, 2019, 06:29:49 PM
I don't know why anyone would choose AVR or PIC for audio processing.  The ARM-based boards like the Teensy that BlackAddr suggests are so much better.  And there's a lot more to it than just the microprocessor.  You need a good audio interface (codec).

No-one suggested that they should. I mentioned AVRs and PICs for control tasks. There's lots of ways to use a microprocessor in a pedal that don't involve actually processing the audio. For a lot of people, keeping the audio path analog is sacred, but they're still happy to have access to features that digital makes easy (like tap tempo, for example). A digitally-controlled tremolo or phaser can have more waveforms and options for less circuit, without ever touching the audio path.

If you want to process audio, yes, you need more horsepower and a decent codec if you want good quality.

jwhitmore

Just registered and rather then start a new thread thought I might add to this thread, as it's kinda related.

I'm well used to C Programming for embedded systems, but normally micro-controllers. I'd like to play with Digital for a effect for guitar so wanted to find a suitable chipset. People on here will certainly have more experience in Audio projects then myself so wondered what people would suggest.

I'd like 2 DAC and 2 ADC peripherals, as I'd like to be able to do stereo effects, but not sure about sample rate or sample size, in bits. Would I even find a processor with suitable DAC and ADC built in or should I really be looking at external DAC chipset? After that DSP, CPU, MCU I'm not sure what I should be looking at. One approach would be to buy a Neunaber pedal and have a look inside that to see what chipset they are using. Expensive solution but it'd certainly have the Horse Power in that for anything I'd be creating. I'm not looking for power just a starting point at the moment. I've not even got anything in mind but if I could write and program the code into a target for a simple 'Gain' I'd be happy with that as a starting point, shimmering reverb can wait ;)

I should say that I have no problem with PCB design, or surface mount soldering so I'm easy as far as chipset. DSP is something I've never tried, if that's what I'm looking for, no time like the present if that's what I'm looking for.

One thing which might be a problem is that I am a Linux user so all my electronics design and programming is done on that platform. I know that's possibly going to be an issue but one step at a time.

Thanks for any advice

elseif

Quote from: jwhitmore on January 19, 2020, 03:43:12 PM... DSP is something I've never tried, if that's what I'm looking for, no time like the present if that's what I'm looking for ...
One of TI's eZdsp stick development boards might work for you.  They have been around a while and there are different versions, but AFAIK they all have at least a fixed-point DSP and a stereo codec.  At one time, they were quite inexpensive - alas, what was once $50 is now $300.  Mouser is showing stock on the one with the least powerful processor, TMS320VC5502, about $905502 eZdspP Data Sheet (pdf)  TMS320VC5502 data sheet (pdf)

Linux alert: I don't have the 5502 ezDSP but the quick start guide for the 5535 version lists a requirement for Windows XP/Vista/Win7. 

jonny.reckless

#7
I also really like the teensy 3.x and 4.0. They use ARM Cortex M processors, pretty much universal in modern embedded stuff, with hardware floating point support so you can do floating point DSP with them; much easier than fixed point IMHO. The teensy 4.0 has 600MHz clock speed! I can do amp sim, chorus, delay, reverb, cab sim and still have clock cycles to spare on that board.

Also, the teensyduino software is great - very powerful and easy to use (derived from arduino), plus there is an audio library which is great for beginners to get started on audio signal processing. The library is well architected and easy to understand if you're a C++ programmer, so it's also very easy to to write your own effects for it if you have the skills. Much easier than getting into LADSPA, gstreamer, VST, DirectShow,  AudioUnits, AAX, or all the other plugin architectures (trust me I've had to work with all of them), and you are running bare metal so it's simple, interrupt driven and low latency.
https://www.pjrc.com/teensy/td_libs_Audio.html

+1 for Blackaddr's guitar FX board for teensy. It will save you a ton of time and hassle getting started, and has the right signal level and impedance for electric guitar, unlike the (cheap and cheerful but still pretty good) teensy audio adapter board. I had guitar running through mine within an hour of receiving it.
https://www.tindie.com/products/Blackaddr/arduino-teensy-guitar-audio-shield/