Jump to content
43oh

oPossum

Members
  • Content Count

    925
  • Joined

  • Last visited

  • Days Won

    103

Everything posted by oPossum

  1. There are 5 vectors in that table
  2. http://forum.43oh.com/topic/2482-3-way-50x50mm-proto-board/ http://forum.43oh.com/topic/2481-launchpad-mini-revision-3/
  3. Free shipping until 9/18/2016.
  4. They have to compete with ARM M0+, M3, M4 and M7; plus many 4 and 8 bit parts from Asia. There is no lack of competition. TI has hurt themselves with poor management of their low end ARM chips (Stellaris, Tiva, MSP432). MSP430 will remain a great low power choice for quite some time.
  5. A variation of the RTTL player that adds a simple envelope to each note. Some in assembly & C: MIDI driven: http://forum.43oh.com/topic/810-fraunchpad-poly-synth/ This has a bug that causes only half of the sine wave to be used. Look carefully at the 'scope and you will see it. Table driven: This has a bug that causes the frequency to be a bit off. Don't remember if I fixed the posted code. http://forum.43oh.com/topic/1729-fraunchpad-synth-still-alive/
  6. Wait for transmission of all bits to complete before latching the outputs void WriteData(unsigned char data) //SPI { UCB0TXBUF = data; // Transmit character while(UCB0STAT & UCBUSY); // Wait for all bits to finish P2OUT |= LATCH_BIT; // Pulse latch P2OUT &= ~LATCH_BIT; }
  7. Flash will wear out after being erased and written many times. As a practical matter you will have to keep the pointer to the flash in RAM. This would be a good application for one of the FRAM MSP430s. They have essentially unlimited write endurance.
  8. Older versions did. The first Intel Macs where Core Duo, so they could not run 64 bit. The later versions of MacOS are a mix of 32 and 64 bit.
  9. Ahh. That link has a better explanation. It is still necessary to purchase CCS, but all upgrades are now free. Same model as Windows 10. Buy once and upgrade forever until corporate policy changes.
  10. Edit: Upgrades to CCS are now free, not the entire product. An initial purchase is still required. Just got this email from TI:
  11. They are two distinct interrupts, you do not have to enable both. The TAIE bit in TACTL enables an interrupt that occurs when the timer reaches 0. The CCIE bit in the TACCTLx registers enables an interrupt that occurs on a match between the compare register or a capture event. All these interrupt enable bits are completely independent of each other. Enable only those that you are using and have written an ISR for. The only other interrupt that has to be enabled is the global interrupt flag in the status register. That can be enabled with _enable_interrupts() or a few other
  12. I suspect the battery life is about 5 years. So after about 5 years it stops working. Saying the battery life is 5 years leads to people wanting to know how to replace the likely "non-replaceable" battery, so marketing says 5 year panel life.
  13. If the TA0CTL line you posted isn't actually commented out, then your code may be stuck in the other Timer A interrupt (TIMER0_A1_VECTOR). That interrupt requires reading TA0IV to clear the flag. If you don't read TA0IV, it will get stuck with that ISR repeating endlessly. The fix is to remove TAIE from that line. TA0CCTL0 |= CCIE; // enable interrupt TA0CTL |= (TASSEL_2 + MC_1 + TAIE); // start timer, enable interrupts
  14. // Timer A0 interrupt service routine #pragma vector=TIMER0_A0_VECTOR __interrupt void Timer_A (void) { } // <<<---- missing closing brace <<<---- // Port 1 interrupt service routine #pragma vector=PORT1_VECTOR __interrupt void Port_1(void) { P2OUT ^= (BYPASS & STATUS_LED); // MAKE BYPASS AND LED HIGH P2IFG &= ~POSITION; // RESET INT UPON POSITION HIGH }
  15. The itoa() function probably takes a signed integer. On the MSP430 that has a range of -32768 to +32767. You need something that takes an unsigned integer that has a range of 0 to 65535 to get beyond the 32767 limit. The next step would be using unsigned long to go all the way to 4,294,967,295. A general purpose unsigned / unsigned long to ascii conversion can be found here: http://forum.43oh.com/topic/1289-tiny-printf-c-version/ Here is a frequency counter that uses unsigned long to go up to 16 Mhz: http://forum.43oh.com/topic/1913-frequency-counter-using-launchpad-nokia-5110-lc
  16. A common method of printing integers uses a divide (/) and modulus (%) operation to calculate each digit. This is portable and supports any number base. The string is created in reverse order and the digit generation can easily be terminated when all significant digits have been printed, so additional logic for leading zero suppression is not needed. A much faster method uses BCD math to generate a BCD value that can then be easily convered to a string. This requires assembly or intrinsic C functions for the most efficient BCD math, so it isn't portable. The method shown here creates a
  17. 74AUP1G34 single buffer operates down to 0.8 volts, low power http://www.ti.com/lit/ds/symlink/sn74aup1g34.pdf
  18. phy_transmit() may be changing low power mode. Search that code or step through it in the debugger and look for any changes to the LPM bits.
  19. The most accurate results will be obtained if the counter is never stopped or reset. The time interval is calculated by subtracting the previous capture from the current capture when the capture interrupt occurs. Refer to 17.2.4.1 (capture mode) and 17.2.2.1 (external clock source) of slau356a. void timer_capture_isr(void) { static int16_t previous_capture; int16_t const timer_capture = (int16_t)TAxCCRn; int16_t const error = timer_capture - previous_capture + 27008; previous_capture = timer_capture; // do something with error }
  20. Yes, only 1 interrupt. The PPS will trigger the interrupt and the timer capture register will hold the *exact* time count when the PPS input changed. Using timer capture eliminates the jitter cause by interrupt latency.
  21. Use the VCO as an external timebase for the counter. Use the GPS PPS as a timer capture interrrupt. The ISR for the timer capture interrupt will subtract the current capture from the previous to determine the VCO frequency. The DAC can then be adjusted using that value and a suitable control loop such as a PID.
  22. Printf supports the %e, %f and %g format specifiers for printing floating point numbers. Due to the automatic type promotion of varadic functions in C, the printf code must always print double precision floating point. This makes printing single precision floating point numbers slower than optimal. The precision rounding done by printf also imposes a speed penalty. The code presented here will print single precision floating point numbers much faster than printf - up to 75 times faster. It allows the number of significant digits to be 3 to 8 (a maximum of 7 is recommended). The printed number
  23. This is obviously wrong: UCSCTL2 |= 499; // Set DCO Multiplier for 16MHz // (N + 1) * FLLRef = Fdco // (499 + 1) * 32768 = 16MHz change to... UCSCTL2 |= 499; // Set DCO Multiplier for 16MHz // (N + 1) * FLLRef = Fdco // (499 + 1) * 32768 = 16.384 MHz and also change... const unsigned long smclk_freq = 16384000UL; // SMCLK frequency in hertz and delete (
  24. Just name the source file with a .cpp extension. Use the C standard library functions in string.h http://www.cplusplus.com/reference/cstring/
×
×
  • Create New...