Jump to content
43oh

EngIP

Members
  • Content Count

    120
  • Joined

  • Last visited

  • Days Won

    3

Reputation Activity

  1. Like
    EngIP reacted to MarkoeZ in Arduino Quadcopter   
    Well it's flying! Got a total flying time of about 14 minutes now, and my first crash
     
    Finally felt confident enough to fly it higher than 40 centimeters today. So it was at about 3 meters and easily hovering towards me when one of the cheap rubber bands that keep the propellers on popped off.
     
    Flight lesson number one: A quadcopter missing a motor/prop behaves like a brick.
    Flight lesson number two: Bricks dont fly well.
     
    result:
     

     
    So i was bummed, but then the urge to fly tomorrow came. So i dove into my drawer, found an old 10mbit network card, stripped and cut it, and voila: new arm base Its even stronger than the one i built originally, and i pushed the motor mount a bit towards the struts. Also, its the forward arm, so that now has a unique color.
     

     
    Cheers!
    MarkoeZ
  2. Like
    EngIP reacted to gordon in Hate mail : Need your input   
    I have always thought this to be... strange, to put it this way, but then, since I am registered, it does not matter to me . Other sites where I need a file or three from (mostly bumped into by the grace of Google) I register, grab the stuff, never to return. I will never be a community there just as these people won't be a community here, so what you are left with is basically stuffing in the board database. What good is that for?
  3. Like
    EngIP reacted to RobG in Font collection   
    Let's start one.
    Here are some fonts I have:
     
    font_5x7.h
    font_8x12.h
    font_9x16.h
    font_11x16.h
  4. Like
    EngIP reacted to JonnyBoats in C5000   
    Has anyone considered using this as a audio frequency waveform generator? It would seem like it would make a nice little instrument for the bench, one could use the cap touch-pad to dial in the frequency and select waveform (sign wave, square wave etc.)
  5. Like
    EngIP reacted to oPossum in 24x16 text on VGA using Launchpad w/ G2553   
    This is derived from NTSC/PAL video text display using launchpad. video_vga.asm is a drop in replacement for video.asm.
     

     
    The sync timing is for 640x480 60 Hz VGA mode. A 330 ohm resistor must be used on all video lines (R/G/B) because they are analog signals with a max allowed voltage of about 1 volt. Only one of the R/G/B lines can be driven directly from the MSP430 due to current limitations. A buffer such as 74AHC125 could be used to drive all three if desired.
     
    Wiring

    Gnd ------------ Ground [5, 6, 7, 8, 10] P1.5 ----------- Vertical Sync [14] P1.6 ----------- Horizontal Sync [13] P1.7 ---[330]--- Video out (R [1], G [2] or B [3])
     
    video_vga.asm
    ;
    ; Copyright © 2011, 2012 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 .
    ;
     
    .cdecls C, LIST, "msp430g2553.h"
     
    .text
    .def video_init ; void video_init(void); - Initialize video generation
    .def field_timer ; extern int field_timer; - Decremented at each vsync
    .def vblank ; Vertical blanking flag
    .ref text ; Text buffer
    .ref font ; Font 8 x 12, grouped by row
    ;
    ;
    .bss sync_state, 2 ; Sync state
    .bss sync_lines, 2 ; Lines until next sync state
    .bss video_state, 2 ; Video generation state
    .bss vblank, 2 ; Vertical blanking flag
    .bss field_timer, 2 ; Decrement at vsync
    .bss text_ptr, 2 ; Text buffer pointer
    .bss font_ptr, 2 ; Font pointer
     
     
    ; --- Ideal VGA 640 x 480 60 Hz Timing ---
    ; Pixel clock 25.175 MHz
    ; Horizontal 31.47 kHz (pix / 800, negative sync)
    ; Vertical 59.94 Hz (pix / 420000, negative sync)
    ; - Horizontal timing (line)
    ; Scanline part Pixels Time [
  6. Like
    EngIP reacted to TomKraut in Job ad the college emailed me ...   
    Srsly???
  7. Like
    EngIP reacted to oPossum in Using the internal temperature sensor   
    TI has some sample code for the internal temperature sensor, but it does not explain how to scale the ADC reading to useful units of degrees. Here is a step-by-step explanation of how to do the scaling with integer math for degrees C, K and F. There is also sample code to display the temperature on a Nokia 5110 LCD.

     
    The data sheet (SLAU144) has this formula for converting temperature in degrees Celsius to voltage.
    V = 0.00355 * C + 0.986

    What we need is a formula for converting voltage to temperature.
     
    Rewrite the data sheet fomula with temperature on the left
    0.00355 * C + 0.986 = V
     
    Divide both sides by 0.00355
    C + 277.75 = V / 0.00355
     
    Subtract 277.75 from both sides
    C = V / 0.00355 - 277.75
     
    Now we have a formula for converting voltage to temperature.
     
    The data sheet has this formula for converting voltage to ADC value, once again the opposite of what we neeed.

    For Vref- == 0
    A = 1023 * V / Vref
     
    Swap sides
    1023 * V / Vref = A
     
    Multiply by Vref
    1023 * V = A * Vref
     
    Divide by 1023
    V = A * Vref / 1023
     
    For a 1.5V reference
    V = A * 1.5 / 1023
     
    Simplify
    V = A * 0.0014663
     
    Substitute ADC conversion forumula for voltage in the temperature conversion formula.
    C = A * 0.0014663 / 0.00355 - 277.75
     
    Simplify
    C = A * 0.413 - 277.75
     
    Now we have a formula to convert ADC reading to temperature.
    It uses real numbers, so floating point math is required for good precision.
    Floating point is slow and requires more flash, so let's use integer math instead.
    Multiply by 65536 (2^16) and then divide by the same.
    C = (A * 27069 - 18202393) / 65536
     
    Use a right shift instead of divide. This will become a move of high word to low word.
    C = (A * 27069 - 18202393) >> 16
     
    Add 0.5 * 65536 to impove rounding.
    C = (A * 27069 - 18202393 + 32768) >> 16
     
    Simplify.
    C = (A * 27069 - 18169625) >> 16
     
    So that is how to go from ADC to degrees Celsius.
     
     
    To convert degrees C to degees K.
    K = C + 273.15
     
    Applied to ADC to degrees C conversion formula.
    K = (A * 27069 - 18169625) >> 16 - 273.15
     
    Implement with integer math by multiplying by 65536
    K = (A * 27069 - 18169625 - 17,901,158) >> 16
     
    Simplify.
    K = (A * 27069 - 268467) >> 16
     
    To convert degrees C to degrees F.
    F = C * 9 / 5 + 32
     
    Applied to voltage to degrees C conversion forumula
    F = (V / 0.00355 - 277.75) * 9 / 5 + 32
     
    Multiply by 9
    F = (V / 0.0003944 - 2499.75) / 5 + 32
     
    Divide by 5
    F = (V / 0.0019722 - 499.95) + 32
     
    Add 32
    F = V / 0.0019722 - 467.95
     
    Substitute ADC to voltage forumula
    F = A * 0.0014663 / 0.0019722 - 467.95
     
    Simplifiy
    F = A * 0.7435 - 467.95
     
    Convert to integer
    F = (A * 48724 - 30667156) >> 16
     
    Improve rounding
    F = (A * 48724 - 30667156 + 32768) >> 16
     
    Simplify
    F = (A * 48724 - 30634388) >> 16
     
    So now we have three formulas to convert ADC reading to degrees C, K and F using fast and compact integer math.
    C = (A * 27069 - 18169625) >> 16
    K = (A * 27069 - 268467) >> 16
    F = (A * 48724 - 30634388) >> 16
     
    Using the ADC value, rather than a different temperature scale, will ensure greatest precision for each temperature scale.
     
    main.c

    #include #include #include "lcd.h" #define ADC_SLEEP // Sleep during ADC conversion //#define SHOW_ADC // Show ADC raw and ADC millivolts // Print integer from -999 to 9999 using 12 x 16 font void print_int(int i, const unsigned y) { if(i < -999 || i > 9999) return; const unsigned neg = i < 0; if(neg) i = -i; div_t d; d.quot = i; unsigned x = 48; do { d = div(d.quot, 10); pd12(d.rem, x -= 12, y); } while(d.quot); if(neg) pd12(14, x -= 12, y); while(x) pd12(10, x -= 12, y); } // Print integer from 0 to 9999 vertically using 6 x 8 font void print_v(int i, unsigned x) { unsigned y = 4; unsigned c; if(i < 0 || i > 9999) return; div_t d; d.quot = i; do { d = div(d.quot, 10); c = d.rem + '0'; lcd_print((char *)&c, x, --y); } while(d.quot); c = ' '; while(y) lcd_print((char *)&c, x, --y); } void main(void) { unsigned adc; // ADC value int c, k, f; // Temperature in degrees C, K, and F unsigned mv; // ADC reading in millivolts // WDTCTL = WDTPW | WDTHOLD; // Disable watchdog reset // lcd_init(); // Initialize LCD lcd_clear(0); // pd12(15, 48, 0); // Degrees pd12(17, 59, 0); // F pd12(15, 48, 2); // Degrees pd12(16, 58, 2); // C pd12(15, 48, 4); // Degrees pd12(18, 59, 4); // K #ifdef SHOW_ADC // lcd_print("Am", 72, 4); // AD / mV lcd_print("DV", 72, 5); // #endif // // ADC10CTL0 = 0; // Configure ADC ADC10CTL1 = INCH_10 | ADC10DIV_3; // ADC10CTL0 = SREF_1 | ADC10SHT_3 | REFON | ADC10ON | ADC10IE; //ADC10CTL0 = SREF_1 | ADC10SHT_3 | REFON | ADC10ON | ADC10IE | REF2_5V; #ifdef ADC_SLEEP // ADC10CTL0 |= ADC10IE; // Enable ADC conversion complete interrupt #endif // // for(; { // for-ever #ifdef ADC_SLEEP // ADC10CTL0 |= (ENC | ADC10SC); // Begin ADC conversion __bis_SR_register(LPM0_bits + GIE); // Sleep until conversion complete #else // ADC10CTL0 &= ~ADC10IFG; // Clear conversion complete flag ADC10CTL0 |= (ENC | ADC10SC); // Begin ADC conversion while(!(ADC10CTL0 & ADC10IFG)); // Wait for conversion to complete #endif // // adc = ADC10MEM; // Read ADC // // Convert to temperature c = ((27069L * adc) - 18169625L) >> 16; // Vref = 1.5V //c = ((45115L * adc) - 18169625L) >> 16; // Vref = 2.5V // k = ((27069L * adc) - 268467L) >> 16; // Vref = 1.5V //k = ((45115L * adc) - 268467L) >> 16; // Vref = 2.5V // f = ((48724L * adc) - 30634388L) >> 16; // Vref = 1.5V //f = ((81206L * adc) - 30634388L) >> 16; // Vref = 2.5V // // Convert to millivolts mv = (96094L * adc + 32768) >> 16; // Vref = 1.5V //mv = (160156L * adc + 32768) >> 16; // Vref = 2.5V // // Display on LCD print_int(f, 0); // Degrees F print_int(c, 2); // Degrees C print_int(k, 4); // Degrees K // #ifdef SHOW_ADC // print_v(adc, 72); // ADC print_v(mv, 78); // ADC millivolts #endif // // //__delay_cycles(100000); // } // } #pragma vector = ADC10_VECTOR // ADC conversion complete interrupt __interrupt void ADC10_ISR(void) // { // __bic_SR_register_on_exit(LPM0_bits); // Wakeup main code } //
     
    lcd.h

    typedef enum { lcd_command = 0, // Array of one or more commands lcd_data = 1, // Array of one or more bytes of data lcd_data_repeat = 2 // One byte of data repeated } lcd_cmd_type; void lcd_send(const unsigned char *cmd, unsigned len, const lcd_cmd_type type); void lcd_home(void); void lcd_pos(unsigned char x, unsigned char y); void lcd_clear(unsigned char x); void lcd_init(void); void lcd_print(char *s, unsigned x, unsigned y); void pd12(unsigned n, unsigned x, unsigned y);
     
    lcd.c

    #include #include "lcd.h" //static const unsigned TXD = BIT1; static const unsigned RXD = BIT2; static const unsigned SWITCH = BIT3; static const unsigned LCD_CLK = BIT5; static const unsigned LCD_BACKLIGHT = BIT6; static const unsigned LCD_DATA = BIT7; static const unsigned LCD_DC = BIT0; // PORT2 static const unsigned LCD_CE = BIT1; // PORT2 void lcd_send(const unsigned char *cmd, unsigned len, const lcd_cmd_type type) { register unsigned mask; P2OUT &= ~LCD_CE; do { mask = 0x0080; do { if(*cmd & mask) { P1OUT &= ~LCD_CLK; P1OUT |= LCD_DATA; } else { P1OUT &= ~(LCD_CLK | LCD_DATA); } P1OUT |= LCD_CLK; mask >>= 1; } while(!(mask & 1)); if(!type) P2OUT &= ~LCD_DC; if(*cmd & mask) { P1OUT &= ~LCD_CLK; P1OUT |= LCD_DATA; } else { P1OUT &= ~(LCD_CLK | LCD_DATA); } P1OUT |= LCD_CLK; P2OUT |= LCD_DC; if(!(type & 2)) ++cmd; } while(--len); P2OUT |= LCD_CE; } static const unsigned char home[] = { 0x40, 0x80 }; void lcd_home(void) { lcd_send(home, sizeof(home), lcd_command); } void lcd_pos(unsigned char x, unsigned char y) { unsigned char c[2]; c[0] = 0x80 | x; c[1] = 0x40 | y; lcd_send(c, sizeof(c), lcd_command); } void lcd_clear(unsigned char x) { lcd_home(); lcd_send(&x, 504, lcd_data_repeat); lcd_home(); } void lcd_init(void) { static const unsigned char init[] = { 0x20 + 0x01, // function set - extended instructions enabled //0x80 + 64, // set vop (contrast) 0 - 127 0x80 + 66, // set vop (contrast) 0 - 127 0x04 + 0x02, // temperature control 0x10 + 0x03, // set bias system 0x20 + 0x00, // function set - chip active, horizontal addressing, basic instructions 0x08 + 0x04 // display control - normal mode }; P1REN = RXD | SWITCH; P1DIR = LCD_CLK | LCD_BACKLIGHT | LCD_DATA; P1OUT = LCD_CLK | RXD | SWITCH | LCD_BACKLIGHT; P2REN = 0; P2DIR = LCD_DC | LCD_CE; P2OUT = LCD_CE; __delay_cycles(20000); P2OUT |= LCD_DC; __delay_cycles(20000); lcd_send(init, sizeof(init), lcd_command); } static const unsigned char font6x8[96][5] = { 0x00, 0x00, 0x00, 0x00, 0x00, // 20 32 0x00, 0x00, 0x5F, 0x00, 0x00, // 21 33 ! 0x00, 0x07, 0x00, 0x07, 0x00, // 22 34 " 0x14, 0x7F, 0x14, 0x7F, 0x14, // 23 35 # 0x24, 0x2A, 0x7F, 0x2A, 0x12, // 24 36 $ 0x23, 0x13, 0x08, 0x64, 0x62, // 25 37 % 0x36, 0x49, 0x56, 0x20, 0x50, // 26 38 & 0x00, 0x08, 0x07, 0x03, 0x00, // 27 39 ' 0x00, 0x1C, 0x22, 0x41, 0x00, // 28 40 ( 0x00, 0x41, 0x22, 0x1C, 0x00, // 29 41 ) 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, // 2A 42 * 0x08, 0x08, 0x3E, 0x08, 0x08, // 2B 43 + 0x00, 0x40, 0x38, 0x18, 0x00, // 2C 44 , 0x08, 0x08, 0x08, 0x08, 0x08, // 2D 45 - 0x00, 0x00, 0x60, 0x60, 0x00, // 2E 46 . 0x20, 0x10, 0x08, 0x04, 0x02, // 2F 47 / 0x3E, 0x51, 0x49, 0x45, 0x3E, // 30 48 0 0x00, 0x42, 0x7F, 0x40, 0x00, // 31 49 1 0x42, 0x61, 0x51, 0x49, 0x46, // 32 50 2 0x21, 0x41, 0x49, 0x4D, 0x33, // 33 51 3 0x18, 0x14, 0x12, 0x7F, 0x10, // 34 52 4 0x27, 0x45, 0x45, 0x45, 0x39, // 35 53 5 0x3C, 0x4A, 0x49, 0x49, 0x30, // 36 54 6 0x41, 0x21, 0x11, 0x09, 0x07, // 37 55 7 0x36, 0x49, 0x49, 0x49, 0x36, // 38 56 8 0x06, 0x49, 0x49, 0x29, 0x1E, // 39 57 9 0x00, 0x00, 0x14, 0x00, 0x00, // 3A 58 : 0x00, 0x00, 0x40, 0x34, 0x00, // 3B 59 ; 0x00, 0x08, 0x14, 0x22, 0x41, // 3C 60 < 0x14, 0x14, 0x14, 0x14, 0x14, // 3D 61 = 0x00, 0x41, 0x22, 0x14, 0x08, // 3E 62 > 0x02, 0x01, 0x51, 0x09, 0x06, // 3F 63 ? 0x3E, 0x41, 0x5D, 0x59, 0x4E, // 40 64 @ 0x7C, 0x12, 0x11, 0x12, 0x7C, // 41 65 A 0x7F, 0x49, 0x49, 0x49, 0x36, // 42 66 B 0x3E, 0x41, 0x41, 0x41, 0x22, // 43 67 C 0x7F, 0x41, 0x41, 0x41, 0x3E, // 44 68 D 0x7F, 0x49, 0x49, 0x49, 0x41, // 45 69 E 0x7F, 0x09, 0x09, 0x09, 0x01, // 46 70 F 0x3E, 0x41, 0x49, 0x49, 0x7A, // 47 71 G 0x7F, 0x08, 0x08, 0x08, 0x7F, // 48 72 H 0x00, 0x41, 0x7F, 0x41, 0x00, // 49 73 I 0x20, 0x40, 0x41, 0x3F, 0x01, // 4A 74 J 0x7F, 0x08, 0x14, 0x22, 0x41, // 4B 75 K 0x7F, 0x40, 0x40, 0x40, 0x40, // 4C 76 L 0x7F, 0x02, 0x1C, 0x02, 0x7F, // 4D 77 M 0x7F, 0x04, 0x08, 0x10, 0x7F, // 4E 78 N 0x3E, 0x41, 0x41, 0x41, 0x3E, // 4F 79 O 0x7F, 0x09, 0x09, 0x09, 0x06, // 50 80 P 0x3E, 0x41, 0x51, 0x21, 0x5E, // 51 81 Q 0x7F, 0x09, 0x19, 0x29, 0x46, // 52 82 R 0x26, 0x49, 0x49, 0x49, 0x32, // 53 83 S 0x01, 0x01, 0x7F, 0x01, 0x01, // 54 84 T 0x3F, 0x40, 0x40, 0x40, 0x3F, // 55 85 U 0x1F, 0x20, 0x40, 0x20, 0x1F, // 56 86 V 0x3F, 0x40, 0x38, 0x40, 0x3F, // 57 87 W 0x63, 0x14, 0x08, 0x14, 0x63, // 58 88 X 0x03, 0x04, 0x78, 0x04, 0x03, // 59 89 Y 0x61, 0x51, 0x49, 0x45, 0x43, // 5A 90 Z 0x00, 0x7F, 0x41, 0x41, 0x41, // 5B 91 [ 0x02, 0x04, 0x08, 0x10, 0x20, // 5C 92 '\' 0x00, 0x41, 0x41, 0x41, 0x7F, // 5D 93 ] 0x04, 0x02, 0x01, 0x02, 0x04, // 5E 94 ^ 0x80, 0x80, 0x80, 0x80, 0x80, // 5F 95 _ 0x00, 0x03, 0x07, 0x08, 0x00, // 60 96 ' 0x20, 0x54, 0x54, 0x54, 0x78, // 61 97 a 0x7F, 0x28, 0x44, 0x44, 0x38, // 62 98 b 0x38, 0x44, 0x44, 0x44, 0x28, // 63 99 c 0x38, 0x44, 0x44, 0x28, 0x7F, // 64 100 d 0x38, 0x54, 0x54, 0x54, 0x18, // 65 101 e 0x00, 0x08, 0x7E, 0x09, 0x02, // 66 102 f 0x18, 0xA4, 0xA4, 0xA4, 0x7C, // 67 103 g 0x7F, 0x08, 0x04, 0x04, 0x78, // 68 104 h 0x00, 0x44, 0x7D, 0x40, 0x00, // 69 105 i 0x00, 0x20, 0x40, 0x40, 0x3D, // 6A 106 j 0x00, 0x7F, 0x10, 0x28, 0x44, // 6B 107 k 0x00, 0x41, 0x7F, 0x40, 0x00, // 6C 108 l 0x7C, 0x04, 0x78, 0x04, 0x78, // 6D 109 m 0x7C, 0x08, 0x04, 0x04, 0x78, // 6E 110 n 0x38, 0x44, 0x44, 0x44, 0x38, // 6F 111 o 0xFC, 0x18, 0x24, 0x24, 0x18, // 70 112 p 0x18, 0x24, 0x24, 0x18, 0xFC, // 71 113 q 0x7C, 0x08, 0x04, 0x04, 0x08, // 72 114 r 0x48, 0x54, 0x54, 0x54, 0x24, // 73 115 s 0x04, 0x04, 0x3F, 0x44, 0x24, // 74 116 t 0x3C, 0x40, 0x40, 0x20, 0x7C, // 75 117 u 0x1C, 0x20, 0x40, 0x20, 0x1C, // 76 118 v 0x3C, 0x40, 0x30, 0x40, 0x3C, // 77 119 w 0x44, 0x28, 0x10, 0x28, 0x44, // 78 120 x 0x4C, 0x90, 0x90, 0x90, 0x7C, // 79 121 y 0x44, 0x64, 0x54, 0x4C, 0x44, // 7A 122 z 0x00, 0x08, 0x36, 0x41, 0x00, // 7B 123 { 0x00, 0x00, 0x77, 0x00, 0x00, // 7C 124 | 0x00, 0x41, 0x36, 0x08, 0x00, // 7D 125 } 0x02, 0x01, 0x02, 0x04, 0x02, // 7E 126 ~ 0x00, 0x06, 0x09, 0x09, 0x06, // 7F 127 degrees }; void lcd_print(char *s, unsigned x, unsigned y) { unsigned char c[2]; c[0] = 0x80 | x; c[1] = 0x40 | y; lcd_send(c, sizeof(c), lcd_command); while(*s) { lcd_send(&font6x8[*s - 32][0], 5, lcd_data); lcd_send(&font6x8[0][0], 1, lcd_data); ++s; } } static const unsigned char num11x16[19][11 * 2] = { 0x00,0xF0,0xFC,0xFE,0x06,0x02,0x06,0xFE,0xFC,0xF0,0x00, // 0 0x00,0x07,0x1F,0x3F,0x30,0x20,0x30,0x3F,0x1F,0x07,0x00, 0x00,0x00,0x08,0x0C,0xFC,0xFE,0xFE,0x00,0x00,0x00,0x00, // 1 0x00,0x20,0x20,0x20,0x3F,0x3F,0x3F,0x20,0x20,0x20,0x00, 0x00,0x0C,0x0E,0x06,0x02,0x02,0x86,0xFE,0x7C,0x38,0x00, // 2 0x00,0x30,0x38,0x3C,0x36,0x33,0x31,0x30,0x30,0x38,0x00, 0x00,0x0C,0x0E,0x86,0x82,0x82,0xC6,0xFE,0x7C,0x38,0x00, // 3 0x00,0x18,0x38,0x30,0x20,0x20,0x31,0x3F,0x1F,0x0E,0x00, 0x00,0x00,0xC0,0x20,0x18,0x04,0xFE,0xFE,0xFE,0x00,0x00, // 4 0x00,0x03,0x02,0x02,0x02,0x22,0x3F,0x3F,0x3F,0x22,0x02, 0x00,0x00,0x7E,0x7E,0x46,0x46,0xC6,0xC6,0x86,0x00,0x00, // 5 0x00,0x18,0x38,0x30,0x20,0x20,0x30,0x3F,0x1F,0x0F,0x00, 0x00,0xC0,0xF0,0xF8,0xFC,0x4C,0xC6,0xC2,0x82,0x00,0x00, // 6 0x00,0x0F,0x1F,0x3F,0x30,0x20,0x30,0x3F,0x1F,0x0F,0x00, 0x00,0x06,0x06,0x06,0x06,0x06,0xC6,0xF6,0x3E,0x0E,0x00, // 7 0x00,0x00,0x00,0x30,0x3C,0x0F,0x03,0x00,0x00,0x00,0x00, 0x00,0x38,0x7C,0xFE,0xC6,0x82,0xC6,0xFE,0x7C,0x38,0x00, // 8 0x00,0x0E,0x1F,0x3F,0x31,0x20,0x31,0x3F,0x1F,0x0E,0x00, 0x00,0x78,0xFC,0xFE,0x86,0x02,0x86,0xFE,0xFC,0xF8,0x00, // 9 0x00,0x00,0x00,0x21,0x21,0x31,0x1D,0x1F,0x0F,0x03,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x70,0x70,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // : 0x00,0x0E,0x0E,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // . 0x00,0x38,0x38,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0xC0,0x30,0x0C,0x00,0x00,0x00,0x00, // / 0x00,0x30,0x0C,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, // - 0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 0x00,0x18,0x3C,0x66,0x66,0x3C,0x18,0x00,0x00,0x00,0x00, // 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0xF0,0xF8,0x0C,0x06,0x02,0x02,0x02,0x02,0x0E,0x0C,0x00, // C 0x03,0x07,0x0C,0x18,0x10,0x10,0x10,0x10,0x1C,0x0C,0x00, 0xFE,0xFE,0x42,0x42,0x42,0x42,0x42,0x42,0x00,0x00,0x00, // F 0x1F,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0xFE,0xFE,0x40,0xE0,0xB0,0x18,0x0C,0x06,0x02,0x00,0x00, // K 0x1F,0x1F,0x00,0x00,0x01,0x03,0x06,0x0C,0x18,0x10,0x00 }; void pd12(unsigned n, unsigned x, unsigned y) { unsigned char c[2]; c[0] = 0x80 | x; c[1] = 0x40 + y; lcd_send(c, 2, lcd_command); lcd_send(num11x16[n], 11, lcd_data); c[1] = 0x41 + y; lcd_send(c, 2, lcd_command); lcd_send(num11x16[n] + 11, 11, lcd_data); }
  8. Like
    EngIP reacted to cde in 20+ year battery   
    http://www.eetimes.com/design/embedded/ ... ed-designs
     
    Ideal, not just theoretical.
  9. Like
    EngIP got a reaction from awdark in New to the Launchpad   
    The thing with the launchpad is it's closer to a "proper" MCU dev board than the Arduino. The Arduino exists to let people who don't know about microcontrollers (or don't want to know) use them. Because of this, the learning is a bit steeper with launchpad, but the things you learn with launchpad can be more easily applied to other MCU's.
     
    I don't know if this helps - http://everyonelovesleds.blogspot.com/2 ... world.html
     
    But try that, and report back with any errors that get thrown up. Oh, and change the include from "#include " to "#include "
  10. Like
    EngIP reacted to oPossum in Fraunchpad Synth - Still Alive   
    The note envelope is a simple exponential decay. After each cycle of the waveform, the level is multiplied by 65408/65536 (0.99805). Higher frequency notes will decay faster then lower frequency.

    The music data is in an array in FRAM, it is not MIDI driven like the previous version

    Inspired by this project

    main.c
    #include "msp430fr5739.h" #include "alive.h" void set_tick(unsigned); unsigned get_tick(void); void synth_init(void); void set_note(int, int, int); int wave[257] = { 0, 804, 1608, 2410, 3212, 4011, 4808, 5602, 6393, 7179, 7962, 8739, 9512, 10278, 11039, 11793, 12539, 13279, 14010, 14732, 15446, 16151, 16846, 17530, 18204, 18868, 19519, 20159, 20787, 21403, 22005, 22594, 23170, 23731, 24279, 24811, 25329, 25832, 26319, 26790, 27245, 27683, 28105, 28510, 28898, 29268, 29621, 29956, 30273, 30571, 30852, 31113, 31356, 31580, 31785, 31971, 32137, 32285, 32412, 32521, 32609, 32678, 32728, 32757, 32767, 32757, 32728, 32678, 32609, 32521, 32412, 32285, 32137, 31971, 31785, 31580, 31356, 31113, 30852, 30571, 30273, 29956, 29621, 29268, 28898, 28510, 28105, 27683, 27245, 26790, 26319, 25832, 25329, 24811, 24279, 23731, 23170, 22594, 22005, 21403, 20787, 20159, 19519, 18868, 18204, 17530, 16846, 16151, 15446, 14732, 14010, 13279, 12539, 11793, 11039, 10278, 9512, 8739, 7962, 7179, 6393, 5602, 4808, 4011, 3212, 2410, 1608, 804, 0, -804, -1608, -2410, -3212, -4011, -4808, -5602, -6393, -7179, -7962, -8739, -9512, -10278, -11039, -11793, -12539, -13279, -14010, -14732, -15446, -16151, -16846, -17530, -18204, -18868, -19519, -20159, -20787, -21403, -22005, -22594, -23170, -23731, -24279, -24811, -25329, -25832, -26319, -26790, -27245, -27683, -28105, -28510, -28898, -29268, -29621, -29956, -30273, -30571, -30852, -31113, -31356, -31580, -31785, -31971, -32137, -32285, -32412, -32521, -32609, -32678, -32728, -32757, -32767, -32757, -32728, -32678, -32609, -32521, -32412, -32285, -32137, -31971, -31785, -31580, -31356, -31113, -30852, -30571, -30273, -29956, -29621, -29268, -28898, -28510, -28105, -27683, -27245, -26790, -26319, -25832, -25329, -24811, -24279, -23731, -23170, -22594, -22005, -21403, -20787, -20159, -19519, -18868, -18204, -17530, -16846, -16151, -15446, -14732, -14010, -13279, -12539, -11793, -11039, -10278, -9512, -8739, -7962, -7179, -6393, -5602, -4808, -4011, -3212, -2410, -1608, -804, 0 }; void main(void) { unsigned osc; const struct event_t *e; WDTCTL = WDTPW + WDTHOLD; CSCTL0 = 0xA500; // Unlock clock registers CSCTL1 = DCORSEL | DCOFSEL1 | DCOFSEL0; // 24 MHz CSCTL2 = 0x0333; // Use DCO clock for ACLK, SMCLK and MCLK CSCTL3 = 0x0000; // Set all clock divider to 1 //CSCTL4 = //CSCTL5 = P1DIR = 0x01; // PWM audio output on P1.0 P1REN = 0x00; // P1OUT = 0x00; // P1SEL0 = 0x01; // Enable Timer A output P1SEL1 = 0x00; // P2DIR = 0x00; // P2REN = 0x00; // P2OUT = 0x00; // P2SEL0 = 0x00; // P2SEL1 = 0x03; // Enable UART UCA0 P3DIR = 0x10; // P3REN = 0x00; // P3OUT = 0x00; // P3SEL0 = 0x10; // SMCLK output P3SEL1 = 0x10; // SMCLK output P4DIR = 0x00; // P4REN = 0x00; // P4OUT = 0x00; // P4SEL0 = 0x00; // P4SEL1 = 0x00; // PJDIR = 0x0F; // 4 LEDs PJREN = 0x00; // PJOUT = 0x00; // PJSEL0 = 0x00; // PJSEL1 = 0x00; // UCA0MCTLW = 1; // 16x oversampling UCA0BRW = 24000000 / 16 / 9600; // Fraunchpad UART //UCA0BRW = 24000000 / 16/ 31250; // Standard MIDI bit rate UCA0CTLW0 = 0x0080; // Use SMCLK for bit rate generator, release reset synth_init(); for(osc = 0, e = tune_still_alive; e->pitch; ++e) { set_note(osc++ & 7, e->pitch, 9000); ++PJOUT; set_tick((e[1].time - e[0].time) * 150); while(get_tick()); } }

    alive.h

    struct event_t { unsigned time; unsigned pitch; }; static const struct event_t tune_still_alive[] = { 192, 91, 240, 90, 288, 88, 336, 88, 384, 69, 384, 90, 432, 74, 480, 78, 528, 74, 576, 71, 624, 74, 672, 78, 720, 74, 768, 69, 816, 74, 864, 78, 912, 74, 912, 81, 960, 71, 960, 91, 1008, 74, 1008, 90, 1056, 78, 1056, 88, 1104, 74, 1104, 88, 1152, 69, 1200, 74, 1200, 90, 1248, 78, 1296, 74, 1344, 71, 1344, 86, 1392, 74, 1440, 78, 1440, 88, 1488, 74, 1488, 81, 1536, 69, 1584, 74, 1632, 78, 1680, 74, 1728, 71, 1776, 74, 1824, 78, 1872, 74, 1872, 81, 1920, 71, 1920, 88, 1968, 76, 2016, 79, 2016, 90, 2064, 76, 2064, 91, 2112, 71, 2160, 76, 2208, 79, 2208, 88, 2256, 76, 2256, 85, 2304, 69, 2352, 73, 2352, 86, 2400, 79, 2448, 73, 2496, 69, 2496, 88, 2544, 73, 2592, 79, 2592, 81, 2640, 73, 2640, 81, 2688, 69, 2736, 74, 2736, 90, 2784, 78, 2832, 74, 2880, 71, 2928, 74, 2976, 78, 3024, 74, 3072, 69, 3120, 74, 3168, 78, 3216, 74, 3264, 71, 3264, 91, 3312, 74, 3312, 90, 3360, 78, 3360, 88, 3408, 74, 3408, 88, 3456, 69, 3456, 90, 3504, 74, 3552, 78, 3600, 74, 3648, 71, 3696, 74, 3744, 78, 3792, 74, 3840, 69, 3888, 74, 3936, 78, 3984, 74, 3984, 81, 4032, 71, 4032, 91, 4080, 74, 4080, 90, 4128, 78, 4128, 88, 4176, 74, 4176, 88, 4224, 69, 4272, 74, 4320, 78, 4320, 90, 4368, 74, 4368, 86, 4416, 71, 4464, 74, 4512, 78, 4512, 88, 4560, 74, 4560, 81, 4608, 69, 4656, 74, 4704, 78, 4752, 74, 4800, 71, 4848, 74, 4896, 78, 4944, 74, 4992, 71, 4992, 88, 5040, 76, 5088, 79, 5088, 90, 5136, 76, 5136, 91, 5184, 71, 5232, 76, 5280, 79, 5280, 88, 5328, 76, 5328, 85, 5376, 69, 5424, 73, 5472, 79, 5472, 86, 5520, 73, 5520, 88, 5568, 69, 5616, 73, 5616, 81, 5664, 79, 5664, 86, 5712, 73, 5712, 88, 5760, 70, 5760, 89, 5808, 74, 5808, 88, 5856, 77, 5856, 86, 5904, 81, 5904, 84, 6048, 81, 6096, 82, 6141, 89, 6144, 105, 6144, 72, 6144, 77, 6144, 84, 6192, 81, 6192, 96, 6240, 108, 6240, 72, 6240, 77, 6240, 89, 6288, 96, 6336, 103, 6336, 72, 6336, 76, 6336, 88, 6336, 88, 6384, 79, 6384, 86, 6384, 96, 6432, 108, 6432, 72, 6432, 76, 6432, 86, 6480, 84, 6480, 96, 6528, 106, 6528, 70, 6528, 74, 6528, 86, 6528, 86, 6576, 105, 6576, 82, 6576, 84, 6576, 96, 6624, 103, 6624, 70, 6624, 74, 6624, 84, 6672, 76, 6672, 96, 6720, 105, 6720, 72, 6720, 77, 6720, 84, 6720, 89, 6768, 81, 6768, 96, 6816, 101, 6816, 72, 6816, 77, 6816, 81, 6864, 82, 6864, 96, 6909, 89, 6912, 105, 6912, 72, 6912, 77, 6912, 84, 6960, 81, 6960, 96, 7008, 108, 7008, 72, 7008, 77, 7008, 89, 7056, 96, 7104, 103, 7104, 72, 7104, 76, 7104, 88, 7104, 91, 7152, 79, 7152, 89, 7152, 96, 7200, 108, 7200, 72, 7200, 76, 7200, 88, 7248, 86, 7248, 96, 7296, 106, 7296, 70, 7296, 74, 7296, 86, 7296, 86, 7344, 105, 7344, 82, 7344, 88, 7344, 96, 7392, 103, 7392, 70, 7392, 74, 7392, 89, 7440, 76, 7440, 96, 7488, 105, 7488, 72, 7488, 77, 7488, 89, 7488, 89, 7536, 81, 7536, 96, 7584, 101, 7584, 72, 7584, 77, 7584, 91, 7632, 93, 7632, 96, 7680, 103, 7680, 70, 7680, 74, 7680, 91, 7680, 94, 7728, 106, 7728, 79, 7728, 94, 7776, 105, 7776, 70, 7776, 74, 7776, 93, 7824, 103, 7824, 79, 7872, 100, 7872, 72, 7872, 76, 7872, 91, 7872, 91, 7920, 101, 7920, 79, 7968, 103, 7968, 72, 7968, 76, 7968, 89, 8016, 108, 8016, 79, 8016, 91, 8064, 105, 8064, 72, 8064, 77, 8064, 89, 8064, 93, 8112, 108, 8112, 81, 8112, 93, 8160, 103, 8160, 72, 8160, 77, 8160, 88, 8160, 91, 8208, 108, 8208, 81, 8256, 101, 8256, 74, 8256, 77, 8256, 86, 8256, 89, 8304, 81, 8304, 93, 8352, 105, 8352, 74, 8352, 77, 8352, 86, 8400, 81, 8400, 84, 8445, 89, 8448, 106, 8448, 70, 8448, 74, 8448, 86, 8496, 79, 8496, 89, 8496, 98, 8544, 101, 8544, 70, 8544, 74, 8544, 89, 8592, 79, 8592, 88, 8592, 98, 8640, 105, 8640, 69, 8640, 73, 8640, 88, 8688, 79, 8688, 88, 8688, 97, 8736, 103, 8736, 69, 8736, 73, 8736, 74, 8736, 90, 8784, 102, 8784, 79, 8784, 90, 8832, 62, 8832, 69, 8880, 74, 8928, 78, 8976, 62, 8976, 74, 9024, 59, 9024, 71, 9072, 74, 9120, 78, 9168, 59, 9168, 74, 9216, 62, 9216, 69, 9264, 74, 9312, 78, 9360, 62, 9360, 74, 9408, 59, 9408, 71, 9456, 74, 9504, 78, 9552, 59, 9552, 74, 9600, 62, 9600, 69, 9648, 74, 9696, 78, 9744, 62, 9744, 74, 9792, 59, 9792, 71, 9840, 74, 9888, 78, 9936, 59, 9936, 74, 9984, 62, 9984, 69, 10032, 74, 10080, 78, 10128, 62, 10128, 74, 10128, 81, 10176, 71, 10176, 71, 10176, 91, 10224, 74, 10224, 90, 10272, 71, 10272, 78, 10272, 88, 10320, 69, 10320, 74, 10320, 88, 10368, 62, 10368, 69, 10368, 90, 10416, 74, 10464, 78, 10512, 62, 10512, 74, 10560, 59, 10560, 71, 10608, 74, 10656, 78, 10704, 59, 10704, 74, 10752, 62, 10752, 69, 10800, 74, 10848, 78, 10896, 62, 10896, 74, 10944, 59, 10944, 71, 10944, 91, 10992, 74, 10992, 90, 11040, 78, 11040, 88, 11088, 59, 11088, 74, 11088, 88, 11136, 62, 11136, 69, 11184, 74, 11232, 78, 11232, 90, 11280, 62, 11280, 74, 11280, 86, 11328, 59, 11328, 71, 11376, 74, 11376, 88, 11424, 78, 11472, 59, 11472, 74, 11472, 81, 11520, 62, 11520, 69, 11568, 74, 11616, 78, 11664, 62, 11664, 74, 11712, 59, 11712, 71, 11760, 74, 11808, 78, 11856, 59, 11856, 74, 11904, 64, 11904, 71, 11904, 88, 11952, 76, 12000, 79, 12000, 90, 12048, 64, 12048, 76, 12048, 91, 12096, 64, 12096, 71, 12144, 66, 12144, 76, 12192, 67, 12192, 79, 12192, 88, 12240, 76, 12288, 57, 12288, 69, 12288, 85, 12336, 73, 12384, 79, 12384, 86, 12432, 57, 12432, 73, 12432, 88, 12480, 57, 12480, 69, 12528, 59, 12528, 73, 12576, 61, 12576, 79, 12576, 81, 12624, 73, 12624, 81, 12672, 62, 12672, 69, 12720, 74, 12720, 90, 12768, 78, 12816, 62, 12816, 74, 12864, 59, 12864, 71, 12912, 74, 12960, 78, 13008, 59, 13008, 74, 13056, 62, 13056, 69, 13104, 74, 13152, 78, 13200, 62, 13200, 74, 13200, 81, 13200, 86, 13248, 71, 13248, 71, 13248, 91, 13248, 95, 13296, 74, 13296, 90, 13296, 93, 13344, 71, 13344, 78, 13344, 88, 13344, 91, 13392, 69, 13392, 74, 13392, 88, 13392, 91, 13440, 62, 13440, 69, 13440, 90, 13440, 93, 13488, 74, 13536, 78, 13584, 62, 13584, 74, 13632, 59, 13632, 71, 13680, 74, 13728, 78, 13776, 59, 13776, 74, 13824, 62, 13824, 69, 13872, 74, 13920, 78, 13968, 62, 13968, 74, 13968, 81, 13968, 86, 14016, 59, 14016, 71, 14016, 91, 14016, 95, 14064, 74, 14064, 90, 14064, 93, 14112, 78, 14112, 88, 14112, 91, 14160, 59, 14160, 74, 14160, 88, 14160, 91, 14208, 62, 14208, 69, 14256, 74, 14304, 78, 14304, 90, 14304, 93, 14352, 62, 14352, 74, 14352, 86, 14352, 90, 14400, 59, 14400, 71, 14448, 74, 14496, 78, 14496, 88, 14496, 91, 14544, 59, 14544, 74, 14544, 81, 14544, 86, 14592, 62, 14592, 69, 14640, 74, 14688, 78, 14736, 62, 14736, 74, 14784, 59, 14784, 71, 14832, 74, 14880, 78, 14928, 59, 14928, 74, 14976, 64, 14976, 71, 14976, 88, 15024, 76, 15072, 79, 15072, 90, 15120, 64, 15120, 76, 15120, 91, 15168, 64, 15168, 71, 15216, 66, 15216, 76, 15264, 67, 15264, 79, 15264, 88, 15312, 76, 15360, 57, 15360, 69, 15360, 85, 15408, 73, 15456, 79, 15456, 86, 15504, 57, 15504, 73, 15504, 88, 15552, 57, 15552, 69, 15600, 59, 15600, 73, 15600, 81, 15648, 61, 15648, 79, 15648, 86, 15696, 57, 15696, 73, 15696, 88, 15744, 58, 15744, 70, 15744, 89, 15792, 74, 15792, 88, 15840, 81, 15840, 86, 15888, 70, 15888, 77, 15888, 84, 15936, 81, 15984, 77, 16032, 70, 16032, 77, 16032, 81, 16032, 81, 16080, 57, 16080, 77, 16080, 79, 16080, 82, 16128, 65, 16128, 72, 16128, 77, 16128, 81, 16128, 84, 16176, 81, 16224, 72, 16224, 77, 16224, 84, 16224, 89, 16272, 65, 16320, 60, 16320, 72, 16320, 76, 16320, 84, 16320, 88, 16368, 79, 16368, 86, 16416, 72, 16416, 76, 16416, 82, 16416, 86, 16464, 60, 16464, 81, 16464, 84, 16512, 58, 16512, 70, 16512, 74, 16512, 82, 16512, 86, 16560, 81, 16560, 82, 16560, 84, 16608, 70, 16608, 74, 16608, 81, 16608, 84, 16656, 58, 16656, 76, 16704, 65, 16704, 72, 16704, 77, 16704, 81, 16704, 84, 16752, 81, 16800, 72, 16800, 77, 16800, 79, 16800, 81, 16848, 77, 16848, 82, 16896, 65, 16896, 72, 16896, 77, 16896, 77, 16896, 84, 16944, 81, 16992, 72, 16992, 77, 16992, 81, 16992, 89, 17040, 65, 17088, 60, 17088, 72, 17088, 76, 17088, 82, 17088, 91, 17136, 79, 17136, 81, 17136, 89, 17184, 72, 17184, 76, 17184, 79, 17184, 88, 17232, 60, 17232, 77, 17232, 86, 17280, 58, 17280, 70, 17280, 74, 17280, 77, 17280, 86, 17328, 79, 17328, 82, 17328, 88, 17376, 70, 17376, 74, 17376, 81, 17376, 89, 17424, 58, 17424, 76, 17472, 65, 17472, 72, 17472, 77, 17472, 81, 17472, 89, 17520, 81, 17568, 65, 17568, 72, 17568, 77, 17568, 82, 17568, 91, 17616, 60, 17616, 84, 17616, 93, 17664, 58, 17664, 70, 17664, 74, 17664, 86, 17664, 94, 17712, 79, 17712, 86, 17712, 94, 17760, 58, 17760, 70, 17760, 74, 17760, 84, 17760, 93, 17808, 79, 17856, 60, 17856, 72, 17856, 76, 17856, 84, 17856, 91, 17904, 79, 17952, 60, 17952, 72, 17952, 76, 17952, 81, 17952, 89, 18000, 79, 18000, 82, 18000, 91, 18048, 65, 18048, 72, 18048, 77, 18048, 84, 18048, 93, 18096, 81, 18096, 84, 18096, 93, 18144, 64, 18144, 72, 18144, 77, 18144, 82, 18144, 91, 18192, 81, 18192, 89, 18240, 62, 18240, 74, 18240, 77, 18240, 81, 18240, 89, 18288, 81, 18336, 60, 18336, 74, 18336, 77, 18336, 79, 18336, 86, 18384, 77, 18384, 81, 18384, 84, 18432, 58, 18432, 70, 18432, 74, 18432, 77, 18432, 86, 18480, 79, 18480, 79, 18480, 89, 18528, 65, 18528, 70, 18528, 74, 18528, 81, 18528, 89, 18576, 79, 18576, 79, 18576, 88, 18624, 57, 18624, 69, 18624, 73, 18672, 79, 18672, 79, 18672, 88, 18720, 64, 18720, 69, 18720, 73, 18720, 81, 18720, 90, 18768, 79, 18768, 81, 18768, 90, 18816, 62, 18816, 69, 18864, 74, 18912, 78, 18960, 62, 18960, 74, 19008, 59, 19008, 71, 19056, 74, 19104, 78, 19152, 59, 19152, 74, 19200, 62, 19200, 69, 19248, 74, 19296, 78, 19344, 62, 19344, 74, 19392, 59, 19392, 71, 19440, 74, 19488, 78, 19536, 59, 19536, 74, 19584, 62, 19584, 69, 19632, 74, 19680, 78, 19728, 62, 19728, 74, 19776, 59, 19776, 71, 19824, 74, 19872, 78, 19920, 59, 19920, 74, 19968, 62, 19968, 69, 20016, 74, 20064, 78, 20112, 62, 20112, 74, 20160, 71, 20160, 71, 20160, 91, 20184, 91, 20208, 74, 20208, 90, 20256, 71, 20256, 78, 20256, 88, 20304, 69, 20304, 74, 20304, 88, 20352, 69, 20376, 90, 20400, 74, 20448, 78, 20496, 74, 20544, 71, 20592, 74, 20640, 78, 20688, 74, 20736, 69, 20784, 74, 20832, 78, 20880, 74, 20880, 81, 20928, 71, 20928, 91, 20976, 74, 20976, 90, 21024, 78, 21024, 88, 21072, 74, 21072, 88, 21120, 69, 21168, 74, 21216, 78, 21216, 90, 21264, 74, 21264, 86, 21312, 71, 21360, 74, 21408, 78, 21408, 88, 21456, 74, 21456, 81, 21504, 69, 21552, 74, 21600, 78, 21648, 74, 21696, 71, 21744, 74, 21792, 78, 21840, 74, 21888, 71, 21888, 88, 21936, 76, 21984, 79, 21984, 90, 22032, 76, 22032, 91, 22080, 71, 22128, 76, 22176, 79, 22176, 88, 22224, 76, 22272, 69, 22272, 85, 22320, 73, 22368, 79, 22368, 86, 22416, 73, 22416, 88, 22464, 69, 22512, 73, 22560, 79, 22560, 81, 22608, 73, 22608, 81, 22656, 69, 22704, 74, 22704, 90, 22752, 78, 22800, 74, 22848, 71, 22896, 74, 22944, 78, 22992, 74, 23040, 69, 23088, 74, 23136, 78, 23184, 74, 23232, 71, 23232, 91, 23232, 95, 23280, 74, 23280, 90, 23280, 93, 23328, 78, 23328, 88, 23328, 91, 23376, 74, 23376, 88, 23376, 91, 23424, 62, 23424, 69, 23436, 90, 23436, 93, 23472, 74, 23520, 78, 23568, 62, 23568, 74, 23616, 59, 23616, 71, 23664, 74, 23712, 78, 23760, 59, 23760, 74, 23808, 62, 23808, 69, 23856, 74, 23904, 78, 23952, 62, 23952, 74, 24000, 59, 24000, 71, 24000, 91, 24000, 95, 24048, 74, 24048, 90, 24048, 93, 24096, 78, 24096, 88, 24096, 91, 24144, 59, 24144, 74, 24144, 88, 24144, 91, 24192, 62, 24192, 69, 24240, 74, 24288, 78, 24288, 90, 24288, 93, 24336, 62, 24336, 74, 24336, 86, 24336, 90, 24384, 59, 24384, 71, 24432, 74, 24480, 78, 24480, 88, 24480, 91, 24528, 59, 24528, 74, 24528, 81, 24528, 86, 24576, 62, 24576, 69, 24624, 74, 24672, 78, 24720, 62, 24720, 74, 24768, 59, 24768, 71, 24816, 74, 24864, 78, 24912, 59, 24912, 74, 24960, 64, 24960, 71, 24960, 88, 25008, 76, 25056, 79, 25056, 90, 25104, 64, 25104, 76, 25104, 91, 25152, 64, 25152, 71, 25200, 66, 25200, 76, 25248, 67, 25248, 79, 25248, 88, 25296, 76, 25344, 57, 25344, 69, 25344, 85, 25392, 73, 25440, 79, 25440, 86, 25488, 57, 25488, 73, 25488, 88, 25536, 57, 25536, 69, 25584, 59, 25584, 73, 25584, 81, 25632, 61, 25632, 79, 25632, 86, 25680, 57, 25680, 73, 25680, 88, 25728, 58, 25728, 70, 25728, 89, 25776, 74, 25776, 88, 25824, 81, 25824, 86, 25872, 70, 25872, 77, 25872, 84, 25920, 81, 25968, 77, 26016, 70, 26016, 77, 26016, 81, 26016, 81, 26064, 57, 26064, 77, 26064, 79, 26064, 82, 26112, 65, 26112, 72, 26112, 77, 26112, 81, 26112, 84, 26160, 81, 26208, 72, 26208, 77, 26208, 84, 26208, 89, 26256, 65, 26304, 60, 26304, 72, 26304, 76, 26304, 84, 26304, 88, 26352, 79, 26352, 86, 26400, 72, 26400, 76, 26400, 82, 26400, 86, 26448, 60, 26448, 81, 26448, 84, 26496, 58, 26496, 70, 26496, 74, 26496, 82, 26496, 86, 26544, 81, 26544, 82, 26544, 84, 26592, 70, 26592, 74, 26592, 81, 26592, 84, 26640, 58, 26640, 76, 26688, 65, 26688, 72, 26688, 77, 26688, 81, 26688, 84, 26736, 81, 26784, 72, 26784, 77, 26784, 79, 26784, 81, 26832, 65, 26832, 77, 26832, 82, 26880, 65, 26880, 72, 26880, 77, 26880, 77, 26880, 84, 26928, 81, 26976, 72, 26976, 77, 26976, 81, 26976, 89, 27024, 65, 27072, 60, 27072, 72, 27072, 76, 27072, 82, 27072, 91, 27120, 79, 27120, 81, 27120, 89, 27168, 72, 27168, 76, 27168, 79, 27168, 88, 27216, 60, 27216, 77, 27216, 86, 27264, 58, 27264, 70, 27264, 74, 27264, 77, 27264, 86, 27312, 79, 27312, 82, 27312, 88, 27360, 70, 27360, 74, 27360, 81, 27360, 89, 27408, 58, 27408, 76, 27456, 65, 27456, 72, 27456, 77, 27456, 81, 27456, 89, 27504, 81, 27552, 65, 27552, 72, 27552, 77, 27552, 82, 27552, 91, 27600, 60, 27600, 84, 27600, 93, 27648, 58, 27648, 70, 27648, 74, 27648, 86, 27648, 94, 27696, 79, 27696, 86, 27696, 94, 27744, 58, 27744, 70, 27744, 74, 27744, 84, 27744, 93, 27792, 79, 27792, 91, 27840, 60, 27840, 72, 27840, 76, 27840, 84, 27840, 91, 27888, 79, 27936, 60, 27936, 72, 27936, 76, 27936, 81, 27936, 89, 27984, 79, 27984, 82, 27984, 91, 28032, 65, 28032, 72, 28032, 77, 28032, 84, 28032, 93, 28080, 81, 28080, 84, 28080, 93, 28128, 64, 28128, 72, 28128, 77, 28128, 82, 28128, 91, 28176, 81, 28176, 89, 28224, 62, 28224, 74, 28224, 77, 28224, 81, 28224, 89, 28272, 81, 28320, 60, 28320, 74, 28320, 77, 28320, 79, 28320, 86, 28368, 77, 28368, 81, 28368, 84, 28416, 58, 28416, 70, 28416, 74, 28416, 77, 28416, 86, 28464, 79, 28464, 79, 28464, 89, 28512, 65, 28512, 70, 28512, 74, 28512, 81, 28512, 89, 28560, 79, 28560, 79, 28560, 88, 28608, 57, 28608, 69, 28608, 73, 28656, 79, 28656, 79, 28656, 88, 28704, 64, 28704, 69, 28704, 73, 28704, 81, 28704, 90, 28752, 79, 28752, 81, 28752, 90, 28800, 62, 28800, 69, 28848, 74, 28896, 78, 28944, 62, 28944, 74, 28992, 59, 28992, 71, 29040, 74, 29088, 78, 29088, 93, 29136, 59, 29136, 74, 29136, 93, 29184, 62, 29184, 69, 29184, 95, 29232, 74, 29232, 93, 29280, 78, 29280, 90, 29328, 62, 29328, 74, 29328, 86, 29376, 59, 29376, 71, 29424, 74, 29424, 88, 29424, 91, 29472, 78, 29472, 90, 29472, 93, 29520, 59, 29520, 74, 29520, 90, 29520, 93, 29568, 62, 29568, 69, 29616, 74, 29664, 78, 29712, 62, 29712, 74, 29760, 59, 29760, 71, 29808, 74, 29808, 93, 29856, 78, 29856, 93, 29904, 59, 29904, 74, 29904, 93, 29952, 62, 29952, 69, 29952, 95, 30000, 74, 30000, 93, 30048, 78, 30048, 90, 30096, 62, 30096, 74, 30096, 86, 30144, 59, 30144, 71, 30192, 74, 30192, 88, 30192, 91, 30240, 78, 30240, 90, 30240, 93, 30288, 59, 30288, 74, 30288, 90, 30288, 93, 30336, 62, 30336, 69, 30384, 74, 30432, 78, 30480, 62, 30480, 74, 30528, 59, 30528, 71, 30576, 74, 30576, 93, 30624, 78, 30624, 93, 30672, 59, 30672, 74, 30672, 93, 30720, 62, 30720, 69, 30720, 95, 30768, 74, 30768, 93, 30816, 78, 30816, 90, 30864, 62, 30864, 74, 30864, 86, 30912, 59, 30912, 71, 30960, 74, 30960, 88, 30960, 91, 31008, 78, 31008, 90, 31008, 93, 31056, 59, 31056, 74, 31056, 90, 31056, 93, 31104, 62, 31104, 69, 31152, 74, 31200, 78, 31248, 62, 31248, 74, 31296, 59, 31296, 71, 31344, 74, 31392, 78, 31392, 93, 31440, 59, 31440, 74, 31440, 93, 31488, 62, 31488, 69, 31488, 95, 31536, 74, 31536, 93, 31584, 78, 31584, 90, 31632, 62, 31632, 74, 31632, 86, 31680, 59, 31680, 71, 31728, 74, 31728, 88, 31728, 91, 31776, 78, 31776, 90, 31776, 93, 31824, 59, 31824, 74, 31824, 90, 31824, 93, 31872, 62, 31872, 69, 31920, 74, 31968, 78, 32016, 62, 32016, 74, 32064, 59, 32064, 71, 32112, 74, 32112, 93, 32160, 78, 32160, 93, 32208, 59, 32208, 74, 32208, 93, 32256, 62, 32256, 69, 32256, 95, 32304, 74, 32304, 93, 32352, 78, 32352, 90, 32400, 62, 32400, 74, 32400, 86, 32448, 59, 32448, 71, 32496, 74, 32496, 88, 32496, 91, 32544, 78, 32544, 90, 32544, 93, 32592, 59, 32592, 74, 32592, 90, 32592, 93, 32640, 62, 32640, 69, 32688, 74, 32736, 78, 32784, 62, 32784, 74, 32832, 59, 32832, 71, 32880, 74, 32880, 91, 32928, 78, 32928, 93, 32976, 59, 32976, 74, 32976, 93, 33024, 62, 33024, 69, 33072, 74, 33120, 78, 33168, 62, 33168, 74, 33216, 71, 33216, 71, 33264, 74, 33264, 91, 33312, 71, 33312, 78, 33312, 90, 33360, 69, 33360, 74, 33360, 90, 33791, 0 // 176 seconds * 48 * 4 - 1 };

    synth.asm

    .cdecls C, LIST, "msp430fr5739.h" .text .def set_tick .def get_tick .def synth_init .def set_note .ref wave .bss tick, 2 .bss pwm_out, 2 .bss phase_inc, 6 * 8 ; Level ; Phase increment LSW/MSW (from note table) .bss phase_acc, 4 * 8 ; Phase accumulator LSW/MSW .def phase_inc set_tick: mov R12, &tick reta get_tick: mov &tick, R12 reta synth_init: mov #0x0210, &TA0CTL ; Timer A config: SMCLK, count up mov #749, &TA0CCR0 ; Setup Timer A period for 32000 sps mov #375, &TA0CCR1 ; Setup Timer A compare mov #0x00E0, &TA0CCTL1 ; Setup Timer A reset/set output mode ; mov #phase_inc, R12 ; Clear all phase inc and accum mov #5 * 16, R14 ; Word count clr 0(R12) ; Clear word incd R12 ; Next word dec R14 ; Dec word count jne $ - 8 ; Loop until all words done... ; eint ; Enable interupts bis #0x0010, &TA0CCTL0 ; Enable PWM interupt ; reta ; ; synth_isr: ; mov &pwm_out, &TA0CCR1 ; Output sample ; push R4 ; Wavetable pointer push R5 ; Phase increment / level pointer push R6 ; Phase accumulator pointer push R8 ; Wave sample pointer / next sample push R9 ; Wave sample push R10 ; Voice mix accumulator MSW push R11 ; Voice mix accumulator LSW ; mov #wave, R4 ; Setup wavetable pointer mov #phase_inc, R5 ; Setup phase increment and level pointer mov #phase_acc, R6 ; Setup phase accumulator pointer clr R10 ; Clear voice mix clr R11 ; voice_loop: ; .loop 8 mov @R6+, &MPYS32L ; Get phase acc LSW (fraction) to multiplier mov @R6+, R8 ; Get phase acc MSW (wave table index) ; bit #0xFF00, R8 ; Test phase acc MSB mov.b R8, R8 ; Clear MSB ;jeq no_decay ; jeq $ + 22 mov @R5, &MPY ; Get level mov #0xFF00, &OP2 ; Decay factor mov R8, -2(R6) ; Update phase acc mov &RES1, 0(R5) ; Update level ;no_decay: clr &MPYS32H ; add R8, R8 ; Make word index add R4, R8 ; Add wavetable pointer mov @R8+, R9 ; Get wave sample mov @R8, R8 ; Get next wave sample sub R9, R8 ; Calc delta mov R8, &OP2L ; Multiply by delta bit #0x8000, R8 ; Sign extend delta subc R8, R8 ; inv R8 ; mov R8, &OP2H ; add &RES1, R9 ; Add interpolation to sample mov R9, &MPYS ; Multiply by voice level mov @R5+, &OP2 ; add @R5+, -4(R6) ; Update phase acc addc @R5+, -2(R6) ; add &RES0, R11 ; Update mix addc &RES1, R10 ; ; .endloop ; swpb R10 ; Use MSB of R10 mov.b R10, R10 ; sxt R10 ; Sign extend add R10, R10 ; * 2 add #375, R10 ; Bias to center of PWM range mov R10, &pwm_out ; ; dec &tick ; jc $ + 6 ; clr &tick ; ; pop R11 ; pop R10 ; pop R9 ; pop R8 ; pop R6 ; pop R5 ; pop R4 ; reti ; ; set_note: ; mov R12, R15 ; Voice * 6 add R15, R12 ; (+1 = *2) add R15, R12 ; (+1 = *3) rla R12 ; (*2 = *6) add #phase_inc, R12 ; Add phase inc pointer mov R14, 0(R12) ; Set level cmp #128, R13 ; Out of range note values are note off jhs note_off ; clr R14 ; Clear octave count tst_note: ; cmp #116, R13 ; Within note table? jge get_pi ; Yes... inc R14 ; Inc octave count add #12, R13 ; Add octave to note jmp tst_note ; Check again... get_pi: ; Get phase increment sub #116, R13 ; Adjust for first note in table rla R13 ; MIDI note * 4 rla R13 ; add #notes, R13 ; Add note table pointer mov @R13+, R15 ; Get LSW mov @R13, R13 ; Get MSW tst R14 ; Shifting required? jeq set_phase ; No... shift_phase: ; rra R13 ; Shift phase inc rrc R15 ; dec R14 ; Dec octave count jne shift_phase ; Repeat until zero... set_phase: ; mov R15, 2(R12) ; Set phase inc mov R13, 4(R12) ; reta ; Return ; note_off: ; incd SP ; Discard level clr 0(R12) ; Clear phase inc clr 2(R12) ; .if 0 ; Note: Abrupt return to zero causes poping clr 4(R12) ; Clear level add #phase_acc - phase_inc, R12 ; Phase accum pointer clr 0(R12) ; Clear phase accum clr 2(R12) ; .endif ; reta ; Return ; ; notes ; MIDI Note Frequency .long 3483828 ; 116 G#8 6644.87457275391 .long 3690988 ; 117 A8 7040.00091552734 .long 3910465 ; 118 A#8 7458.62007141113 .long 4142993 ; 119 B8 7902.13203430176 .long 4389349 ; 120 C9 8372.01881408691 .long 4650353 ; 121 C#9 8869.84443664551 .long 4926877 ; 122 D9 9397.27210998535 .long 5219845 ; 123 D#9 9956.06422424316 .long 5530233 ; 124 E9 10548.0823516846 .long 5859077 ; 125 F9 11175.3025054932 .long 6207476 ; 126 F#9 11839.8208618164 .long 6576592 ; 127 G9 12543.8537597656 ; Interrupt Vectors .sect ".int53" ; TA0CCR0 CCIFG0 .short synth_isr ; ; .end ;
  11. Like
    EngIP reacted to oPossum in 8 channel PWM with a single timer (low RAM usage)   
    The 16 channel PWM code uses too much RAM to fit in a low end MSP430. The linked list node structure is 8 bytes and 17 are required to support 16 channel PWM for a total of 136 bytes - more than the G2211/G2231 have. To reduce RAM requirements, several changes have been made.
     
    This is the old linked list node structure...

    typedef struct { // PWM ISR info struct unsigned time; // Time for on/off action to occur unsigned port_off; // Port pins to turn off unsigned port_on; // Port pins to turn on void *next; // Next entry in linked list } TPWM; //
    And this is the new one...

    typedef struct { // PWM ISR linked list node struct unsigned char time; // Time for on/off action to occur unsigned char port; // Port pin(s) to change void *next; // Next node in linked list } TPWM; //
    The number of channels has been reduced to 8 by changing the port member to 8 bit unsigned char. The separate port on/off members have been replaced by a single entry. The time has also been changed to 8 bits, so the resolution can not exceed 8 bits. Structure size is reduced to 4 bytes. Eight channels require 9 nodes, so RAM usage is only 36 bytes - a reduction of 100 bytes.
     
    Merging the port on/off members has changed the operation a bit. The ISR must determine if port pins should be turned on or off by comparing the current node to the sentinel (first) node. Port pins that are set to a PWM value of zero will be turned off and not actively driven like the 16 bit code does. A function to remove a pin from the list is no longer needed - just set the PWM value to zero.
     
    The 16 channel code used capture/compare register 1. I used that due to habit. Since the timer is in continuous mode, it is possible to use capture/compare register 0. That leaves capture/compare register 1 free for other uses such as hardware PWM or software async serial.
     
    The 16 channel ISR...

    __interrupt void Timer0_A1 (void) { volatile unsigned x = TAIV; // Clear interrupt flag P1OUT &= ~pa->port_off; // Port pins off P2OUT &= ~pa->port_off >> 8; // P1OUT |= pa->port_on; // Port pins on P2OUT |= pa->port_on >> 8; // pa = pa->next; // Next entry in list TACCR1 = pa->time; // Update timer compare time }
     
    The revised 8 channel ISR...

    __interrupt void Timer_A0 (void) { if(pa == &pw[0]) { // Sentinel node? P1OUT |= pa->port; // Port pins on } else { // P1OUT &= ~pa->port; // Port pins off } // pa = pa->next; // Next node in list TACCR0 = pa->time << 8; // Update timer compare time }
     
    Complete code with test cases

    #include "msp430g2211.h" #include "string.h" typedef struct { // PWM ISR linked list node struct unsigned char time; // Time for on/off action to occur unsigned char port; // Port pin(s) to change void *next; // Next node in linked list } TPWM; // TPWM pw[9], *pi; // Array and inactive list head volatile TPWM *pa; // Active node void pwm_set(const unsigned pin, const unsigned time) { const unsigned mask = 1 << pin; // const unsigned tm = time >> 8; // 8 bit time TPWM *b, *p, *n; // // // -- Try to find existing active node for this pin for(b = &pw[0], p = b->next; p != &pw[0]; b = p, p = b->next) { if(p->port & mask) { // Found it if(p->time == tm) return; // - Time is the same, nothing to do, return... while(pa != p); // Wait for this node to be active while(pa == p); // Wait for this node to become inactive // Safe to remove now if(p->port == mask) { // - Node is only used for this pin, remove it b->next = p->next; // Remove link p->next = pi; // Add to inactive list pi = p; // } else { // - Node is used for multiple pins p->port &= ~mask; // Remove this pin from the node } // break; // Found the pin, so stop searching } // } // // - Update first node in list if(tm == 0) { // If time is 0, turn off and return P1OUT &= ~mask; // return; // } else { // If time is non-zero, turn on pw[0].port |= mask; // if(time == 0xFFFF) return; // If max, no need to turn off, so return } // // // Find where the new turn off node will go for(b = &pw[0], p = b->next; p != &pw[0]; b = p, p = b->next) if(p->time >= tm) break; // Stop when an entry of >= time is found // if(p->time == tm) { // If same time, use existing node p->port |= mask; // Add this pin return; // All done... } // // n = pi; // Get a node from the inactive list pi = n->next; // // n->port = mask; // Setup new node n->time = tm; // // n->next = p; // Insert node in to active list b->next = n; // } void pwm_init(void) { unsigned n; memset(pw, 0, sizeof(pw)); // Clear entire array pa = &pw[0]; // Active list always begins with first array element pa->next = &pw[0]; // Begin with only 1 node in list pi = &pw[1]; // First inactive node is second array element for(n = 1; n < sizeof(pw)/sizeof(TPWM) - 1; ++n) // Link the inactive nodes pw[n].next = &pw[n + 1]; // // TACTL = TASSEL_2 + MC_2 + ID_0; // Setup timer, continuous mode, SMCLK/1 TACCTL0 = CCIE; // Enable timer interrupt _EINT(); // Enable interrupts } #pragma vector = TIMERA0_VECTOR __interrupt void Timer_A0 (void) { if(pa == &pw[0]) { // Sentinel node? P1OUT |= pa->port; // Port pins on } else { // P1OUT &= ~pa->port; // Port pins off } // pa = pa->next; // Next node in list TACCR0 = pa->time << 8; // Update timer compare time } void main(void) { unsigned n; unsigned o; //unsigned w[8]; //unsigned r[] = { 100, 106, 112, 118, 124, 130, 136, 142 }; WDTCTL = WDTPW | WDTHOLD; // Disable watchdog DCOCTL = 0; // BCSCTL1 = 0x80 | 15; // Run at aprox 12 MHz P1DIR = BIT0 | BIT6; // Enable outputs for LEDs on Launchpad //P1DIR = 0xFF; // Enable all P1 pins as output pwm_init(); // Initialize software PWM for(; { #if 1 pwm_set(0, n); pwm_set(6, o); n += 100; o += 123; __delay_cycles(100000); #else for(n = 0; n < 8; ++n) { pwm_set(n, w[n]); w[n] += r[n]; } __delay_cycles(100000); #endif } }
     


  12. Like
    EngIP reacted to username in MSP430 Reflow Oven   
    Hey all,

    Nate here, made a nice little reflow oven to help me in the construction of surface mount boards. Got a video explaining it all here:

    PCBs and Control Boards for sale here: viewtopic.php?f=22&t=2040
    No longer for sale, no time to pump any out.
     

    Project Video:





    Project Pics:







    Schematic:This is my old V1 schematic. Todo if you want a better board:
    -Use a MSP430G2553 MCU (more pins and flash)
    -Use a non EOL thermocouple driver IC: MAX31855KASA+
    -Add in a FT230XS for a USB interface
    -Add flyback protection to relay LSD if a mechanical relay is used.
     
    Full size at link:
    http://forum.43oh.com/uploads/monthly_12_2011/post-4818-135135531417.jpg
     



    Oven: Convection (30 usd)
    http://www.walmart.com/ip/Black-Decker-Toaster-Oven-Stainless-Steel/16913546
     
    Oven: IR (recommended that you use an IR oven of sorts)
    http://www.walmart.com/ip/George-Foreman-Infrared-Countertop-Oven-with-Rotisserie/19411514
     
     
    C# GUI for live plotting:

     

    Here is the BOM:

    Update: Schematic has most Part #s on it
     
    Thermal-couple: (Important that it is low thermal mass and rated for temp range)
    Digikey: 290-1911-ND
     
    Thermal-couple IC:
    MAX31855KASA+
    MAX31855KASA+T
     
    Relay: (this is a mechanical relay. I salvaged a SSR for my V2. I highly recommend you use an SSR for long life and quicker switching times)
    Digikey: T9AS1D22-5-ND (Relay)

    Misc Digikey Part # (Part Discription)
    MC78M05CDTGOS-ND (5V regulator Dpak)
    445-1590-1-ND ( CAP CER 1.0UF 25V Y5V 0805)
    754-1133-1-ND ( LED 2X1.2MM 630NM RD WTR CLR SMD)
    754-1127-1-ND (LED 2X1.2MM 570NM GN WTR CLR SMD)
    CP-102B-ND (CONN POWER JACK 2.5MM PCB CIRC)
    785-1112-1-ND (MOSFET N-CH 20V 25A TO-252 (Relay))
    IRLML6344TRPBFCT-ND ( MOSFET N-CH 30V 5A SOT23 (SSR Load))
    RMCF0805JT100KCT-ND ( RES 100K OHM 1/8W 5% 0805 SMD)
    RMCF0805JT47K0CT-ND ( RES 47K OHM 1/8W 5% 0805 SMD)
    RMCF0805FT499RCT-ND ( RES 499 OHM 1/8W 1% 0805 SMD)
    296-8247-5-ND (IC 8-BIT SHIFT REGISTER 14-SOIC)
    296-28430-1-ND (IC MCU 16BIT 20TSSOP)
    RMCF0805JT1K00CT-ND ( RES 1K OHM 1/8W 5% 0805 SMD)
    CT94EY104-ND (TRIMMER 100K OHM 0.5W TH)
    MCP1700T3302ETTCT-ND ( IC REG LDO 3.3V 250MA SOT23-3)

    + a 16x2 LCD display
    + some dip headers that are used for jumping and programing.
    + 5mm/.2in lead spacing terminal headers for relay and thermocouple input.
  13. Like
    EngIP reacted to canid in Launchpad   
    For anybody who missed my comment here i thought i would post it here.
     
    I was able to replace my borked LP and am able to offer one to the next person who needs one but can not afford it. $4.30 isn't a lot of money to most of us, but sometimes things are rough.
  14. Like
    EngIP reacted to oPossum in Microchip Microstick for $18 until end of 2011   
    Usual price is $25.
     
    The Microstick is a low cost dev board for the 16 bit Microchip PIC. It has a built in programmer/debugger like the Launchpad, so you don't need any other hardware to program it. The 16 bit PIC are typically twice as fast as MSP430 at the same clock frequency, and in some very specific cases may be 10 to 100 times as fast. They have Peripheral Pin Select (PPS) that allows many of the hardware peripheral to be mapped to any convenient pin.
     
     

     
    link
     
    If you want to play with the new DIP PIC32 (MIPS) chips, the $35 Microstick II will work with all 3.3V PIC24FJ, PIC24H, dsPIC33, and PIC32 SPDIP packaged devices. Includes 1 each of PIC24FJ64GB002, PIC24HJ64GP502, dsPIC33FJ64MC802, and PIC32MX220F032.
     

  15. Like
    EngIP reacted to ohmselectronics in Daft Punk's helmet HS Hallowing costume contest winner   
    Baseball helmets $5
    Launchpad $5
    Bondo+FiberGlass $20
    FusionCore board $10
    LEDs $3
     
    Spending some quality time with the kiddoes and wining the HS costume contest..... priceless
    BTW. we won the boyscouts costume contest with the second helmet as well...
     
    www(dot)youtube(dot)com/watch?v=V63sd5VlIuM
     
    thanks
  16. Like
    EngIP reacted to bluehash in Position triangulation accuracy   
    Edit: His paper is here - DIVERSITY TECHNIQUES FOR SIGNAL-STRENGTH BASED INDOOR LOCATION DETERMINATION
     
    I would have suggested radio RSSI(received signal strength indicator) to detect location. There was a guy in my school doing his thesis on it.
     
    I cannot find his paper, but here is a similar one.
  17. Like
    EngIP reacted to cde in Position triangulation accuracy   
    As a not so batshit insane option, rfid readers that can scan an entire doorway. If they are all networked, it's easy to determine which room was entered and which was left. Bonus, no mucking around with wireless horrors of the rf kind.
  18. Like
    EngIP got a reaction from Theshadowwalker91 in LED Flash Rate Change   
    Tidied it up, now it just flashes P1.0, the rate of flash doubling with a short press of S1, halving with a long press - tested on a fresh out of the box LP and G2231 - HTH
     

    #include long test, a=0, delay=2000, delay1=2000, half; void main(void) { P1DIR |= BIT0; //Set P1.0 as an output P1OUT &= ~BIT0; //Set P1.0 low WDTCTL = WDTPW + WDTHOLD; // Hold the WDT (WatchDog Timer) while(1){ //loop forever delay1--; //decrement counter half = (delay/2); //set value of half to be delay/2 if (delay1<=half){ //if counter value is less than P1OUT &= ~BIT0; } else { P1OUT |= BIT0; } if (delay1<=0){ delay1=delay; } if (P1IN & BIT3){ //Rudimentary debounce software also measures test=a; //duration button pressed in program cycles a=0; //and alters delay value accordingly. } if (!(P1IN & BIT3)){ a++; } if (test>=500){ delay=(delay*2); delay1=delay; test = 0; } if ((test>=100)&&(test<500)){ delay=(delay/2); delay1=delay; test = 0; } } }
  19. Like
    EngIP got a reaction from bluehash in LED Flash Rate Change   
    Tidied it up, now it just flashes P1.0, the rate of flash doubling with a short press of S1, halving with a long press - tested on a fresh out of the box LP and G2231 - HTH
     

    #include long test, a=0, delay=2000, delay1=2000, half; void main(void) { P1DIR |= BIT0; //Set P1.0 as an output P1OUT &= ~BIT0; //Set P1.0 low WDTCTL = WDTPW + WDTHOLD; // Hold the WDT (WatchDog Timer) while(1){ //loop forever delay1--; //decrement counter half = (delay/2); //set value of half to be delay/2 if (delay1<=half){ //if counter value is less than P1OUT &= ~BIT0; } else { P1OUT |= BIT0; } if (delay1<=0){ delay1=delay; } if (P1IN & BIT3){ //Rudimentary debounce software also measures test=a; //duration button pressed in program cycles a=0; //and alters delay value accordingly. } if (!(P1IN & BIT3)){ a++; } if (test>=500){ delay=(delay*2); delay1=delay; test = 0; } if ((test>=100)&&(test<500)){ delay=(delay/2); delay1=delay; test = 0; } } }
  20. Like
    EngIP reacted to PentiumPC in Bluetooth Booster Pack / Breakout board - HC05/HC06   
    Fix 1 up for testing.
     
    Since it is just a simple breakout board, it works pretty well.

  21. Like
    EngIP reacted to Fred in Programmable with launchpad?   
    You should be ok. I programmed an Olimex PIR board using the USB stick from the EZ430-F2013. It had the same connector. Check the JTAG pinout though - mine was non-standard until some links on the board were changed.
     
    Unfortunately I choose the 433 MHz version of the Chronos or I might have between tempted to get one too.
  22. Like
    EngIP reacted to bluehash in Programmable with launchpad?   
    You should be. I can see SBWTDIO/SBWTCK in there going to the JTAG connector.
     

  23. Like
    EngIP reacted to bluehash in The Terminal - 43oh OLED Booster Pack   
    So since the past month, I have been working on an OLED display for the Launchpad. It is a 128*64 OLED based on the SSD1306 driver. The booster pack is currently configured as SPI to a MSP430G2452. There are solder jumpers to the /CS, RST, SCLK and MOSI pins, so you can use the pins for something else too.











    There are currently two font packs created for it( Courier new Large and Small) optimized for the display. These will be available in the next week to buy in the store. Just wanted to get it out here. I have parts to build eight modules till the next batch is made.

    Code and schematics will be out in a few days. I'd really like to thank people who have contributed code here. I've used it in the OLED code and given credit where credit is due.

    Please feel free in giving suggestions or criticizing the board.

    I'm still ironing out stuff with the shop and thought this will be a good time to release something exciting.

    PS: The variation of light you see in the display is because of the camera's higher shutter speed while it is drawing. With our Persistence of Vision, it appears clean and uniform.


    -----------------------

    Schematic : Rev v1.0
    Code : Rev R01_01
    Buy : Shop

    ---
    Changes to be made for rev1.2
    -- Make board stellaris launchpad capable
    -- Ad mounting holes
    -- 4 way joystick for UI
  24. Like
    EngIP reacted to TopHatHacker in Zombie in a Can!   
    Hey, just poking my head in here quick to show off the first prototype of my Zombie in a Can!
     
    Check out the VID

     
    I used a launchpad with the 2231, a bluesmirf board, a window motor and a custom android app, this thing is awesome! I'm pretty proud that I made this in a night with 2 or 3 broken projects I had sitting around.
     
    Let me know what you think! and i'll be posting some scare videos soon
     


     
    First Motor Test


  25. Like
    EngIP got a reaction from bluehash in Thermocouple driver   
    I was messing about with a thermocouple application a while back. I planned to use the on board temp. sensor of the MSP430 for CJC, and the amp I used was an AD627 (I remember it was expensive, but it worked on 3V, which is why I chose it). AFAIK, there's no cheap (<$1) option for this kind of thing.
     
    It was a very simple set up, t/c into amp, into ADC on MSP430. I used a cooking thermometer to calibrate the thermocouple, but I didn't implement CJC so the accuracy of the reading would drift depending on ambient temperature.
     
    Here's a dodgy video of the set up
     

    http://www.youtube.com/watch?v=UoQmMPi9KxY
×
×
  • Create New...