Jump to content
43oh

gatesphere

Members
  • Content Count

    430
  • Joined

  • Last visited

  • Days Won

    6

Reputation Activity

  1. Like
    gatesphere reacted to bluehash in New Forum Section : Community Project EasyMSP   
    Added Community forum for EasyMSP. This wil be a great addition to MSPhere. If you have some time, please say Hi! in the welcome thread.
    Thanks everyone.
  2. Like
    gatesphere reacted to bluehash in 2006 MSP430 eZ Design Contest project files   
    Hello none,
    TI came back to us saying that this page has everything. They unfortunately could not give any data right away, but said they were looking into it.
  3. Like
    gatesphere reacted to fj604 in Interfacing the Launchpad with TLC5940 16-channel PWM driver   
    Hi everyone,
     
    Here is my attempt to demo a TLC5940 PWM LED driver connected to the Launchpad. This code does not use interrupts and follows the basic sample from Demystifying TLC5940: http://sites.google.com/site/artcfox/demystifying-the-tlc5940
     
    Made using CCS 4.
     

    /* * TLC5940 Demo for MSP430 * Only PWM functionality is demonstrated * Dot correction function is not used * Rotates a pattern of decreasing light intensity on LEDs - OUT0..OUT15 * To pause, press and hold the S2 button on the launchpad * Launchpad LED1 stays on, LeED2 flashes on every PWM cycle */ #include // Pin mapping #define GSCLK_PIN BIT7 // to TLC5940 pin 18 #define SIN_PIN BIT1 // to TLC5940 pin 26 #define SCLK_PIN BIT2 // to TLC5940 pin 25 #define BLANK_PIN BIT4 // to TLC5940 pin 23 #define XLAT_PIN BIT5 // to TLC5940 pin 24 #define LED1_PIN BIT0 // Launchpad LED1 (Red) #define LED2_PIN BIT6 // Launchpad LED2 (Green) #define S2_PIN BIT3 // Launchpad S2 button // Number of daisy-chained TLC5940 ICs #define TLC5940_N 1 // Useful macros #define setHigh(n) ( P1OUT |= n ) #define setLow(n) ( P1OUT &= ~n ) #define pulse(n) { setHigh(n); setLow(n); } // PWM cycles to wait before rotating gsData #define DELAY 3 // Grayscale values for each channel in reverse order unsigned int gsData[] = { 0, // Channel 15 0, // Channel 14 0, // Channel 13 0, // Channel 12 BIT1, // Channel 11 BIT2, // Channel 10 BIT3, // Channel 9 BIT4, // Channel 8 BIT5, // Channel 7 BIT6, // Channel 6 BIT7, // Channel 5 BIT8, // Channel 4 BIT9, // Channel 3 BITA, // Channel 2 BITB, // Channel 1 BITB | BITA | BIT9 | BIT8 | BIT7 | BIT6 | BIT5 | BIT4 | BIT3 | BIT2 | BIT1 | BIT0 // Channel 0 } ; // Update gs during PWM cycle? unsigned char gsUpdateFlag=1; void init(void) { P1DIR |= GSCLK_PIN | SIN_PIN | SCLK_PIN | BLANK_PIN | XLAT_PIN; // Set output // Init output pins setLow(GSCLK_PIN); setLow(SCLK_PIN); setLow(XLAT_PIN); setLow(BLANK_PIN); } void GS(void) { unsigned int Data_Counter = 0, GSCLK_Counter; setLow(BLANK_PIN); for (GSCLK_Counter = 0; GSCLK_Counter < 4096; GSCLK_Counter++) { if (gsUpdateFlag && (! (Data_Counter > TLC5940_N * 192 -1))) { // Check and load next data bit, MSB first, 12 bits per value if (gsData[Data_Counter / 12] & (BITB >> ( Data_Counter % 12))) setHigh(SIN_PIN); else setLow(SIN_PIN); pulse(SCLK_PIN); Data_Counter++; P1OUT |= LED2_PIN; // LED2 on } else P1OUT &= ~LED2_PIN; // LED2 off pulse(GSCLK_PIN); } setHigh(BLANK_PIN); pulse(XLAT_PIN); gsUpdateFlag = 0; // PWM update finished, reset gsUpdate flag } void main(void) { int i, t; WDTCTL = WDTPW + WDTHOLD; // Disable watchdog timer // Set DCO to ~15.25 MHz as per datasheet // Does not use calibration values BCSCTL1 = RSEL0 | RSEL1 | RSEL2 | RSEL3; // RSELx = 15 DCOCTL = DCO0 | DCO1; // DCOx = 3, MODx = 0 init(); P1DIR |= LED1_PIN | LED2_PIN; // Enable Launchpad LEDs for output P1OUT |= LED1_PIN; // LED1 on P1OUT &= ~LED2_PIN; // LED2 off for (; // Loop forever { for (i=0; i < DELAY; i++) GS(); if (P1IN & S2_PIN) // If S2 not pressed { // Rotate gsData t = gsData[0]; for (i = 0; i < 15; i++) gsData[i] = gsData[i+1]; gsData[15] = t; gsUpdateFlag = 1; // Update gs on next PWM cycle } } }
  4. Like
    gatesphere reacted to bluehash in New Forum Section : Embedded Systems/Test Equipment Deals   
    Hello,
    A new section has been added under the Connect category of the Forum. Post all your new found deals here as long as they pertain to embedded systems, test equipment etc. Kits from other manufacturers are also welcome. Any comments, critics please post below.
    Embedded Systems/Test Equipment Deals
  5. Like
    gatesphere reacted to GeekDoc in MSP430 Day Presentations   
    For those who don't want to search, I got this in an e-mail (even though I didn't make it to the presentation):
     
    Exclusive tool discounts on TI
  6. Like
    gatesphere reacted to bluehash in Something on the blog page..   
    A goodie for you guys on the Blog page. A bit expensive, but if you can afford it with the 43oh discount...
  7. Like
    gatesphere got a reaction from jsolarski in Peeked in a dumpster, and look what I found...   
    A Heath-Zenith Microcomputer Learning Kit, Model ETW-3400-A.

     
    EDIT: Just plugged it in, and it works! I just need to find a manual. :D:D
  8. Like
    gatesphere got a reaction from RobG in Peeked in a dumpster, and look what I found...   
    A Heath-Zenith Microcomputer Learning Kit, Model ETW-3400-A.

     
    EDIT: Just plugged it in, and it works! I just need to find a manual. :D:D
  9. Like
    gatesphere got a reaction from RobG in Peeked in a dumpster, and look what I found...   
    I know! I just went back for a second trip to see what else I could find, found a nice Tektronix PG 501 Pulse Generator (without the rack... ah well) and an Eico 1171 Resistance Decade box. I fully intend to go back tomorrow and get the rest of the goodies I couldn't reach without jumping in.
  10. Like
    gatesphere reacted to nexusone1984 in 8X8 Dot matrix display test ASCII Characters   
    Jumping from my six digit Seven Segment display, I plugged in a 8X10 Dot matrix display I made from scratch.
     
    Right now just displays a trimmed down ASCII set, two 74HC595's drive the display so I only using 8X8 of the 8X10.
     
    Later add some animation and other stuff..
     


  11. Like
    gatesphere reacted to zeke in Peeked in a dumpster, and look what I found...   
    Dumpster dove into ancient history!
     
    That is about 36 years old - circa 1977.
     
    Here's some pdf manuals for it.
     
    It's a Motorola processor. I think it's a MC6800 CPU but I can't be sure. The photo on the above page is kinda blurry.
  12. Like
    gatesphere got a reaction from bluehash in Peeked in a dumpster, and look what I found...   
    A Heath-Zenith Microcomputer Learning Kit, Model ETW-3400-A.

     
    EDIT: Just plugged it in, and it works! I just need to find a manual. :D:D
  13. Like
    gatesphere reacted to touch in Dual PWM with TimerA1   
    #include void main(void) { WDTCTL = WDTPW + WDTHOLD; // Kill WDT P2DIR |= BIT2 + BIT5; // P2.2 and P2.5 output P2SEL |= BIT2 + BIT5; // P2.2 and P2.5 options select TA1CCR0 = 128; // PWM period TA1CCTL1 = OUTMOD_6; // CCR2 reset/set TA1CCR1 = 32; // CCR1 25% PWM duty cycle TA1CCTL2 = OUTMOD_6; // CCR2 reset/set TA1CCR2 = 6; // CCR2 5~% PWM duty cycle TA1CTL = TASSEL_2 + MC_1 + TACLR; // SMCLK, up mode, clear TAR __bis_SR_register(LPM0_bits); //LPM 0 while(1){ } }
     
    Here's some simple code for using TimerA1 to generate 2 PWM signals on the G2553. TimerA0 could also be used, but on the PDIP versions only has two of the three CCR's accessible I believe.
  14. Like
    gatesphere reacted to touch in MSP-EXP430FR5739 Experimenter Board - New DEV board   
    Anyone seen this?
    https://estore.ti.com/MSP-EXP430FR5739- ... x-pr-ek-es
     
    I'm definitely picking one of these up... I hope that we get some 50% off coupons soon for the TI store .
     
    Seems interesting they included a 3 axis accelerometer and a temperature sensor.
  15. Like
    gatesphere got a reaction from bluehash in Advertising help - List of Companies.   
    You might want to try one of the distributors: Arrow, Avnet, Newark, Mouser, etc. They might pony something up in exchange for advertisement space.
     
    You might also want to try contacting Circuit Cellar magazine, they co-sponsor contests all the time. They might be able to offer up a dev-board or some cash or something.
  16. Like
    gatesphere reacted to DanAndDusty in Electronic Parts Suppliers   
    It kinda all depends on how long you want to wait and if you have the quantity/items to soak up the shipping.. but this is a good price.. I have their (el-cheapeo) 700 pt boards and Im happy with em.
  17. Like
    gatesphere reacted to nexusone1984 in 6 digit display temperature demo   
    More playing around with the 74hc595 and a 6 digit LED display from a older project.
     
    Demo shows how to display in decimal and hexadecimal, selecting a digit among a group of digits.
     


  18. Like
    gatesphere reacted to RobG in Electronic Parts Suppliers   
    I think it would be a good idea to have a list of part suppliers in one convenient location, so here's my list:
     
    Element14
    I found a mention of this place in one of the posts last week and it quickly became my #1 parts supplier
    Pros: Huge selection, prices are good, some are lowest I could find. Shipping from US and the shipping is flat $5, and it's fast, I got my package in 2 days (USPS shipped from SC to NC.)
    Cons: Well, it's not really a con but I got my package with parts worth $10 and it was over-packed, paper bags, plastic bags, boxes, etc. definately not a green company OK, no cons, not yet.
     
    Futurlec
    90% of my parts came from Futurlec because their prices are one of the lowest around and I had pretty much no problems with them.
    Pros: Low prices, good selection, shipping is only $4
    Cons: Ships form China so it takes 2-3 weeks to get the package, international charge on credit card.
     
    Jameco
    Pros: Fair selection, shipped from US
    Cons: Prices and shipping are OK but not the lowest
     
    Mouser
    Pros: Huge selection, shipped from US
    Cons: Prices are rather high, shipping OK but not the lowest
  19. Like
    gatesphere reacted to zeke in Stand alone programming software   
    Hi Guys,
     
    Recently, I had to find a stand alone program that would give me the ability to program an MSP. This is for the factory floor. They don't want to use CCS on the factory floor, for obvious reasons.
     
    In my search, I found others asking the same question.
     
    There is the Gang Programmer.
     
    Or, you can use the Launchpad in combination with Elpotronic's FET-Pro430-Lite.
     
    I think Elpotronic's program is perfect. Give it the hex file and it will program your MSP430 using any TI USB programmer. It's cool that you can use Spy Bi-Wire to program your devices.
     
    Hope you like it.
  20. Like
    gatesphere reacted to bokaltoft in ThinkGeek to give away broken stuff   
    I found this one and thought somebody (in the US) might be interested.
     
    http://thinkgeek.com/blog/2011/03/take-these-broken-things.html?cpg=tw
     
    /bo
  21. Like
    gatesphere reacted to wilywyrm in TLHY4205 Yellow indicator LED (1 cent each)   
    Don't know if this is a pricing error or not, but element14 has the cheapest 3mm yellow LEDs I've ever seen.
     
    No, they don't have different colors for the same price, and no, these aren't terribly bright, but you couldn't beat the price if you broke into a Hong Kong warehouse. I picked up 550 for less than a cent each when they had free shipping in November.
  22. Like
    gatesphere reacted to ender in Best information for those new to the MSP430?   
    To me ..
     
    These two have provided the best information so far:
     
    1. http://mspsci.blogspot.com/2010/07/tuto ... arted.html
    2. http://glitovsky.com/blog/?p=85
  23. Like
    gatesphere reacted to zeke in Addiction to buying parts   
    So, I'd like to bring to this topic a new entry for all of you that lust after electronic parts.
     
    I give you MDFLY.
     
    I just blew a wad of dough there. Excellent prices on SMD resistor kits and capacitor kits.
     
    Just check this out. It's a set of meter probes that let you measure SMD parts. How cool is that?!
     
    No one can touch them on what they offer. Not even Digikey.
     
    Okay, dealextreme could probably touch them but only because they're probably cousins or something.
  24. Like
    gatesphere reacted to ender in header files in CCS   
    That worked, thanks mate! and thanks Joby! for the project in the first place.
     
    For anyone trying to port this project to CCS, here's the full transformed code:
     

    #include "msp430G2211.h" #include #include #include /****************************************************/ #define SWITCH_BIT BIT3 // Launchpad switch on P1.3 #define LED_BIT BIT0 // Launchpad LED on P1.0 #define CAP_BIT BIT7 // RC circuit on P1.7 /****************************************************/ // WDT Timer providing a system tick #define TICKS_PER_SEC (1000/32) // Time to sample background noise level #define SAMPLING_PERIOD (TICKS_PER_SEC * 1) /****************************************************/ typedef enum { TRIGGER_RECALIBRATE, // start sampling background noise level TRIGGER_SAMPLING, // sampling background noise TRIGGER_RUNNING // running normally } state_t; static state_t state = TRIGGER_RECALIBRATE; // trigger state static uint32_t min_sample; // low noise value static uint32_t max_sample; // high noise value static uint32_t sampling_timeout; // tick counter for stopping sampling (SAMPLING_PERIOD) /****************************************************/ static volatile uint32_t sys_ticks = 0; // global tick counter static volatile uint32_t rc_discharge_time = 0; // last discharge time static volatile bool measuring = false; // is discharge being measured /****************************************************/ static void cpu_init(void) { // configure watchdog timer as 32ms interval timer IFG1 &=~WDTIFG; IE1 &=~WDTIE; WDTCTL = WDTPW + WDTHOLD; WDTCTL = WDT_MDLY_32; IE1 |= WDTIE; // configure system clock BCSCTL1 = CALBC1_1MHZ; // Set range DCOCTL = CALDCO_1MHZ; // SMCLK = DCO = 1MHz } // Watchdog interval timer #pragma vector = WDT_VECTOR __interrupt void WDT_ISR(void) { sys_ticks++; } // Port1 ISR #pragma vector = PORT1_VECTOR __interrupt void P1_ISR(void) { uint32_t tar = TAR; // store TAR as early as possible if((P1IFG & CAP_BIT) == CAP_BIT) // cap discharged { rc_discharge_time = tar - rc_discharge_time; measuring = false; P1IE &= ~CAP_BIT; // interrupt disable } else if((P1IFG & SWITCH_BIT) == SWITCH_BIT) // switch pressed { state = TRIGGER_RECALIBRATE; } P1IFG = 0x00; // clear interrupt flags } // wait a short time (for cap to charge) void wait(void) { volatile int i; for(i=0;i<32;i++); } // test if an RC discharge time looks like a trigger or not static bool isTrigger(uint32_t sample) { switch(state) { case TRIGGER_RECALIBRATE: // Sample background noise for SAMPLING_PERIOD sampling_timeout = sys_ticks + SAMPLING_PERIOD; min_sample = 0xFFFFFFFF; max_sample = 0x00000000; state = TRIGGER_SAMPLING; // DROP THROUGH case TRIGGER_SAMPLING: if (sample < min_sample) min_sample = sample-1; if (sample > max_sample) max_sample = sample+1; if (sys_ticks >= sampling_timeout) // sampling time over state = TRIGGER_RUNNING; break; case TRIGGER_RUNNING: if (sample < min_sample) state = TRIGGER_RECALIBRATE; // the environment has changed, recalibrate else { if (sample > max_sample) return true; } break; } return false; } // Begin measuring RC discharge time static void start_measuring(void) { measuring = true; // SMCLK continuous TACTL = TASSEL_2 | MC_2; TACCR0 = 0x00; // drive capacitor high, charge it up P1DIR |= CAP_BIT; P1OUT |= CAP_BIT; wait(); // wait for cap to charge // store start count TAR = 0; rc_discharge_time = TAR; // interrupt when capacitor drops below pin's "high" voltage P1IES |= CAP_BIT; // interrupt on hi to lo edge P1IE |= CAP_BIT; // interrupt enable // flip pin to input, capacitor will begin discharging P1DIR &= ~CAP_BIT; // set to input } int main(void) { uint32_t led_timer = 0; // timed latch for LED cpu_init(); // setup LED pins P1DIR |= LED_BIT; // All LED pins as outputs P1OUT &= ~LED_BIT; // Turn off LED // setup switch interrupt P1DIR &= ~SWITCH_BIT; // as input P1IES |= 0x01; // interrupt on falling edge P1IE |= SWITCH_BIT; // interrupt enable // start measuring discharge time start_measuring(); _BIS_SR(GIE); while(1) { if (!measuring) { // test discharge time to see if it looks like a trigger if (isTrigger(rc_discharge_time)) { P1OUT |= LED_BIT; // turn on LED led_timer = sys_ticks; // record current time } start_measuring(); // measure again } // if 0.5s has elapsed since trigger, turn off LED if (led_timer != 0 && sys_ticks > led_timer + (TICKS_PER_SEC/2)) { P1OUT &= ~LED_BIT; // turn off LED led_timer = 0; // clear timer } } }
  25. Like
    gatesphere reacted to RobG in 74HC4511 BCD problems   
    Sounds like pins 14 and 15 or 13 are shorted. Check your circuit, pull out the chip and measure resistance between them. That would explain half Vcc when g is high and other pin low.
    Also, in your original post you stated first that F is 1.8V but than later that it is 3.6V. So, which segments are missing when you display 4 and 6?
×
×
  • Create New...