April 17, 2024, 01:32:12 AM

64 LED & MUSIC !

Started by taucapic, March 18, 2013, 06:10:20 AM

Previous topic - Next topic

taucapic

                 64 LED & MUSIC !

       Photo report came from  @Taulab1  (Twitter)  about
the Project "MSP 430 Launch Pad and 8x8 LED
BOOSTERPACK" ,one of the few successful on the Internet!
With their kind permission, we present here
some details of this interesting project.
              Reference data
    The Software from OLIMEX for 8x8 LED BOOSTERPACK was as  input data.
  Software was  tested on a chip   2452.   But it soon became clear,  that  chip
does not have enough memory.  So, for a while,
it was postponed.
               Hardware
      To switch the microphone back to the game, it was decided to use
Comparator A. For this, a thorough selection was provided to found
two precision resistors (1%)  in order to obtain a voltage difference
V_ref - V_a_in = 0.01 V.(MAX)
For our 8x8 LED BOOSTERPACK V_a_in = 1.14 V.
R1 = 806 Om, R2 = 390 Om. Vref = 1.15 V.
Under these conditions, the microphone + comparator catches 
applause from the other corner of laboratory room.
The frequency of the microcontroller was found  at which
matrix good starts from  speedy  metronome and rock  music - 8 Mhz.
    "Horseshoe" (pic.twitter.com/sIHCr1LDdB) was made from Velleman EUROCARD FULL LINE.
     Horseshoe for Stellaris was made of soldered  10-pin pbs (http://twitpic.com/cd4ljv)
    Application of OPA and  signal conditioning is not considered in this report.
  DUINOMITE - MINI with breadboard   was also used in  experiments,
it noted the high sensitivity of shift - register - even static
electricity from  hands.
                    Software
Software will be posted on this forum in the next week.
                Plans and wishes
    Work will continue with Stellaris and DUINOMITE.
   MIDI component will be added.
Moreover , the next semester, we will be recommending
students  to use  8x8 LED BOOSTERPACK with Horseshoe in the study of above mentioned
controllers  and controllers with Arduino connectors .
Very good interactive learning tool.

taucapic

#1
                     Blinking Matrix
       We continue to talk about software, we are dealing
with 64 LED and chip MSP430G2452 or 2553  working
at a certain frequency (1 - 8 MHz), software shell-
CCS V 5.3. We hope they are,  and you have done horseshoe,
at least in its simplest form . You can bet it still will
be a good tool for you.
       First, we need some philosophy or abstraction . Because
64 LED we can use with   other chip and   with other  software shell.
      We can interpret, for example, our 64 LED  as a picture .
As a painter , when he looks at his picture, when he   draws
point by point, line by line.
  We can pass on information to shift register using functions with bits
  or numbers. Ideology of  this 64 LED  allows us to use of 8 or 16 bits.
We need to know the algorithm of a shift register,
to be aware of the matrix scheme and communication capabilities
of the chip.
        And so our first program - the so-called Blinking Matrix.
         It consists of three functions main, matrix_On, matrix_Off.
We need three pins on the processor.We connect them with SR_SCK,
SR_LATCH and SR_DATA_IN in 64 LED.They are the P1.4, P1.5
and P1.6 (BIT4, BIT5, BIT6). Pin 1.6 transfers data. If it is one
we light the LED, 0 - switch off. We need to turn on and off the matrix.
Pin 1.5 is needed for CLK. When the pin is inverted by the scheme
0-1-0 , we are pushed  data bits into shift-register.
  Pin 1.4 is a latch, inverting it 0-1, we send the data to the matrix
  All this worked at a frequency  of 1 - 8 MHz.
***********************************************************************

//  Blinking matrix

#include <msp430.h>

void matrix_On (void);// subroutine
void matrix_Off (void);// subroutine

  void main(void)
  {
    WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
//**********initialize the chip pins *******************
    /* Port 1 Output Register */
      P1OUT =  BIT4 + BIT5 + BIT6;
      /* Port 1 Direction Register */
      P1DIR =  BIT4 + BIT5 + BIT6;
//***********  loop forever  *******************************
         while(1)
         {
       matrix_On ();
       _delay_cycles (1000000);
       matrix_Off ();
       _delay_cycles (1000000);
          }
    }
//
//**************subroutine matrix_On*************************
  void matrix_On (void)
  {
             int counter;
//************* all pins are 0 ,ready to start *************
       P1OUT &=~ BIT5 ;
       P1OUT &=~ BIT6 ;
       P1OUT &=~ BIT4 ;
//***********************************************************
//**************** to push 16 bit in the shift register *****
              for (counter = 0; counter < 16; counter++)
                        {
                P1OUT |= BIT6; // data = 1 to the shift register
                P1OUT  |= BIT5;    //  CLK = 1
                P1OUT &=~ BIT5;    //  CLK = 0

                         }
//*************** turn latch on ********************************
             P1OUT |= BIT4;     // latch is = 1
             _delay_cycles (10);
//***************  end subroutine ******************************
  }
//****************subroutine matriix_Off**************************

  void matrix_Off (void)
       {
              int counter;
              P1OUT &=~ BIT5 ;
              P1OUT &=~ BIT6 ;
              P1OUT &=~ BIT4 ;
                for (counter = 0; counter < 16; counter++)
               {

                P1OUT &=~ BIT6; //  data= 0
                P1OUT  |= BIT5;
                P1OUT &=~ BIT5;
                }
                P1OUT |= BIT4;
                _delay_cycles (10);
        }
//**************************** end subroutine ***************************************************



***********************************************************************
     Results of the program can be seen in Pic pic.twitter.com/dyx9RWp2Z9.
     Do you have an idea of using  MSP430-LED8x8 BOOSTERPACK from OLIMEX?
Write to me @ taucapic (TWITTER).