First C Software

First C Software

Postby mcanulty » Sat Sep 18, 2010 6:27 pm

I'm uploading my first C software so people can start experimenting with writing their own functions. So far I've only implemented writing the first 16 bits of the SRAM, that can be easily improved. There's a delay function, an area for processing inputs to scale values, a switch case function for determining which audio program to use in the interrupt and other goodies including serial communication protocols which aid debugging to no end.

There's an AVR Studio with AVR-GCC project file here:
AVRStudio_MICrODEC_09172010.zip
AVR Studio project - zip file
(75.96 KiB) Downloaded 722 times


and an X-Code with AVR Crosspack project file here:
Xcode_MICrODEC_C_09172010.zip
X-Code Project with AVR Crosspack - zip file
(195.35 KiB) Downloaded 644 times
mcanulty
Site Admin
 
Posts: 63
Joined: Thu May 20, 2010 10:46 pm

Re: First C Software

Postby mcanulty » Sun Sep 19, 2010 8:10 pm

I have 18b address functions implemented now, and tested them with the delay. Not releasing them right away because I haven't decided if they need some more optimization in the long run, but if you'd like to get started with 18b let me know.
mcanulty
Site Admin
 
Posts: 63
Joined: Thu May 20, 2010 10:46 pm

Re: First C Software

Postby mcanulty » Fri Oct 01, 2010 6:03 am

psyched to say that tomorrow I will upload code that allows you to write audio functions with nice clear syntax like this:
Code: Select all
void updownsweepPot18b(void)
{   
   updateAudioInAudioOut();  //most efficient packing
   
   if (direction == 1)
   {
      decreaseReadOffsetBy(2);

      if(atTopOfBuffer())   
      {
         readOffsetLSB = 0x04;
         direction = 0;   
      }
   }
   else
   {
       increaseReadOffsetBy(4);

      if(atBottomOfBuffer()) //tests for exceeding Buffer Size
      {
         decreaseReadOffsetBy(2);
         direction = 1;
      }
   }
   
   calculateReadAddressFromOffset();
   
   if (ADCValueChanged )
   {
      calculateBufferSizeFromADC();
      ADCValueChanged = 0x00;   
   }

   //*****************
   // mod2 check here
   //*****************
   mod2Check();
   
}
mcanulty
Site Admin
 
Posts: 63
Joined: Thu May 20, 2010 10:46 pm


Return to Software

Who is online

Users browsing this forum: No registered users and 1 guest


cron