Open Source DSP XOs - Page 27 - diyAudio
Go Back   Home > Forums > Source & Line > Digital Line Level

Digital Line Level DACs, Digital Crossovers, Equalizers, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 17th May 2012, 12:47 AM   #261
diyAudio Member
 
Join Date: Jun 2004
Location: Connecticut
Quote:
Originally Posted by rsdio View Post
In general, embedded firmware is not portable. I actually think that it's a mistake to code embedded firmware using techniques that are aimed at portability rather than optimization.
You might feel that way until you have to port the code for a safety critical system from an obsolete microcontroller family to something still in production.

Obviously, for DIY there are no such concerns about software quality or maintainability.
  Reply With Quote
Old 17th May 2012, 01:18 AM   #262
rsdio is offline rsdio  United States
diyAudio Member
 
Join Date: Feb 2008
Location: Seattle
Quote:
Originally Posted by chris719 View Post
You might feel that way until you have to port the code for a safety critical system from an obsolete microcontroller family to something still in production.

Obviously, for DIY there are no such concerns about software quality or maintainability.
It depends entirely upon the details of the hardware changes, and also whether the safety-critical aspects are high-level or low-level. If you think that you can just compile Standard C code for completely different hardware without looking at hundreds of painstaking details and still remain safe, then I would be very concerned about using such a product. We might be on diyAudio, but none of my comments have anything to do with DIY shortcuts. In my experience, high-level code does not achieve the same level of quality as mixed assembly and C.

There is no shortcut for developing high quality firmware, whether it's a first-time development or a port. Using a portable language does not make the hardware aspects portable, nor does it save you from needing to know the minute details of what will happen when you change the hardware and leave the software the same. Invoking "safety critical" does not mean that the easier solution will work. Sometimes there is no avoiding the difficulties involved in a port, regardless of the language used.

Granted, if your safety-critical code is all high-level, and totally abstracted from the hardware, then, by all means, write in Standard C and leave it alone. But all along I have been advocating assembly for low-level hardware details, and those simply cannot be solved with high-level hand-waving.
  Reply With Quote
Old 17th May 2012, 02:25 AM   #263
diyAudio Member
 
Join Date: Jun 2004
Location: Connecticut
The details have to be minded and there should always be hardware abstraction where appropriate.

Even in a new design, assembly carries the highest defect density of any language.
  Reply With Quote
Old 17th May 2012, 02:47 AM   #264
rsdio is offline rsdio  United States
diyAudio Member
 
Join Date: Feb 2008
Location: Seattle
Quote:
Originally Posted by chris719 View Post
Even in a new design, assembly carries the highest defect density of any language.
Is that because designs that require assembly are more difficult than others, regardless of the language used? ... or is it because the C language somehow makes it possible for people who don't know what they're doing to succeed?

Knowledge of assembly has been the path to defect correction in many cases. My experience tells me that defect density is way more complicated than language choice - you may merely be citing a statistic of correlation, rather than causation.
  Reply With Quote
Old 17th May 2012, 03:20 AM   #265
diyAudio Member
 
Join Date: Jun 2004
Location: Connecticut
If anything, embedded systems where you can use asm are less complicated.

Humans make mistakes and create bugs. They make more of them writing in assembly. Heavy use of assembly is not recommended in safety critical systems. MISRA would like you to avoid pointer arithmetic in C for crying out loud.

Like I said, this is audio, not a pacemaker. Just keep in mind that you don't get a gold star for having your code execute faster than necessary.
  Reply With Quote
Old 17th May 2012, 12:57 PM   #266
diyAudio Member
 
abraxalito's Avatar
 
Join Date: Sep 2007
Location: Hangzhou - Marco Polo's 'most beautiful city'. 700yrs is a long time though...
Blog Entries: 109
Send a message via MSN to abraxalito Send a message via Yahoo to abraxalito Send a message via Skype™ to abraxalito
If the code turns out to run faster than necessary then the CPU clock rate can be reduced, saving power and generating less noise to spread into surrounding audio circuits. There are equally well no gold stars for over-specifying hardware, taking up more power or real estate than absolutely necessary.
__________________
There is surely nothing quite so useless as doing with great efficiency what should not be done at all - Peter Drucker
  Reply With Quote
Old 17th May 2012, 05:54 PM   #267
rsdio is offline rsdio  United States
diyAudio Member
 
Join Date: Feb 2008
Location: Seattle
Quote:
Originally Posted by abraxalito View Post
If the code turns out to run faster than necessary then the CPU clock rate can be reduced, saving power and generating less noise to spread into surrounding audio circuits.
Yep, that's another good technique to try from the bag of tricks. Shaving cycles by writing time-critical sections in assembly can help make it possible to lower the clock rate, especially if something that is frequently called like an interrupt is converted from C to assembly. We've actually covered quite a few embedded secrets in this thread lately.
  Reply With Quote
Old 18th May 2012, 02:55 PM   #268
diyAudio Member
 
steph_tsf's Avatar
 
Join Date: Mar 2008
The PIC32MX1 and PIC32MX2 feature two SPI having an "audio mode" aka I2S.
Why not experimenting with them ? Using off-the-shelf boards like :
PIC32MX2 Breakout Board
Audio Codec Board - PROTO - WM8731 Development Tool - mikroElektronika
See the attached .jpg
Attached Images
File Type: jpg the PIC32MX2 USB-audio experiment.jpg (119.9 KB, 176 views)

Last edited by steph_tsf; 18th May 2012 at 02:58 PM.
  Reply With Quote
Old 18th May 2012, 05:00 PM   #269
diyAudio Member
 
Join Date: Dec 2004
Location: Bakersfield, CA
Quote:
Originally Posted by steph_tsf View Post
The PIC32MX1 and PIC32MX2 feature two SPI having an "audio mode" aka I2S.
Why not experimenting with them ? Using off-the-shelf boards like :
PIC32MX2 Breakout Board
Audio Codec Board - PROTO - WM8731 Development Tool - mikroElektronika
See the attached .jpg
Wow ...

The PIC32MX220F032B looks to be an amazing part for less than $3.00 US.
__________________
Best Regards,
Carl Huff
  Reply With Quote
Old 18th May 2012, 08:17 PM   #270
diyAudio Member
 
steph_tsf's Avatar
 
Join Date: Mar 2008
The LPC4330 features two I2S.
Why not experimenting using an off-the-shelf carrierboard like :
NGX Technologies LPC4330-Xplorer
2,500 rupies = 56.42 us dollars
See the attached .jpg
Attached Images
File Type: jpg the LPC4330 USB-audio experiment.jpg (161.1 KB, 166 views)
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Volume / Source selector - open source project ? AuroraB Analog Line Level 22 22nd September 2012 03:21 PM
Violet DSP Evolution - an Open Baffle Project cuibono Multi-Way 211 18th May 2010 03:26 AM
Open call for suggestions on Open Source DIY Audio Design gfergy Everything Else 1 15th April 2007 08:33 AM
Open Source, Open Architecture! zenmasterbrian Digital Source 185 23rd February 2007 11:35 PM


New To Site? Need Help?

All times are GMT. The time now is 10:19 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2