Jump to content

Brian2898

Members
  • Content Count

    7
  • Joined

  • Last visited

  1. I just use some radioshack piezo... i get a beep from it, although there are better things you can do... lastaid's code generates a more sophisticated tone for example... sergiocampama, your code doesn't compile in IAR, something about the interrupt vector Seems like there is compatibility problem between IAR and Uniarch... Error[Pe070]: incomplete type is not allowed C:\Users\brian\Documents\MSP\main.cpp 110 Error[Pe020]: identifier "interrupt" is undefined C:\Users\brian\Documents\MSP\main.cpp 110 Error[Pe065]: expected a ";" C:\Users\brian\Documents\MSP\main.cpp 110 Warning[Pe012]: parsing restarts here after previous syntax error C:\Users\brian\Documents\MSP\main.cpp 132 Error[Pe169]: expected a declaration C:\Users\brian\Documents\MSP\main.cpp 133 Warning[Pe012]: parsing restarts here after previous syntax error C:\Users\brian\Documents\MSP\main.cpp 135 Error while running C/C++ compiler Total number of errors: 8 Total number of warnings: 4
  2. hmmm.Did miss it.. I kind of heard only two beeps, or may be I'm missing the point. Yeah, it's not a very interesting video. The point is to stash it near a co-worker or something along those lines and over time these beeps will start compounding in their minds and annoying them. Ideally you will want to have a speaker at an annoying frequency.
  3. I hear some of the cheapest private islands in north america are in Nova Scotia...
  4. By popular demand //MSP430 Annoyatron //Brian Gorman 2011 #include int i=0; void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT P1DIR |= 0x32; // P1.5 output CCTL0 = CCIE; // CCR0 interrupt enabled CCR0 = 32767; TACTL = TASSEL_1 + MC_1; // ACLK, upmode P1OUT = 0x00; int flow=0; int delays[]= {59,531,259,472,118,59,177,354,177}; while(1) { if (i>(delays[flow])) { P1OUT ^= 0x32; // Toggle P1.5 long z = 65000; // Delay do (z--); while (z != 0); P1OUT ^= 0x32; i=0; if (flow>9) flow=0; else flow++; } _BIS_SR(LPM3_bits + GIE); // Enter LPM3 w/ interrupt } } // Timer A0 interrupt service routine #pragma vector=TIMERA0_VECTOR __interrupt void Timer_A (void) { i++; _BIC_SR_IRQ(LPM3_bits); } :evil:
  5. How do you use EasyMSP in IAR? I tried adding to to project but got build errors.
  6. I don't know this for sure, but I think you will want an external multiplexing chip. Maxim makes a few. You could also use shift registers i think.
×
×
  • Create New...