Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Reputation Activity

  1. Like
    GeekDoc got a reaction from YanuarPrijadi in Eagle parts for MSP430G22xx   
    Here's an EagleCAD library for the 14-pin DIP value-line chips (probably good for any 14-pin DIP MSP430). I just corrected/modified the one bluehash posted from Enrico (his package design was too narrow [so to speak]).
    There is only the one part, with two package variants: oval pads and round pads. Hope this helps someone.
    (Seems odd to zip a 6KB file, but system won't tale a ".lbr" file. :? )
  2. Like
    GeekDoc reacted to bluehash in Binary msg box with a MSP430G2101 on LPM4   
    I dont have eagle at work. Enrico had mailed me over a month back with his MSP430 Value Line Series Eagle Library. I've yet to publish it.
    I'm unsure if it does have footprints, but you could check and report back. Attaching here as a backup.
  3. Like
    GeekDoc got a reaction from gatesphere in NXP Embed Design Challenge - Free LPC1768 kit   
    Was playing with my mbed board today... Pretty easy to grab a library and whip something up. Got it running my LCD in 4-bit mode using an existing library in about 10 minutes (including wiring on breadboard).
    The mbed would be good for embedding in a one-off project. With the ethernet, two serial, and USB connections, I'm thinking a web-enabled home automation project.
  4. Like
    GeekDoc got a reaction from NJC in MSP430 LaunchPad, basic uart   
    sloso: Welcome again!
    UART can be done in software. NJC has been the leader in implementing this. Check for UART posts in these forums (search for "UART"), and see NJC's blog at http://www.msp430launchpad.com/ . You should have no trouble adapting the code, NJC's really good at commenting.
  5. Like
    GeekDoc got a reaction from NatureTM in MSP430 LaunchPad, 74HC595, 16 LEDs   
    Looks like EagleCAD. The free version is quite useful (get the SparkFun parts library!). The only limits are the PCB size and layers (2), which are fine for almost anything you will want.
    If you end up sending your design for professional boards, I recommend dorkbotPDX. Great price, and awesome quality. Also, he'll take your Eagle file, so you don't have to produce individual Gerber files.
  6. Like
    GeekDoc got a reaction from NJC in We are growing!   
    WOOT! NJC's back!
  7. Like
    GeekDoc reacted to simpleavr in Value Line series easy DCO setting library   
    it was the crystal all along.
    the c example msp430x20xx_dco_flashcal.c (from slau80) has been working all right.
    i finally solder a 32khz crystal onto my launchpad, result became better but still give inconsistent result, result looks ok, but if i run the calibration continuously for a few times, they are always off a bit.
    i then remove and solder the ti supplied crystal and i can get very good results.
    . i don't need to tweak the code for tolerance on expected values as before.
    . i get consistent results if i run it many times in a row.
    . and the time to get it calibrated is like what NatureTM found from the assembler code, < 5 secs.
    so it's reliable to use this. for CCS/IAR users, u may need to add the missing range pointers via an include file, like what NatureTM suggested. mspgcc users already have them as we are just treating the G2231 as a F2012.
    if u had more than one launchpad, u can make one of them as a calibration stations, and solder in the ti supplied crystal and use it to calibrated all your chips. you should do it in the normal environment (temperature) that your project will run, as crystals are affected by temperatures.
    i had, though, no idea why my hello-kitty watch crystal did not work w/ the device. they work well on the toy. :? . could be the capacitor matching is not for the average clock crystal. anyway i am not going to try and find out.
  8. Like
    GeekDoc reacted to d.keenan in Adding structured control flow to any assembler   
    If your assembler doesn't already have structured control-flow, e.g. _IF _ELSE _ENDIF _UNTIL _WHILE etc (not to be confused with conditional assembly)
    then here's how to add it yourself for free, without needing access to the assembler's source code.
    Structured control-flow eliminates the need for most explicit jumps, and the labels they jump to, and thereby makes your code more readable and maintainable.
    -- Dave Keenan
  9. Like
    GeekDoc reacted to bluehash in Grace, the graphical code generator for MSP430 CCS   
    I found it:
    When you are creating a new project, after the project settings - You will find it in Project Templates. Kind of hidden within layers.

  10. Like
    GeekDoc reacted to bluehash in Grace, the graphical code generator for MSP430 CCS   
    Did you guys see this:
    http://focus.ti.com/general/docs/video/ ... grace_em_v
    * GUI-based configuration tool for setting up ADCs, OpAmps, Timers, Clocks, GPIO, Comparators, Serial Communication, and other MSP430 peripherals.
    * Generates easy-to-understand C code that properly configures your device
    * Supports all MSP430 Value Line devices (MSP430G2xx) and select F2xx devices
    * Compatible with LaunchPad and most eZ430 tools
    * Grace tooltips offer helpful popups and hints for properly configuring your MSP430 device
    * Grace provides a Basic, Power User, and Register-level view offering different levels of abstraction for setting up your peripherals.
    * As a free CCS plug-in, Grace seamlessly integrates into the MSP430 tool chain and development process
    * Minimizes any configuration conflicts or collisions between multiple peripherals

  11. Like
    GeekDoc reacted to simpleavr in 9V Battery Use on LaunchPad   
    2n3904 would be right at the limit at 200ma, we should get the 2n4401 (rated at 600ma) or 2n2222 (at 500ma), usually u would want to stay at 50% of the rated limit to be on the safe side.

    // MSP430F20xx // --------------- +9V // /|\| XIN| | // | | | | // --|RST XOUT| o // | | connect to strobe // | | o // | | | // | | |/ // | P1.1|--[ Rb ]----| // | | |> // | | | // | | | // | | Gnd
    the strobe and the battery is both 9v so i think we don't need resistor to make a drop
    assuming hFe for the transistor is 100 (typical), and u want 200ma on the strobe, then u will want 2ma to drive the transistor base.
    the voltage output from the port pin should be say 3v and voltage between c and e Vce is 0.7v typical, that's 2.3v
    so Rb would be (3v - 0.7v) / 0.002 = 1150ohm (1.2k resistor will do).
    that's my guesstimate...
  12. Like
    GeekDoc reacted to bluehash in We are growing!   
    Hello Everyone,
    We owe this update to you, since you guys are the main drivers of this portal, submitting and discussing the MSP430 and everything else. We would also like to thank our sponsors - Texas Instruments for the TI Chronos watch and Geekdoc for the Launchpad
    1. The 43oh blog received ~16000 pageviews this month and has steadily grown. We get around 400 pageviews a day, still small but a big jump from last month.(~9000)

    2. The forum received ~26000 pageviews this month. The good part of the board is that we have a steadily growing Projects section with code and schematics. This helps new users to use them as reference projects and ramp up quickly.

    3. We added ~100 forum members this month to the board. We are now at 120 members.
    4. We were also surprised to get six good projects for the Project of the Month. All six were were submitted with code and related material. Thanks and keep building.
    5. This month's project will hopefully be announced by the 5th of Dec. We are in the process of arranging the prize.
    6. Big thanks to jbremnant who donated 5 Launchpads for future contests.
    All in all, a big thank you!
  13. Like
    GeekDoc reacted to NatureTM in Flashing the missing DCO calibration constants   
    EDIT: Here's another really nice DCO calibration program. It's part of TinyOS-msp430. http://code.google.com/p/tinyos-msp430/ It's the file called calibrate-dco. As gordon, who discovered it said, "[it] appears to be a quite beefed-up DCO calibration app, with goodies on the side (taking silicon errata into account for various devices when calibrating)." It looks like it's built to be solid and reliable. I skimmed over the code and didn't see anything for calculating SegA checksum, but that usually isn't an issue for most non-critical applications.
    EDIT: maxpenna shared another version of the DCO calibration program. This is the one to use if you need a correct SegmentA checksum. It uses the C calibration function. You can get it here http://www.43oh.com/forum/download/file.php?id=292
    WARNING: Some of the programs in this thread will erase Segment A and only put back the DCO calibrations. They should not be used with chips that have an ADC12, as this process will destroy the ADC12 calibrations. Some of the programs do not calculate the Segment A checksum, so the integrity of Segment A cannot be verified during runtime after calibration. Still, I've been using it without any problems.
    There's been a bit of a discussion in another thread about an idea simpleavr had for adding the dco calibration constants to flash for the Value Line series. I've cobbled together some pieces of TI code and have it working. It seems to work great. Here's how I did it with CCS. I think the people on linux should be able to reproduce the result with a little adaptation.
    This requires the TI DCO library I modified in another thread and an external LF crystal like the one with Launchpad.
    First, run this to calibrate the constants and write them to flash:
    EDIT: 43oh member zeke has made some changes to the code for finer tuning. Check page 2 for his code.

    //****************************************************************************** // MSP430F20xx Demo - DCO Calibration Constants Programmer // // NOTE: THIS CODE REPLACES THE TI FACTORY-PROGRAMMED DCO CALIBRATION // CONSTANTS LOCATED IN INFOA WITH NEW VALUES. USE ONLY IF THE ORIGINAL // CONSTANTS ACCIDENTALLY GOT CORRUPTED OR ERASED. // // Description: This code re-programs the F2xx DCO calibration constants. // A software FLL mechanism is used to set the DCO based on an external // 32kHz reference clock. After each calibration, the values from the // clock system are read out and stored in a temporary variable. The final // frequency the DCO is set to is 1MHz, and this frequency is also used // during Flash programming of the constants. The program end is indicated // by the blinking LED. // ACLK = LFXT1/8 = 32768/8, MCLK = SMCLK = target DCO // //* External watch crystal installed on XIN XOUT is required for ACLK *// // // MSP430F20xx // --------------- // /|\| XIN|- // | | | 32kHz // --|RST XOUT|- // | | // | P1.0|--> LED // | P1.4|--> SMLCK = target DCO // // A. Dannenberg // Texas Instruments Inc. // May 2007 // Built with CCE Version: 3.2.0 and IAR Embedded Workbench Version: 3.42A //****************************************************************************** #include "msp430x20x1.h" #include "DCO_Library.h" unsigned char CAL_DATA[8]; // Temp. storage for constants volatile unsigned int i; int j; char *Flash_ptrA; // Segment A pointer void Set_DCO(unsigned int setting); void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT for (i = 0; i < 0xfffe; i++); // Delay for XTAL stabilization P1OUT = 0x01; // Red LED on P1SEL = 0x10; // P1.4 SMCLK output P1DIR = 0x51; // P1.0,4,6 output j = 0; // Reset pointer Set_DCO(TI_DCO_16MHZ); // Set DCO and obtain constants CAL_DATA[j++] = DCOCTL; CAL_DATA[j++] = BCSCTL1; Set_DCO(TI_DCO_12MHZ); // Set DCO and obtain constants CAL_DATA[j++] = DCOCTL; CAL_DATA[j++] = BCSCTL1; Set_DCO(TI_DCO_8MHZ); // Set DCO and obtain constants CAL_DATA[j++] = DCOCTL; CAL_DATA[j++] = BCSCTL1; Set_DCO(TI_DCO_1MHZ); // Set DCO and obtain constants CAL_DATA[j++] = DCOCTL; CAL_DATA[j++] = BCSCTL1; Flash_ptrA = (char *)0x10C0; // Point to beginning of seg A FCTL2 = FWKEY + FSSEL0 + FN1; // MCLK/3 for Flash Timing Generator FCTL1 = FWKEY + ERASE; // Set Erase bit FCTL3 = FWKEY + LOCKA; // Clear LOCK & LOCKA bits *Flash_ptrA = 0x00; // Dummy write to erase Flash seg A FCTL1 = FWKEY + WRT; // Set WRT bit for write operation Flash_ptrA = (char *)0x10F8; // Point to beginning of cal consts for (j = 0; j < 8; j++) *Flash_ptrA++ = CAL_DATA[j]; // re-flash DCO calibration data FCTL1 = FWKEY; // Clear WRT bit FCTL3 = FWKEY + LOCKA + LOCK; // Set LOCK & LOCKA bit P1OUT = 0; while (1) { P1OUT ^= BIT6; // Toggle green LED for (i = 0; i < 0x4000; i++); // SW Delay } } void Set_DCO(unsigned int setting){ volatile unsigned int I; // P1DIR |= BIT0; // P1.0 output BCSCTL1 &= ~XTS; // external source is LF; BCSCTL3 &= ~(LFXT1S0 + LFXT1S1); // watch crystal mode BCSCTL3 |= XCAP0 + XCAP1; // ~12.5 pf cap on the watch crystal as recommended for( I = 0; I < 0xFFFF; I++){} // delay for ACLK startup if(TI_SetDCO(setting) == TI_DCO_NO_ERROR) // if setting the clock was successful, P1OUT |= BIT0; // bring P1.0 high (Launchpad red LED) else while(1); // trap if setting the clock isn't successful }
    The green light should start blinking in a few seconds, indicating success. Now we need to modify some linker and header files so CCS knows about the new calibrations.
    I'm using the MSP430G2231, so I duplicated the file C:\Program Files (x86)\Texas Instruments\ccsv4\msp430\include\msp430g2231.cmd in that directory, and renamed the duplicate as msp430g2231_mod.cmd. Now I can edit it without affecting the original. Edit msp430g2231_mod.cmd and change the calibration section at the bottom to this:

    /************************************************************ * Calibration Data in Info Mem ************************************************************/ CALDCO_16MHZ = 0x10F8; CALBC1_16MHZ = 0x10F9; CALDCO_12MHZ = 0x10FA; CALBC1_12MHZ = 0x10FB; CALDCO_8MHZ = 0x10FC; CALBC1_8MHZ = 0x10FD; CALDCO_1MHZ = 0x10FE; CALBC1_1MHZ = 0x10FF;
    Now the linker knows we have calibration data in that section when we use the modified file.
    When we create a new project in CCS or modify an existing one, CCS will want to use the default linking file, and the default header. Here's an example about how to configure a project to use the new constants.
    First create a new project. Within the project, there should be a file called something like lnk_msp430g2231.cmd. The last line of that file should be something like -l msp430g2231.cmd. Open it, and change the last line to reflect the new linker file so it reads -l msp430g2231_mod.cmd.
    Next, add the appropriate header file to the project. Right-click the project folder in the left pane of CCS and click "Add files to project..." In this example, I'm using C:\Program Files (x86)\Texas Instruments\ccsv4\msp430\include\msp430g2231.h. Now we have a copy of the file in the project we can safely edit. Edit the file so the calibration section looks like this:

    /************************************************************ * Calibration Data in Info Mem ************************************************************/ #ifndef __DisableCalData SFR_8BIT(CALDCO_16MHZ); /* DCOCTL Calibration Data for 16MHz */ SFR_8BIT(CALBC1_16MHZ); /* BCSCTL1 Calibration Data for 16MHz */ SFR_8BIT(CALDCO_12MHZ); /* DCOCTL Calibration Data for 12MHz */ SFR_8BIT(CALBC1_12MHZ); /* BCSCTL1 Calibration Data for 12MHz */ SFR_8BIT(CALDCO_8MHZ); /* DCOCTL Calibration Data for 8MHz */ SFR_8BIT(CALBC1_8MHZ); /* BCSCTL1 Calibration Data for 8MHz */ SFR_8BIT(CALDCO_1MHZ); /* DCOCTL Calibration Data for 1MHz */ SFR_8BIT(CALBC1_1MHZ); /* BCSCTL1 Calibration Data for 1MHz */ #endif /* #ifndef __DisableCalData */
    Now you can begin using the new calibration data in your program. When you #include the msp430g2231.h file, put it in quotes instead of <> to ensure it's loading the modified header local to the project directory.
    I tested the constants with a cheap oscilloscope and they seemed correct. My scope doesn't have great accuracy at high frequencies so they might be a little off, but nothing I can detect. It works with my composite video prog, so that's a pretty good sign.
    EDIT: Oops! I had an incorrectly named file in these instructions. Corrected.
  14. Like
    GeekDoc reacted to jbremnant in MSP430 and Nokia 6100 LCD   
    Here's a preview of my msp430 project.

    Just started mucking around with sparkfun lcd breakout board.
    Managed to take the code they had for arduino and made it work with msp430g2211 on mini breadboard.

    Next steps:
    - use simpleavr's i2c library to interface against wii nunchuck
    - make a simplegame that uses wii nunchuck for user input and lcd display for graphics
    - thinking about making the system modular by breaking functionality into 2 msp430g2211 chips:
    one handling lcd graphics and the other on game logic and wii nunchuck.
    the chips would communicate over SPI.
    - replace sparkfun's lcd breakout with low cost soloution: custom made pcb, and a few components.
    As time permits, I'll post the code, etc...
    I'll attempt to fit everything on a mini breadboard. (inspiration from simpleavr's projects)
    Let's see how this goes.
    EDIT: dang, you can hear my baby crying in the background in the video. what a nice dad. 8-)
  15. Like
    GeekDoc reacted to NatureTM in Value Line series easy DCO setting library   
    Here's an existing TI lib I modified to work with the Value Line series and CCS.
    Since the G series doesn't come with factory-calibrated DCO settings, I wanted an easy way to set the MCLK to 16MHz or some other arbitrary frequency. A TI library existed for setting the DCO using an external watch crystal as a reference, however it didn't work with the G series. It just took some minor editing.
    I think this should be nice for Launchpad owners especially, since the kit comes with an external crystal and a 16MHz rated chip.
    DCO Library: http://naturetm.com/files/Launchpad%20setDCO%20lib.rar
  16. Like
    GeekDoc reacted to simpleavr in Value Line series easy DCO setting library   
    if u dump out the stock flash portion where the calibrated values are defined.

    (mspdebug) dis 0x10f0 010f0: ff ff ff ff AND.B @R15+, 0xffff(R15) 010f4: ff ff ff ff AND.B @R15+, 0xffff(R15) 010f8: ff ff ff ff AND.B @R15+, 0xffff(R15) 010fc: 01 02 MOVA #0x4, SP 010fe: 6b 87 SUB.B @R7, R11
    the double word from 0x10fc (0x0102, 0x6b87) are the calibrated 1Mhz values from factory.
    the other 3 sets (8, 12, 16Mhz) are pre-allocated but blank for the value line (cheaper, so no calibration).
    [EDIT] correction, the 4 calibrated values should be double bytes, not double words according to header files.

    0x10ff, 0x10fe are 1Mhz BCSCTL1+DCOCTL values 0x10fd, 0x10fc are 8Mhz 0x10fb, 0x10fa are 12Mhz 0x10f9, 0x10f8 are 16Mhz
    value shown from my mspdebug session has been messed up (i guess) when i was trying the calibration code.
    too early to give "thank you"s to me,
    [END EDIT]
    typically u can modify NatureTMs example and "write" the calibrated values to those memory locations, after that u can use

    if (CALBC1_16MHZ != 0xff && CALDCO_16MHZ != 0xff) { BCSCTL1 = CALBC1_16MHZ; // Set DCO to 16MHz DCOCTL = CALDCO_16MHZ; }//if
    additional check for 0xff will ensure u only use it if it's set.
    there is also a c example msp430x20xx_dco_flashcal.c in the slau80 examples that also writes to the flash constant locations, but i never got it to work.
    this way u don't have to carry the library on all of your projects and u only need the crystal when doing calibration.
  17. Like
    GeekDoc reacted to bluehash in Like music? Here is $3   
    Ok. this is way off topic. But I love music and can't resist to share:
    Amazon is giving away $3 worth of MP3 for kicks
    Code is : GET3MP3S
    Login and go here
    It expires on Nov 29th. Enjoy
  18. Like
    GeekDoc reacted to simpleavr in Repurposing a Nokia adapter cable - Request for info   
    took a few shots of my cables today in case someone needs to compare w/ their hacks.
    this one is the more recent ca-42s from ebay and dealextreme

    if u just need uart and don't care about powering your project, u can just rip off the phone end connector and u will have 3 wires. Rx-Red, Tx-Blue, Orange-Gnd. u can just add header pins and connect to your breadboard project. note that Rx,Tx mentioned are from the cable, u need to connect Rx to Tx of MCU and Tx to Rx of MCU on your project.
    if u had a dku-5 cable, the pcb is the same, but the dongle is in black color and the wires are of different colors (still 3 wires) and u have to use a multi-meter to figure them out (i forgot to make note of them).
    if u want to supply 3v or 5v power via the cable, u need to cut out and expose the pcb on the dongle side, locate the 3.3v or 5v source and run an extra wire to the far end. here is one.

    the way i did it was to remove the original 3 wire strand and replace with a 4 pin header and run a 4 wire jumper to my projects. the pinout here are red-3.3v, black-Rx, yellow-Tx and green-Gnd.
    u can also see on the photo where i add the 3.3v thru a brown wire add-on. if u need 5v u can trace it from the USB supply point.
    for completeness, i also upload this photo of an older ca-42 cable (pl2303 chipset) that i used as for a breaduino (breadboarded arduino). the older pcbs has lot more connectors w/ easy to id rts dtr lines.

    this one got the dtr needed to do automatic download for arduinos, added switch is for powering 5v projects. haven't touch it for almost 1 year though.
  19. Like
    GeekDoc got a reaction from bluehash in Need feedback on 43oh's mobile version   
    I agree with cde... Wait... you changed it while I was posting!
    (Android 2.1) Looks good. I like the Twitter feed button at the top. I like that the post is formatted for mobile as well (my mobile theme doesn't). If you can change the background to match the regular site, I think you've got it perfect. Mind if I ask what plugin you're using?
    Now, if you could just get phpBB themed for mobile...
    BTW: The original site theme wasn't bad for mobile either, I noticed.
  20. Like
    GeekDoc reacted to paradug in Motion Detection Wildlife Camera   
    The project that I would like to submit to the November contest is a Motion Detection Wildlife Camera. It uses a re-purposed PIR sensor module from an air freshener to provide motion detection, an inexpensive key chain camera to capture images, and a TI msp430g2211 microprocessor from the Launchpad kit to provide the necessary brains.

    The project is described in depth at http://www.instructables.com/id/Cheap-Motion-Detection-Wildlife-Camera/
    This link includes the code and schematic for the project.
    An overview of the schematic is shown below:

  21. Like
    GeekDoc got a reaction from jbremnant in Share pics of your workspace setup   
    I was browsing through bluehash's other site, and came across this link showing his workspace (drool):

    Personally, I have a 6-foot folding table in the basement for my workspace (I'll add a pic later).
    I would like to see pics of others' set-ups, perhaps with lists/descriptions of their main features/tools. At the very least, it would give a reason to clean up your work area! (As I must do before taking a pic. :oops: )
    Anyone willing to share? Post pics of your coding/building areas (mine are separate) and the tools/equipment in them.
  22. Like
    GeekDoc reacted to juani_c in Connector for 2013 target board with staples   
    In case somebody want to use that Launchpad's feature I made the connector with some 26/6 staples



  23. Like
    GeekDoc reacted to JMLB in Joby Taffey made Hack-A-Day!   
    He has been featured a few times again too including today
    http://hackaday.com/2010/11/15/girltech ... crome-lcd/
    and his maze game
    http://hackaday.com/2010/11/11/dungeon- ... /#comments
  24. Like
    GeekDoc reacted to cde in Powering LEDs With MSP430 Output   
    Just another source:
  25. Like
    GeekDoc reacted to cde in Powering LEDs With MSP430 Output   
    Yes, a transistor is like a valve, but at 0ma its off, and at its saturation current, it is fully open. Without pwm, or a dac, or choosing the wrong resistor, it's essentially a digital switch. (Mosfets use voltage instead of current to turn on)
    But for the second part, I'm not 100% sure of this, but I'm quite confident that you can drive a higher voltage collector from a lower voltage base. If you couldn't, the transistor wouldn't be as useful as it is. There might be special rules that exist, but from the general point of view, the transistor exists for this purpose.
    http://www.sullivan-county.com/ele/tran ... rivers.htm
    Look at Arduino tutorials or projects, if it has a transistor, most of the time they are switching different voltages, not just current.
    http://www.arduino.cc/playground/upload ... relays.pdf
  • Create New...