Jump to content
43oh

advaneharshal

Members
  • Content Count

    1
  • Joined

  • Last visited

Reputation Activity

  1. Like
    advaneharshal reacted to oPossum in tone generator on MSP430 g2553   
    /*     *** NOTE: THIS IS LICENSED (C)OPYRIGHTED SOFTWARE - DO NOT REMOVE THE FOLLOWING 20 LINES ***         Copyright (C) 2013  Kevin Timmerman     This program is free software: you can redistribute it and/or modify     it under the terms of the GNU General Public License as published by     the Free Software Foundation, either version 3 of the License, or     (at your option) any later version.     This program is distributed in the hope that it will be useful,     but WITHOUT ANY WARRANTY; without even the implied warranty of     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     GNU General Public License for more details.     You should have received a copy of the GNU General Public License     along with this program.  If not, see <http://www.gnu.org/licenses/>         Revision History     ----------------     001 2013.05.10     Written for doomedeggplant who is to lazy to do his homework     */ #include <msp430.h> #include <stdint.h> static uint32_t gpi(unsigned n){     static const uint32_t nt[]={         0x19F10C37,0x1B7BF1E9,0x1D1E52F3,0x1ED994C9,0x20AF3220,0x22A0BC34,         0x24AFDC18,0x26DE542B,0x292E0191,0x2BA0DDCE,0x2E390075,0x30F8A0F2};     static const unsigned f=116;unsigned o=0;while(n<f)n+=12,++o;return nt[n-f]>>o; }static volatile uint32_t pi=0,pa=0; static volatile int32_t t; static void p(const uint8_t *b,const uint8_t*const e,int s,const uint8_t m){     while(P1IN&BIT3);t=10;while(b!=e){P1OUT&=~m;pa=pi=0;t+=13115L;while(t>0);         P1OUT|=m;pi=gpi(*;t+=32787L;while(t>0);b+=s;}P1OUT&=~m;pa=pi=0; }void main(void){     WDTCTL=WDTPW|WDTHOLD;DCOCTL=0;BCSCTL1=CALBC1_16MHZ;DCOCTL=CALDCO_16MHZ;     P1DIR=~BIT3&~BIT1;P1REN=BIT3;P1OUT=BIT2|BIT3;P1SEL=BIT4|BIT1;     TA0CCR0=(16000000L/(1L<<16))-1;TA0CTL=TASSEL_2|MC_1;     TA0CCTL0|=CCIE;_enable_interrupts();     for(;{static const uint8_t z[]="<=>?@ABCDEF"; p(z,z+sizeof(z)-1,1,BIT6);p(z+sizeof(z)-2,z-1,-1,BIT0);} } #pragma vector=TIMER0_A0_VECTOR __interrupt void timer_a0_isr(void){(pa&(1UL<<31))?(P1OUT|=BIT5):(P1OUT&=~BIT5);pa+=pi;--t;} Extra credit: http://forum.43oh.com/topic/2047-rtttl-ring-tone-text-transfer-language-player/?p=17515
  2. Like
    advaneharshal reacted to gordon in LP Booster Pack Eagle footprints   
    (OK, I have no idea where to put this. BH, feel free to move it around.)
     
    Continuing from viewtopic.php?f=9&t=1348&start=40#p11369
     
    This is the final version; I don't think it can be made any better as well as generic at the same time.
     
    All variants verified against the TI LaunchPad Eagle files.
     
    Thanks to SugarAddict for the corrections.
     
    Pro tip: make your References layer yellow (or any other unused bright color) while placing your components.
     
    Addendum: DipTrace users look here: viewtopic.php?f=35&t=2972
    TI_launchpad.zip
  3. Like
    advaneharshal reacted to bluehash in Giveaway Winners: CircuitCo Educational BoosterPack Giveaway   
    Congrats Cube!
     
    Hello Members,
    Just to let you know that the winners are picked out at random by the software. I don't pick them.  After a raffle expires, it automatically creates this thread and PM's the winner.
×
×
  • Create New...