Author Topic: sugestion - Simple SD Audio Player  (Read 8449 times)

bobricius

  • Newbie
  • *
  • Posts: 49
sugestion - Simple SD Audio Player
« on: December 29, 2012, 05:23:15 am »
Interesting project for digispark http://elm-chan.org/works/sd8p/report.html
SD card reading, fast PWM ...
I try compile in arduino IDE but with many erros :(
« Last Edit: January 05, 2013, 12:52:17 am by bobricius »

duckythescientist

  • Newbie
  • *
  • Posts: 27
sugestion - Simple SD Audio Player
« Reply #1 on: December 29, 2012, 01:11:20 pm »
That project relies on some assembler files. Arduino currently doesn\'t support including assembler files from the main sketch. There used to be an easy fix to some of the java files to change the include and compile definitions, but I don\'t think that works anymore since around Arduino 1.0. However, Arduino can accept assembler files when they are included as part of a library. If you were to port the code to a library then include the library to the main sketch, you could get it to work.

At least, I think that is the problem here.

MichaelMeissner

  • Full Member
  • ***
  • Posts: 166
sugestion - Simple SD Audio Player
« Reply #2 on: December 29, 2012, 06:00:16 pm »
I would imagine you could embed the assembler inside of your sketch using the __asm__ (\"string\") outside of the function:

__asm__(\".global foo\\n\"
                 \"foo:\\n\"
                 \"\\tret\\n\");

extern \"C\" {
extern void foo (void);
};

void bar (void)
{
  foo ();
}

bobricius

  • Newbie
  • *
  • Posts: 49
sugestion - Simple SD Audio Player
« Reply #3 on: January 04, 2013, 12:31:40 pm »
Bad news, needed code reduction, 6700 bytes :-(

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
sugestion - Simple SD Audio Player
« Reply #4 on: January 11, 2013, 03:48:58 pm »
If you\'re really keen you could install a serial bootloader on your digispark and use a second digispark as a usb serial converter - this would make the bootloader about 500 bytes, giving you 7.5kb of progmem. Let me know if you want to try it and I\'ll prepare some files. :)

Also I bet you could get an SD card playing on a digispark easier if it didn\'t implement all that fat32 stuff - just write the audio straight to the raw block device!!

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
sugestion - Simple SD Audio Player
« Reply #5 on: January 11, 2013, 03:51:01 pm »
Or just buy an attiny85 chip from a site like element14.com or ebay and program it directly without a bootloader by uploading LittleWire to a digispark and using it as a programmer like so.

Trakkasure

  • Newbie
  • *
  • Posts: 28
Re: sugestion - Simple SD Audio Player
« Reply #6 on: January 23, 2013, 09:23:44 am »
If you\'re really keen you could install a serial bootloader on your digispark and use a second digispark as a usb serial converter - this would make the bootloader about 500 bytes, giving you 7.5kb of progmem. Let me know if you want to try it and I\'ll prepare some files. :)

I would like to give it a try. I have 5 DigiSparks. I'd dedicate one as a serial programmer (Since I don't have one now). My son has been itching to build his own music player.