Jump to content
43oh

oPossum

Members
  • Content Count

    925
  • Joined

  • Last visited

  • Days Won

    103

Everything posted by oPossum

  1. FRAM can be used just like RAM (usually). struct TACCEL { int x; int y; int z; }; const struct TACCEL aa[100]; // Allocate accel data in FRAM struct TACCEL *ap = (struct TACCEL *)aa; // Pointer to address to write accel data struct TACCEL ad; // Accel data struct ad.x = 1; ad.y = 2; ad.z = 3; *ap++ = ad; // Write accel struct to FRAM and increment pointer
  2. You should do this calculation on the PC using double floating point. That will fix the overflow and precision problems. The time based motion should move all the axis very close to the desired target stop position if the frequency and time calculations are all correct. The endpoint determined by the MCU should be used as the next start point by the PC to keep cumulative error under control. The advantage of a time based limit is that it keeps the ISR fast and the code simple (one time limit check instead of 3 position limit check).
  3. XIN and XOUT are P2.6 and P2.7, so you can use them if you are not using a crystal. Reset and Test can not be used a general purpose I/O.
  4. Here is some code that uses NCOs to generate three frequencies with 100 uHz (0.0001 Hz) resolution for a specified duration. There will be some jitter when 100000 / Frequency is not an integer. This may or may not be a problem. There are ways to reduce the jitter, but more hardware is required. Be very careful with the ISR code - it must be able to run in under 120 cycles. #include "msp430g2553.h" static long int timer = 0; // Duration of motion static long int pix = 0; // Phase increment static long int piy = 0; static long int piz = 0; static long int px = 0;
  5. It will take at least a week, but should not be more than two weeks.
  6. Read slau319 if you haven't already. There are a few specific xtal freq that work with USB bootloader. "3.3.2 Hardware Requirements The USB Peripheral Interface requires the use of a high frequency oscillator on XT2. For the BSL to function properly, the oscillator can be 24 MHz, 12 MHz, 8 MHz, or 4 MHz." "1.3.3 Devices With USB Devices with USB are invoked when either of the following two conditions are met:
  7. The JTAG protocol is standard, but the USB or serial protocol used by JTAG interfaces is not. So you need a JTAG interface that is supported by the programming software for the chip(s) you want to use.
  8. MikroElektronica GLCD Font Creator (free) "GLCD Font Creator is the ultimate solution to create personalized fonts, symbols and icons for Graphic LCD (GLCD). It lets you create fonts for Liquid Crystal Displays (LCD) and Graphic LCD. It provides a very nice and intuitive user interface. GLCD Font Creator lets you create fonts and symbols from scratch, or by importing existing fonts on your system. It lets you modify and adjust them for your needs, apply effects to them, and finally export them as source code for use in your favorite language compiler."
  9. Switchable jumper block built with 2 x 3 female header. A piece of #20 solid core wire is used to make a handle to allow easy removal and installation.
  10. I used shipping assistant many years ago, and then I learned about this URL that will allow you to print a shipping label for anything using PayPal. It does not require a purchase to be paid with PayPal, and works for USPS and UPS labels.
  11. Yes, you can easily use it with LCD or other character output devices. Just write a putc() function that writes a character to the device. There must also be a puts() function that writes a string to the device, that can be this... void puts(char *s) { while(*s) putc(*s++); } Integers are always base 10 with this tiny printf(). itoa() typically allows the base to be specified.
  12. Is there similar code in that book? I wrote this myself.
  13. This is a tiny printf() function that can be used with the chips that come with the Launchpad. Code size is about 640 bytes with CCS. There are 7 format specifiers: %c - Character %s - String %i - signed Integer (16 bit) %u - Unsigned integer (16 bit) %l - signed Long (32 bit) %n - uNsigned loNg (32 bit) %x - heXadecimal (16 bit) Field width, floating point and other standard printf() features are not supported. printf() code #include "msp430g2231.h" #include "stdarg.h" void putc(unsigned); void puts(char *); static const unsigned long dv[] = { // 4294967296 // 3
  14. Control Voltage - typically 1 volt per octave Analog synths use VCOs (Voltage Controlled Oscillator), so the note is determined by a control voltage.
  15. Give this a try if you have a spare moment. It should make a 1000 Hz sine wave on left and a 1001 Hz sine wave on right. #include "msp430g2553.h" #define DAC_CLK_PIN BIT5 #define DAC_SIMO_PIN BIT7 #define DAC_CS_PIN BIT0 #define DAC_LDAC_PIN BIT6 #define CONFIG_RIGHT 0x3000 #define CONFIG_LEFT 0xB000 int interpolate(int, int, unsigned); // Sample rate * (1 / resolution in Hz) static const long phase_limit = 32768 * 1000; static long phase_inc1 = 0; // Phase increment for frequency 1 static long phase_inc2 = 0; // Phase increment for fre
  16. PayPal MasterCard debit card. Works like a credit card, but money comes directly out of your PayPal account.
  17. Had some requests for this in IRC so here it is. This is an improved version of the serial tx previously posted and new serial rx code. Both tx and rx are blocking and interrupts should be disabled before calling. C code to show how to use the serial_setup(), putc(), puts(), and getc() functions. This will receive a character, increment it and echo it back. So if you type 'A', then 'B' will be echoed. // test.c #include "msp430g2211.h" // Functions in serial.asm (this really should be in a header file) void serial_setup(unsigned out_mask, unsigned in_mask, unsigned duration); void pu
  18. These are the file/chapter names...
  19. Merged all the small files into a single large file with chapter bookmarks... MSP430 Family Architecture Guide and Module Library MSP430 Assembler
  20. MPLAB X for Linux, Mac and Windows PICkit 3 Programmer/Debuger $45
  21. You are using UCB pins, but UCA registers. UCA pins are P1.1 MISO P1.2 MOSI P1.4 CLK You must also set P1SEL2 to enable SPI on those pins
  22. I have dealt with Microchip for ~20 years as a hobbyist, technician, engineer, and consultant. In all cases the support I got was very good. They don't ignore the little people as Atmel seems to do. The Microchip forums are open to everyone from noobs to pros and support there is generally very good. The latest dev tools from Microchip run on Linux, Mac and Windows. For corporate use there is no need for Linux and certainly not Mac - but they did it anyway - they value all their customers. The Microchip compilers for the 16 and 32 bit parts are GCC. Microchip did the port and offers pa
  23. I don't think it is documented in any of the pdf files. There was some discussion on the TI forums about how the next rev of the Launchpad could be changed to handle chips with hardware UART.
  24. G2553 require tx/rx swap to use hardware UART
×
×
  • Create New...