Tuesday 26 March 2013

Pinguino CDC debugging


I always got kinda put off by not having sussed out the CDC feature,while others said to work well... And this is here the rWINdows comes with its tantrums... I found out !!
It is better if you turn it off first, restart the board if needed( I'm using the vs X.3 of the IDE ) and VOILA : there it is !!



/*
 Blink a LED
 Increment counter to delay; 
 CDC display debugging
*/

 u16 a=0;
 
void setup()
{              
 // initialize the digital pin 13 as an output.
 pinMode(13, OUTPUT);     
}

void loop(){

    if (a==100)
    {
        a=0;
    }
    a++;
    toggle(13);   // alternate ON and OFF
    delay(a);  // wait for a second
    //CDC.printf( "cntr \"%d\"\r\n", a);
    CDC.printf( "\n\r Dec cntr --- " ); CDC.print( a, DEC   );  
    delay(1);
}



The WIKI also explains how to install the driver for the CDC feature...

 "Prepare the connection to the pinguino device by installing the driver from: HERE 
You will have a COMx connection when you plug the usb cable to the computer.
Step 2: Write the following in the Pinguino IDE
void setup() {
  // put your setup code here, to run once:
 
}
 
void loop() {
  // put your main code here, to run repeatedly: 
  CDC.println("\n\r Hello World!!!");
}
Step 3: Compile and upload the code.
Step 4: Select Menu->Pinguino->Debug Mode->USB CDC And on the bottom section the port x on which the device is connected and there you go:
Hello World!!!"
PS: (22/07/13) Regis, from Pinguino Forum, explained it in a quite concise way,,,:
"... if you want to send strings : 
CDC.write(char c) ; // send one char at a time 
CDC.printf(const char *format, arg1, arg2, ...) ; // send formatted string see http://wiki.pinguino.cc/index.php/CDC.printf and http://wiki.pinguino.cc/index.php/Serial.printf for supported formats description. If you want to get strings : CDC.read(char *buffer); //buffer's length must be 64 bytes long (usb max packet size) return number of chars actually read see http://wiki.pinguino.cc/index.php/CDC.read"

Reference : http://wiki.pinguino.cc/index.php/CDC.print
            PINGUINO COMMUNITY @ Google
            Pinguino WIKI

Tuesday 19 March 2013

AVR /Arduino ChipTune Synth

Just a video ( sorry for the crap sound, as it was from a phone) showing the Kryo AVR chiptune in action.
And the original below (much better sound) !





Reference : http://www.linusakesson.net/hardware/chiptune.php

Monday 18 March 2013

Y =a sin b(x-h)+k

Y =a sin b(x-h)+k 


    If you cant recognize this equation, then DSP ain't for you... At least not until you do !
    Maths is a must when you get into any kind of engineering. And trigonometry has a special relation to Direct Digital Synthesis, and sound synthesis.
And i been studying several uC-based synths code and structure along with some DSP basics .
And as the foundation to all sounds are the pure sinewave, we will star by creating an software oscillator inside a uC.
    Therefore i'm preparing a series of basic intro tutorials into some relevant exercises in both maths and code.
Soon come...

Monday 11 March 2013

6502 visual simulator



6502 visual simulator


This has to be one of the coolest retro-hardware projects I’ve seen in a while. It’s a transistor-level simulator of the 6502, written in Javascript, that visually simulates the device based on its original mask pattern — painstakingly reverse-engineered from high-resolution die photographs. Fortunately, mask works have a “sane” copyright term of only a decade, so cool projects like this are facilitated through such reasonable limitations on copyright lifetimes.

CLICK ON THE IMAGE to take you there !!
*( i saw this on another blog... Can someone help me reference it please?! Lost it when  passing it here)