Jump to content

bluehash

Administrators
  • Content Count

    7,290
  • Joined

  • Last visited

  • Days Won

    193

Reputation Activity

  1. Like
    bluehash got a reaction from mnpumar in You can Thank users now!   
    Hi All,
    43oh has a new feature, where you can "Thank" users if their posts have been helpful to you. You will see a tiny "Thumbs Up" sign on the top right of every post, except yours..as you can't thank yourself :mrgreen: .
     
    This also adds two fields to your profile. Hope you guys like it and make use of it.. Thank away!
  2. Like
    bluehash got a reaction from GeekDoc in Repurposing a Nokia adapter cable - Request for info   
    Try installing the PL2303 driver, maybe you'll get lucky.
     
    From: Mobildia Forums
  3. Like
    bluehash got a reaction from gatesphere in 43oh IRC is now #43oh   
    Hello Everyone,
     
    The IRC was first suggested by Mystboy. Since there was alot of interest for an IRC channel, we now have one. Check the main bar link "IRC".
     
    Its a bit color cluttered up there, but we'll fix it.
    Channel name is #43oh.
  4. Like
    bluehash got a reaction from jsolarski in IRC   
    ... and we have IRC. See Announcement
  5. Like
    bluehash reacted to MystBoy in IRC   
    I think a IRC is deffinitly missing!
    an irc would speed up discussions and is perfect for quick simple questions!
     
    I think 43oh is going to be a real grate cumunity portal in some time.
    I think its the right time for expanding it a bit!
     
    The forum has nearly 100 members
    ok only 20-30 of them are really active but it's not a bad ratio
    and some people are still reading the forum without registration.
     
    i beleave that new users will come here every day. TI has still problems to supply all the launchpads to people who ordered them.
     
    If you extend the headline of the page with IRC and maybe l8er my wiki and a user project section (also l8er) this will become a real cool board
     
    Think about it
  6. Like
    bluehash reacted to gatesphere in MSP430G2xxx Tea Timer   
    Here is my entry for the November 2010 Project of the Month Contest, an MSP430G2xxx based tea timer!
     
    I love tea, and thought this contest was an excellent reason to actually get off of my lazy behind and put this together.
     
    Below is my blog post on it, modified slightly to show the pictures and code here rather than just link to them as on my blog. Blog post is available here: http://blog.suspended-chord.info/?c=27
     
    Below this point is the post:
    ------------------------------------------------------
    Hello all,
     
    I am an avid tea drinker. As such, I make many cups of various kinds of tea, each with their own optimal steep times. Usually, I just keep track of the time, but I have found that I can make the best cup of tea by setting a timer to go off after a certain amount of time, depending on the style of tea that I am brewing. I find the best results come from going by the following table (based on personal preference and experimentation):
     
     
    Tea Variety => Recommended Steep Time
    White tea => 2 minutes
    Green tea => 3 minutes
    Black/Oolong tea => 4 minutes
    Herbal tea/infusions (most varieties) => 5 minutes
    Rooibos tea (African redbush) => 6 minutes
    Chai tea (regardless of base) => 8 minutes
    Kukicha twig tea and other varieties => in intervals of 1 minute
     
     
    With this in mind, I decided that I should make a tea timer. This seems simple enough, and it has been on my to-do list for a while anyway, and 43oh! is having an MSP430 Project of the Month Contest, so I decided to hack it together. Turned out rather simple.
     


    The full part count is as follows:
    [*:3snbat08] 3 toggle switches (or a 3-switch DIP, as I used)
    [*:3snbat08] 4 10k resistors
    [*:3snbat08] 1 5mm green LED
    [*:3snbat08] 1 piezo buzzer with integrated driver circuit
    [*:3snbat08] 1 tact switch/push button
    [*:3snbat08] wire
    [*:3snbat08] Any MSP430 uC with at least 1k flash and a TimerA module (though I could have hacked the WDT to work)
     
    So, I assembled the circuit on my breadboard, following the schematic at the end of my post, and programmed the MSP430.
     
    For the code, I borrowed beretta's TimerA code example, and tweaked it to fit the needs of my timer. The timer is to read the input value of the three switches as a binary value to determine tea type, set a "goal" amount of half-second ticks based upon the user's request, and when the user presses the "start" button, go into a waiting period. While the uC is waiting, the LED will be flashed slowly at first, but increasingly faster as the timer ticks closer to the goal. Once the goal amount of ticks has been reached, the LED will be turned on, and the buzzer will sound (mine sounds reminiscent of an old-fashioned tea kettle, so it's suitable). The buzzing can be stopped by pressing the "start" button again to reset the device, and allow another time to be set. Simple enough, right?
     
    The code is available:

    // MSP430 based Tea Timer // Sets off a buzzer to let you know when your tea is done steeping // Supports several types of tea // suspended-chord (http://blog.suspended-chord.info) /* Tea steeping chart Tea type Time DIP Code ------------------------------------------ White 2 minutes 000 Green 3 minutes 001 Black/Oolong 4 minutes 010 Herbal 5 minutes 011 Chai 8 minutes 100 Rooibos 6 minutes 101 Other 1 minute 110 Other 2 30 seconds 111 */ // circuit: // LED on P1.0 // Piezo buzzer with driver on P1.1 // 3-switch dip (or 3 toggle switches) on P1.4, P1.5, and P1.6 // push button tact on P1.3, pullup resistor //#define DEBUG #define __MSP430G2231__ #include // pin for status LED #define LED BIT0 // pin for buzzer #define BUZZER BIT1 // pin for start switch #define START BIT3 // three consecutive pins for mode selection #define INPUT1 BIT4 #define INPUT2 BIT5 #define INPUT3 BIT6 // numeric value of the first pin #define SHIFT 4 // unused bits #define UNUSED BIT2 + BIT7 // variables unsigned int goal = 0; unsigned int tickCount = 0; unsigned char statusCount = 0; char statusMode = 0; char mode = 0; char reset = 0; volatile unsigned int i = 0; void main() { while(1) { WDTCTL = WDTPW + WDTHOLD; // kill wdt P1OUT = 0; // clear outputs P1DIR = LED + BUZZER + UNUSED; // setup outputs and unused to out/low to reduce power consumption BCSCTL1 = CALBC1_1MHZ; // setup DCO DCOCTL = CALDCO_1MHZ; // setup TimerA TACCR0 = 62499; // .5s cycle with 1MHZ clk and /8 divider // delay a few cycles to debounce i = 0; while (i < 50000) i++; while ((P1IN & START) == START) { // keep setting mode until start switch is pressed // setup mode mode = (P1IN & (INPUT1 + INPUT2 + INPUT3)) >> SHIFT; // setup goal switch (mode) { case 0: // white tea goal = 240; // 2 minutes break; case 1: // green tea goal = 360; // 3 minutes break; case 2: // black/oolong tea goal = 480; // 4 minutes break; case 3: // herbal tea goal = 600; // 5 minutes break; case 4: // chai tea goal = 960; // 8 minutes break; case 5: // rooibos tea goal = 720; // 6 minutes break; case 6: // other goal = 120; // 1 minute break; case 7: // other2 goal = 60; // 30 seconds break; default: goal = 0; } } #ifdef DEBUG goal = 30; // 15 seconds #endif // reset the TAR, and finish setting up TimerA TACTL = TASSEL_2 + ID_3 + MC_1 + TACLR; // select SMCLK/8, up mode, and clear the TAR TACCTL0 = CCIE; // enable interrupts // enable interrupts _enable_interrupt(); // turn on LED P1OUT |= LED; // reset variables statusCount = statusMode = tickCount = reset = 0; // enter LPM1 //LPM1; while (reset == 0); } } // timerA interrupt for CCR0 #pragma vector = TIMERA0_VECTOR __interrupt void CCR0_ISR (void) { tickCount++; // increase tick count // toggle LED increasingly faster as the time counts towards the end statusCount++; if (tickCount >= goal/4) statusMode = 1; if (tickCount >= goal/2) statusMode = 2; if (tickCount >= 3*(goal/4)) statusMode = 3; switch (statusMode) { case 0: if (statusCount >= 4) { // blink every 2 seconds P1OUT ^= LED; // toggle LED statusCount = 0; } break; case 1: if (statusCount >= 3) { // blink every 1.5 seconds P1OUT ^= LED; // toggle LED statusCount = 0; } break; case 2: if (statusCount >= 2) { // blink every 1 second P1OUT ^= LED; // toggle LED statusCount = 0; } break; case 3: default: // blink every .5 second P1OUT ^= LED; // toggle LED statusCount = 0; break; } if (tickCount >= goal) { _disable_interrupt(); // kill interrupts TACCTL0 &= ~CCIE; // disable TimerA CCR0 interrupt //LPM1_EXIT; // exit LPM1 P1OUT |= LED + BUZZER; // buzzer + LED on while ((P1IN & START) == START); // if START pressed, return to main() reset = 1; } }
     
    Basically, as I stated above, the user selects a mode (tea type) by way of the three switches, and then presses a button to start the timer. When the tea is done steeping, the buzzer goes off, and the user can press the button again to reset it. The switch positions corresponding to the tea types are as follows:
     
    6, 5, and 4 refer to P1.6, P1.5, and P1.4
    6 5 4 Tea type (time)
    0 0 0 White Tea (2 minutes)
    0 0 1 Green Tea (3 minutes)
    0 1 0 Black/Oolong Tea (4 minutes)
    0 1 1 Herbal Tea/Infusions (5 minutes)
    1 0 0 Chai Tea (8 minutes)
    1 0 1 Rooibos Tea (6 minutes)
    1 1 0 Other1 (1 minute)
    1 1 1 Other2 (30 seconds)
     
     
    Now, this isn't the most accurate timer, as I'm not using the crystal, but it's accurate enough to steep a good cup of tea (believe me, I've used it a lot since I hacked it together), and my stopwatch tells me it's accurate to within around 6 seconds on average.
     
    In the future, I'd like to use a better input mechanism (I might be geeky enough to remember binary codes for tea types, but most are not, so a rotary switch or something would be perfect), maybe a cheap LCD for a status indicator, even showing how much time remains, and potentially having the last two codes (110 and 111) be user programmable for any time in second increments up to half of an unsigned long (as the ticks are half-second ticks). Maybe even shove it all into an Altoids tin for portability and the geek-chic factor. Who knows?
     
    Anyways, here's the schematic, and a photo of it in action:
     

    Tea-Timer in action! (notice the LaunchPad is only used as a power supply here... I don't have a battery clip yet.)
     

    schematic
     
    Thanks for reading!
     
    Keep tweaking~
     
    EDIT: I'm an idiot sometimes... I forgot the code and images.
  7. Like
    bluehash reacted to jsolarski in American Design style contest STM32   
    http://stm32challenge.net
     
    should be interesting
  8. Like
    bluehash reacted to GeekDoc in Weird CCS problem with #define   
    I knew I'd seen it somewhere... MSP430x2xx Family User Guide, section 10.2:
    -Doc
  9. Like
    bluehash reacted to simpleavr in Keeping Track of Time?   
    if it can be made perfect, there will be no need to calibrate. from the datasheet the MSP430G2231 has a typical accuracy of plus/minus 3%, at idea case it's plus/minus 0.5%. if u can keep constant voltage and constant temperature, it will be more accurate. even crystals have some drifts and for accuracy u can match capacitors or even oven control them (for temperature).
     
    no, but u can make it happen by entering various LPM modes, for more power saving (LPM3) you will need to use VLO (or 32Khz crystal) as the DCO is also shut down.
    if u really want to showcase this, u can
    . inside the while loop, go to sleep LPM?, etc.
    . inside your timer interrupt do _BIC_SR_IRQ(LPM?_bits) to exit LPM when u got a second tick (actually u could remove the "second_passed" flag in this case as system would be asleep unless it passes a second.
    . you should use clock divider (divide by 8 at most) so that the system gets fewer interrupts and thus further power save.
    . i had made the quick example simple so that it's easy to understand. and if u can gain by showcasing more features in your project you should implement them (clock dividing, power saving, etc) once the basics is going OK.
     
    if an interrupt occurs, your processing will be suspended after the interrupts have been served. for multiple interrupts at the same time, there is also a defined priority list based on interrupt types (u can find them in datasheet).
    typically inside your interrupt routine u should disable further interrupts to avoid race conditions / re-entrance problems.
    and u should disable them during your critical processing (trigger slaves, etc).
    in this case we need the interrupts on all times to keep the time right and the logic processing is not that critical (triggering the slave is still safe if interrupted). but u surely can experiment w/ them, or showcase such consideration in your code.
    it won't happen, or u have to make it not happen, if your core logic requires that much cycles (like 1million cycles), u should revise them. (or setup to run faster).
     
    another note, if u implement LPM u may want to check the datasheet as there may be delays here and there when some MCU features are brought back from sleep, these may affects accuracy.
  10. Like
    bluehash reacted to GeekDoc in Self-Powered Breadboard Setup   
    I wanted a neater way to do some breadboarding at my desk, so I built an enclosure with batteries and two power supplies and mounted some breadboards to it.
     

    Click the photo to see the build on my blog.
     
    -Doc
  11. Like
    bluehash got a reaction from teoah in Weird CCS problem with #define   
    Similar to what gatesphere said.
     
    In
    http://focus.ti.com/lit/ug/slau144e/slau144e.pdf, pg 380

    WDTCNTCL Bit 3 Watchdog timer+ counter clear. Setting WDTCNTCL = 1 clears the count value to 0000h. WDTCNTCL is automatically reset. 0 No action 1 WDTCNT = 0000h
     
    You can reset the watchdog by:

    WDTCTL |= WDTCNTCL
    Well, You have to tell the controller how you wish to use the pin. If you want to connect it to an LED, you configure it as an output. If you connect a switch to the pin, you need to configure it as an input. Its not going to work if you connect an LED to the pin, and its configured as an input.
    You configure a pin in one step at the start of the program. This allows the controller to change its internal gate structure to accept a signal(input) or apply a signal(output):
    Set the direction ( input or output ) of the pin in the direction register. An example of an output pin:
    P1DIR |= BIT0
     
    Now then, in your main program you may read or write to the pin. An example of writing to the pin:
    P1OUT |= BIT0;
  12. Like
    bluehash reacted to MystBoy in msp430Launchpad absolut beginner wiki   
    As mentioned in my "New users say Hi!" post I have the goal to create a wiki for real beginners...
    let's say the target groupe is a 14yo Boy who wants to start with microcontrollers and chooses the launchpad instead of an adruino.
     
    the wiki should be simmilar to the PAlib wiki:
    http://www.palib-dev.com/wiki/doku.php
     
    I have started to make a short overview of the wiki here:
    https://docs.google.com/document/d/1tQd ... edit?hl=en
     
    i'm looking for people who can help me with this project.
    the more people we are the faster it will be finished.
     
    i will set up the wiki @ my webspace todday in the evening and i will start creating the categories.
    the url will be: msp430.oxois.org
     
    the final wiki should be available in several languages (i think of english german maybe french)...
     
    if you want to help me or you have some own tutorials or content you want to contribute to the wiki please let me know!
     
    @ gerry:
    it would be cool to make this wiki part of four-three-oh!
     
    EDIT:
    jsolarski has some tutorials to use in the wiki THX!
  13. Like
    bluehash reacted to simpleavr in Keeping Track of Time?   
    the time keeping is the least thing u should worry about, i would worry about how to put the circuit together on a breadboard.
     
    here is the code needed to keep a no-so-accurate time (may be off a few minutes a day)
     
    it's taken and modified from the ti 2xx examples (slac080h.zip i think) msp430x20x3_ta_02.c
     
    i tried it on a EZ430 dongle and it's working as expected. i build w/ msg430-gcc but it should built under windows w/ CCS also.
     
    . use SMCLK at 1Mhz as based
    . use calibrated value for clock to maximize accuracy.
    . count to 50,000 to get a timer interrupt (20 times/sec)
    . another counter counts the clicks to 20 and resets it (we got one second here)
    . update a system 'clock' (ticks), this contains the seconds since midnight
    . also update a flag so that your main loop got signal to do something (advance slave digit counters?)
    . u need to add your own logic to get seconds, hours, etc by deriving them from the 'clock' ticks.
     
     

    // use timer_a to generate one second ticks // built with msg430-gcc, flash w/ mspdebug // #ifdef MSP430 #include "signal.h" #endif #include volatile unsigned char second_passed=0; // advance indicator volatile unsigned long ticks=0; // 'clock' in seconds void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT BCSCTL1 = CALBC1_1MHZ; // Set DCO to 1MHz factory calibration value DCOCTL = CALDCO_1MHZ; P1DIR |= 0x01; // P1.0 output CCTL0 = CCIE; // CCR0 interrupt enabled CCR0 = 50000; TACTL = TASSEL_2 + MC_1; // SMCLK, upmode _BIS_SR(GIE); // enable interrupt while (1) { if (second_passed) { //____ do something w/ ticks // ? trigger via io slave MCUs etc second_passed = 0; }//if }//while //_BIS_SR(LPM0_bits + GIE); // Enter LPM0 w/ interrupt } // Timer A0 interrupt service routine #ifdef MSP430 interrupt(TIMERA0_VECTOR) Timer_A(void) #else #pragma vector=TIMERA0_VECTOR __interrupt void Timer_A (void) #endif { static unsigned int clicks=0; // we will get called at 1Mhz/50k = 20 times a seconds clicks++; if (clicks >= 20) { clicks = 0; ticks++; // advance clock for each second second_passed = 1; // have a flag to tell back main loop }//if // the followng can be a HHMM colon seperator led // take them out if not needed if (clicks >= 10) P1OUT |= 0x01; // half second on else P1OUT &= ~0x01; // half second off //P1OUT ^= 0x01; // Toggle P1.0 }
     
    if you are not to solder, i think u will need a very big breadboard or several smaller ones. either way, it will be bad hair day w/ all the jumpers (and almost impossible to debug).
     
    the design of using single leds will make it almost impossible to do a proper layout, also w/ some segment have 2/3 leds in series will requires u to have different resistor values (or different refresh rates if u do not use resistors).
     
    if u can replace them w/ 7-segment LEDs you will save yourself a lot of trouble.
     
    [EDIT] just noticed i forgot to enable interrupt (but it did worked anyway)
  14. Like
    bluehash got a reaction from teoah in Weird CCS problem with #define   
    Wow! tons of replies. Lots to learn.
    Like you said, put it in a loop. Or if your running off a hardware timer, slow it down.
     
    You kind of explained how a watchdog works. You set up the watchdog,so that your program tickles(or pets aka set a bit) before your watchdog timer expires and resets the chip. If your program runs correctly, it will always "tickle" the watchdog...but if it crashes, it will stop setting the watchdog bit..which will reset the chip.
     
    The Volatile keyword lets the compiler know that the variable is HANDS-OFF from optimization. Its normally used when declaring register mapped to a hardware register. For eg: If variable outPort writes to the P1OUT register, it must be declared as volatile.
    volatile int16_t outPort;
    For eg: If you write the following without the volatile keyword

    outPort = 0xA5 for(i=0;i P1OUT = outPort ;
     
    Sometimes the compiler is clever enough to know that P1OUT is set only once in the loop and will set P1OUT in the first iteration and not everytime. Hope this helps.
     
     
    Did not quite get you there. You mean writing to pins? There is also a direction register, if that's confusing you.
     
    Buzz back if anything is unclear.
  15. Like
    bluehash reacted to paradug in 32k crystal install and test   
    You might find this instructable step informative with regards to the 32k crystal.
    http://www.instructables.com/id/MSP430-Based-Chronulator-using-Launchpad-chip/step11/Determining-the-32768-kHz-Crystals-load-Capacita/
     
    It explains why the crystal's load capacitance needs to be right. It also gives a way that you can check if you have a freq. meter.
  16. Like
    bluehash got a reaction from teoah in Weird CCS problem with #define   
    A few errors, but no worries,I'll walk you through. Before I go ahead,welcome to the Forums!
     
    Do not use ";" for defines, so get rid of those. Your project will compile fine after you do that.
     
    Always use parenthesis when you are evaluating more that one math expressions. Its proper technique and will save quite a few headaches later on. This is not an error, but good coding practice.
     
    So the above line will become:

    P1DIR |= (LEDRED + LEDGREEN);
     
    Next point:
    You are trying to turn both LEDs on. What you are doing is bit manipulation. You actually "or"the two fields not "+"
    So your line now becomes:

    P1DIR |= (LEDRED | LEDGREEN);
     
    Do this to the rest of your code. Your corrected file is below:

    #include "msp430g2231.h" #define LEDRED BIT0 #define LEDGREEN BIT6 #define DELAY (0xFFFF) void main(void) { WDTCTL = ( WDTPW | WDTHOLD ); // Stop watchdog timer P1DIR |= ( LEDRED | LEDGREEN ); // Set P1.0 to output direction P1OUT &= ~( LEDRED | LEDGREEN ); // Turn off LED while (1) { P1OUT ^= ( LEDRED + LEDGREEN ); // Toggle LED volatile unsigned int i = DELAY; // Delay while (i != 0) i--; } }
     
    If this works out for you, let us know. Any more questions,feel free to ask.
  17. Like
    bluehash reacted to simpleavr in Launchpad rfm12b rf spectrum analyzer   
    this is my entry to the Nov-2010 project contest, in this thread http://www.43oh.com/forum/viewtopic.php?p=1148#p1148
     

     
    brief description
    this is a simple rf spectrum analyzer project based on TI Launchpad. i have been working on other rf transceiver projects and in need of a simple rf spectrum analyzer to help me visualize what's happening.
     
    a RFM12B module is used to capture signal strengths of different frequencies. the RFM12B utilizes a SPI interface to communicate to a MCU. a software SPI is implemented in this project for simplicity.
     
    the Launchpad firmware basically received commands from the PC side perl script to start sampling for signal strengths, the frequency and signal strength are then sent to a host application (written in perl) for visualization. there is a threshold in the firmware that prohibits data sending if the signal strength is below it. this is needed as the LaunchPad can only do 9600bps communicating w/ the PC and if we include all the zeros and noises for sending, the uart is not able to catch-up.
     
    on the PC side, the perl script will send a "start" command during start-up. it then reads data from the Launchpad, continuously updating the display grid to show "near" real-time results. there are some other settings on the perl script that affects the visualization and is described separately.
     
    although the RFM12B module i used is tuned for 915Mhz, i am able to get signal strengths (may not be optimized) from the 433Mhz and 868Mhz bands.
     
    thank you in advance for any comments, suggestions, etc.
     
    http://www.simpleavr.com/msp430-project ... m-analyzer
  18. Like
    bluehash got a reaction from GeekDoc in HD44780-based LCD - cursor problem   
    Hi geekdoc, I know you work on this when you get time... but here is another reference project I found.
  19. Like
    bluehash reacted to cde in LCD-I2C For HD44780 LCDs and PCF8574 Expanders   
    Soo, I got busy. Tested the lcd out with my i2c explorer, and then coded up a i2c based lcd controller. It works well enough to initialize and write to an lcd, even commands. At this point, it just runs a test, and that's it. Will be trying to add a RX uart soon (since the biggest code hog was the i2c read routine [i2c.c was about 1k in i2c-explorer] it should fit fine), but it is all setup for 4bit lcd control, and separate functions for lcd commands and lcd data. Two port pins on the expander are still free, and could be used for a larger lcd with 2 enable pins, or reseting the lcd (with a pnp? needs some testing to figure out how to force it to hardware reset) or the same for the led backlight (5v, nearly 300ma from what I read. Could use an extra resistor and/or npn for control.). But you can't do all three from the i2c expander (6 used, 2 free). But the launchpad still has 4 free gpio (5 if you dont need RX)
     
    Did add a small bit of debug tool to it. The expander_write function will turn on led1, go into a while loop, then send the actual data. If the i2c system does not receive an ACK, it will keep looping, trying to send the data again and again, and will keep the led on until a ack is received. So this serves two purposes. If you see the led on for an extended period of time, something is up (It really shouldn't even be fast enough for you to see. i2c is running at a [snail-worthy] 8khz, and 8 bits at a time...), and it allows for some form of error-prevention (Some i2c devices will ignore extra read/write commands when processing internal data, so retrying until it responds is standard procedure).
     
    Allows you to control a HD44780 compatible LCD through a simple I2C Port Expander.
    Tested on DV-16100-S1FBLY LCD (16x1 lcd, 2 Lines of 8 Characters at a time [Weaksauce, sure, but free. Will test a 40x4 lcd after RX works.])
    Used with a TI PCF8574(A for alternative slave addresses) 8bit port expander. No special setup needed for this Port Expander. Others need you to write a port address, and possible setup as outputs.
    Created for a MSP430G2231. ~900 bytes of code, so can fit on smaller ones. Created on IAR Kickstart.
     
    Displays "cde 43oh" on Line 1, " ^___^ " on Line 2.
     

     
    I2C control based on my own work.
     
    Based on work by Michael Bok of http://www.nighsoft.com found at:
    http://forum.sparkfun.com/viewtopic.php?t=13656
    http://hestia.nighsoft.net/files/L1682_MSP430_code.zip
    He wrote up a direct gpio to lcd program for the comparable msp430f2012.
    lcd-i2c.zip
  20. Like
    bluehash got a reaction from GeekDoc in [ ENDED ] Nov 2010 - 43oh Project of the Month Contest   
    Entry to the November 2010 contest is open. This is an opportunity for you to show off what you can do with the MSP430. The 43oh community forum has been growing both with good discussions and members. The project section of the forum as well as the Blog has a lot of project ideas you can base your submission on. Feel free to ask questions about the project on the forum.
     

     
    Now for the prize:
    Winner : [T]exas Instruments has stepped in to sponsor this month's project with a TI Chronos Watch kit. Thank you for the kit TI!
    Runner up : [G]eekdoc has been kind enough to donate a pristine unopened Launchpad kit. Although you may already have one, having another Launchpad can be quite handy like a project you may not want to take apart or recreate [J]oby's SPI Ninja. Thanks Geekdoc for sponsoring this month's contest giveaway.
     
    To submit your entry, make an entry into this thread with the following:
    1 - A small description of your project.
    2 - A picture or video of your setup
    3 - Code.
    4 - Schematic(rough/hand drawn is fine as long its legible)
     
    About judging the winner : A week before the contest ends, a poll will be created with all the project entries. Only members of the forum will be allowed to vote.
     
    A few simple rules to follow:
    - You must be a member of the 43oh forum at least a week before your submission.
    - One entry from each member will be permitted.
    - Your project can be anything based around the MSP430. You may interface the MSP430 to another controller.
    - You may reuse code from anywhere as long as you give credit to the original author.
    - Be REASONABLE, Be CREATIVE.
     
    Enjoy yourselves!
  21. Like
    bluehash reacted to GeekDoc in Contest - 43oh Project Of The Month   
    It is my honor and pleasure. This forum has given a lot to me.
     
    ...and, I hope to get some fun ideas from this contest!
     
    -Doc
  22. Like
    bluehash reacted to GeekDoc in Interesting project and comparison to AVR chip   
    Found this interesting blog post. Sorry, it's on another site. Sorry, bluehash. :?
     
    He uses the internal temp sensor and a phototransistor to monitor his 'fridge. The whole thing communicates over a Blue SMiRF modem!
     
    He goes on to make a very fair comparison against a comparable AVR model. Worth a look.
  23. Like
    bluehash reacted to cde in LCD-I2C For HD44780 LCDs and PCF8574 Expanders   
    Update (already?). Made it a bit more flashy (Literally ). Changed the delay based on if it is a command instruction, or a data instruction. This makes filling the LCD have a very small delay (2 seconds, maybe 4?) but keeps the commands at a longer delay (makes scrolling look nicer). This essentially turns LED1 into a activity light, with a noticeable flashing to it during repeated Command instructions, and a solid on during repeated data instructions. It still serves debugging purposes, because if its solid on for an extended time, something is up (Like pulling out the i2c cable).
     
    But most importantly, I implemented it. With some creative memory offsetting, I turned my essentially 8x2 on a single line, into a 16x1. It will init the lcd, write the first 8 chars of Line 1 (The visible 8 out of 40 memory locations), jump to line 2, write all 40 spots, offset by 8 (Visible 8 spots of line 2 are chars 9-16 of the string), then using the lcd's auto-incrementing (Line 1, char 40 jumps to Line 2, char 1, and vice-versa) re-writes all 40 chars to line 1.
     
    Clocks in at ~950 bytes (850 code, + Constants + Variables), so can still fit on smaller ones. Not sure if this can make use of the msp430's low power mode, as it needs to constantly send the shifting command instruction.
     
    Flash video of the lcd, from init, to scrolling.
    Flash video of the lcd, from init, to scrolling.
     
    Sets up the LCD, writes "cde 430h.com ^__^ LCD-I2C + MSP430G2231 " on each line (Offset by 8 on line 2), and scrolls to the left indefinitely.
    lcd-i2c v1.5.zip
  24. Like
    bluehash reacted to cde in Choosing a MSP430 chip   
    Found this nice brochure on TI's site.
     
    http://focus.ti.com/lit/sg/slab034s/slab034s.pdf
     
    A complete breakdown of the various msp430 chips, what peripherals they has, and what those peripherals do as well as explaining the different LPM Modes. Well, except for the most important question to us, SBW capability.
     
    Interesting to note, there is quite a bit of overlapping of the MSP430G line and the MSP430F20xx line. Basically, all of the basic options (Different type of ADC on 2 parts is the only difference), except that the Valueline chips are just cheaper (And apparently, use less power too). I expect the F20xx line to be obsoleted eventually in favor of the ValueLine chips.
    Edit: The F20xx line can come in better temperature rating -40 to 105c, vs -40 to 85c)
     
    Aside from the MSP430G and F20xx lines which come in nice PDIP and SOIC packages, there is the MSP430F21x1 Line. Also comes in SOIC, has more gpio/flash/ram than the Gxx or F20xx lines, but no hardware UART/SPI/I2C or good ADC, but worst of all, NO SPY-BI-WIRE, ie, no launchpad/ez430 support. Avoid the MSP430F21x1 Line of chips unless you want to buy a new programmer. For the same reason, avoid the entire MSP430F1xxx Family.
     
    The next step above the Gxx and F20xx line that we can use is the MSP430F21x2 line. It's like doubling a Gxxx chip. More Flash, More Ram, More GPIO, More Timer Comparators, double the Hardware Interfaces, at about three times the cost haha (1.55 in 1k volume vs the 0.52 in 1k for the G2231). They come in the smallest hobbyist friendly package, 28-TSSOP, and are SBW compatible.
     
    The final line I will talk about is the MSP430F22xx line. They are basically bigger badder versions of the F21x2 line (More Ram/Flash/GPIO/Timers and a 12ch vs 10ch ADC). The F22x4 version has an a pair of opamps built in compared to the F22x2 line (20 cents more) but otherwise the same thing. The thing is that they come in a 38 pin TSSOP package. 28 pin TSSOP is the highest that I have seen in affordable dip breakout packages, so this is probably the limit for the general hobbyist unless you will etch/order custom pcbs. SBW compatible. The highest end version F227x has 32kbits of Flash, which is beyond CCS's 16kb limit. The Lower end F223x has 8kb flash, which is beyond IAR's 4kb limit. Which means you can still use them in CCS or IAR, but only up to the code limit, but you'd be paying more for using less (Unless you need to Opamps). MSPGCC has no limit.
     
    There are other SBW chips, but they are in insanely small pin packages and I won't bother going through the datasheets. As well, the planned 20pin DIP chips should be SBW and Launchpad compatible as well.
     
    Hopefully TI adds SBW as a searchable parameter for their search tool soon/eventually.
     
    TLDR:
    Launchpad/EX430 compatible lines:
    G2xxx 14-DIP/SOIC (Valueline/Launchpad Standard)
    F20xx 14-DIP/SOIC (But unless you have a bargain, the G2xxx line is cheaper/better imho)
    F21x2 28-TSSOP (2 or 3 times as good as Valueline) IAR can only use half of the highet chip's flash.
    F22xx 38-TSSOP (3 or 4 times better than Valueline) CCS can only use half of the highest chip's flash. IAR can only use half/a fourth/an eighth of the flash on the F223x/F225x/F227x respectfully.
  25. Like
    bluehash reacted to cde in Launchpad Easy Breadboarding Trick   
    Just a follow-up. Finally sat down and soldered the sockets on. Easiest way that I could think of to make sure the sockets where nice and level (and straight) was to mount the sockets on a header on a breadboard. Since I didn't have one wide enough, I used two. And it also made it easier than using a helping hands holder.
     

     
    Flux helped alot. How do people solder or desolder/fix things with 15w irons anyway? The solder won't remelt a second time, and I suck at using desoldering braided wire.
     
    Anyway, the real follow-up is this. Made a small jumper from a 4 pin header, that brings p2.7 to p2.4 and p2.6 to p2.5. I used a pair of wire cutters at the very edge of the lead, enough to snip it without cutting it off completely. This let me bend it across to the next lead. This pair is for p2.6 to p2.5. Even with the extended lead header I had, I couldn't do the same to the top, so I took an extra header pin, and using a helping hands holder, positioned it on top. After soldering the pins together, clipped the excess on either side.
     

     
    Optionally, you can throw some heatshink on it.

    Only had yellow in that size. Yuck. Will either replace with black eventually (or launchpad red), or just leave it uncovered.
×
×
  • Create New...