Jump to content
43oh

gatesphere

Members
  • Content Count

    430
  • Joined

  • Last visited

  • Days Won

    6

Reputation Activity

  1. Like
    gatesphere reacted to bluehash in Book marking threads   
    JMLB, see pic.

     
    This does not go through post level though. You can access your bookmarks in the "Manage Bookmarks" page under the User Control Panel.
  2. Like
    gatesphere reacted to zeke in Using a variable in if statement with msp-gcc   
    Oops! Sorry about that. I missed that detail.
     
    You have to admit that it seems strange that the brief_pause() doesn't work for you.
     
    Maybe you should insert TAB's instead of spaces inside the brief_pause() function?

    static void __inline__ brief_pause(register unsigned int n) { __asm__ __volatile__ ( "1: \n" " dec \t %[n] \n" " jne \t >1b \n" : [n] \t "+r"(n)); }
     
    Read this post to see where I got this idea.
     
    Too bad you're not using CSS because you could use the __delay_cycles(n) intrinsic function here. It doesn't take a variable though. It has to be a hard coded integer value because it is converted by the compiler into code that takes "n" cycles to complete.
     
    Take a chance on the tab insertion option and try the brief_pause() routine again. Somehow it works for many people out there.
  3. Like
    gatesphere reacted to markey1979 in 50% off from Ti e-store............   
    Ti sent me an email for 50% off a cc2591 evaluation module. The Promo code is LRG5-SA02RK. I thought I would throw that out there if anyone is interested. Its only $50us instead of $100. The cc2591 is a 2.4Ghz range extender that compliments their other CC wireless offerings.
     
    They said this offer was for today ( 01/27/2010) but, at the bottom it implies longer.
  4. Like
    gatesphere reacted to GeekDoc in Launchpad as external programmer   
    And don't forget, you probably have pin 10 (RST) on the MSP430 tied high in your circuit. You'll have to "untie" that so you can reprogram the chip.
  5. Like
    gatesphere reacted to NatureTM in Binary number format in C (CCSv4)?   
    Here's an interesting thread about this issue:
    http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/t/60157.aspx
     
    I guess it boils down to the fact that binary representation isn't oficially supported by the C language. A couple of solutions are offered by the thread. One is that header file with all the defines already made, the other is a macro. I'm not an expert on compilers, but I'd think the header would do the job fine without wasting cpu cycles.
  6. Like
    gatesphere reacted to bluehash in Spam and Jan 2011 POTM   
    Hello,
     
    You guys may have noticed that there is reasonably less(to none) spam posts. This is because one of our members, Geekdoc is hard at work. He's been given moderator status to take care of them.
     
    To all those who offered( gateshphere, NTM, jsolarski, RobG and others), thank you. Please don't get offended, if we need help, you guys are next in line. Thanks for keeping the discussions going though.
     
    Also, I'll finally have time to update the main blog. Travel kind of screwed my system clock( 24hour inter country travel is.. phew!), now everything is back to normal.. You know 0 degree F temperatures in the North East. Glad to be back.
     
    Feb POTM should be in time.
  7. Like
    gatesphere reacted to znanev in Cheap C2000 Piccolo: F2806x MCU - $11   
    Hi all,
     
    Browsing through DangerousPrototypes blog today, I saw Ian posted some info about TI's floating-point Piccolo MCUs. Texas Instruments has development boards with F28069 in memory stick form factor on promotion now ($11 if using the promo code Piccolo11 at checkout).
     
    It seems those Piccolo MCUs have far more capabilities than I'll ever use in my simplistic projects, but there are a lot of clever people in this forum who may find it useful
     
    You can see and order the dev board here:
    https://estore.ti.com/TMDX28069USB-F28069-Piccolo-controlSTICK-P2257C43.aspx?DCMP=F2806x&HQS=Other+EM+f2806x_em1_es
     
    Here is where I got this tip from:
    http://dangerousprototypes.com/2011/01/13/c2000-piccolo-f2806x-mcu/
     
    Cheers,
    zn
  8. Like
    gatesphere reacted to Lizard787 in NES Controller   
    The program reads an NES Controller. The Data pin is connected to P1.0, the latch pin is connected to P1.1 and the Clock Pin is connected to P1.2. I'm using the controller adapter from parallaxhttp://www.parallax.com/Store/Accessories/HumanInterfaceDevices/tabid/822/CategoryID/90/List/0/SortField/0/Level/a/ProductID/613/Default.aspx to hook up the controllers. After it is done reading the controller it jumps to the subroutine "Finished".
    The inputs are stored in Register 12 which goes:
    A B Select Start UP DOWN LEFT RIGHT
    1 is pressed, 0 is unpressed.

    #include "msp430.h" ; #define controlled include file NAME main ; module name PUBLIC main ; make the main label vissible ; outside this module ORG 0FFFEh DC16 init ; set reset vector to 'init' label RSEG CSTACK ; pre-declaration of segment RSEG CODE ; place program in 'CODE' segment init: MOV #SFE(CSTACK), SP ; set up stack ;42 If Button Press main: CLR.B &P1DIR ;41 If No Button Press BIS.B #7Fh, &P1DIR ; main program ADD.B #7Fh, &P1DIR CLR.B &P1OUT BIS.B #02h, &P1OUT ;Latch Up CLR R4 CLR R13 ;Button State CLR R12 ;All values stored CLR R5 ;Counter BIS.B &P1IN, R13 ;Gets data1 status ;02 is button pressed 03 is not BIS.B #03h, R4 ;Math to get button status SUB.B R13, R4 CLR.B &P1OUT CMP.B #01h, R4 ;Compare values JNE NextButton ADD.B #01h, R12 NextButton: ;67 althogether (A pressed) 15 or 16 INC.B R5 ;Counter CMP #08h, R5 ;Checks How many times loop has run JEQ Finished ;Insert To whereever you want to go after inputs read CLR R13 ;Reset CLR R4 RLA.B R12 ;Rotate for new value ADD.B #04h, &P1OUT ;Clock High BIS.B &P1IN, R13 ;Gets INput CLR.B &P1OUT;Clock Low CMP.B #04h, R13 JNE NextButton ADD.B #01h, R12 JMP NextButton END
    When I tested it I connected four LEDS on pins P1.4 to P1.7 and added the code. Since I only added four led's it only outputs either the multi directional button presses or the normal(A B Start Select) button. IF you try this code make sure you erase the END command on the first section of code i posted.

    Finished: CMP #10h, R12 JLO Displaay BIS.B R12, &P1OUT JMP main Displaay: RLA.B R12 RLA.B R12 RLA.B R12 RLA.B R12 BIS.B R12, &P1OUT JMP main END
    EDIT: Optimized the code(Removed 1 instruction). EDIT 2: Removed another instruction
  9. Like
    gatesphere reacted to JMLB in MSPhere documentation updated-20100925   
    I made a quick list of all the functions. I was going to put it on the wiki and have the functions follow to the description on the link kinda like what arduino does but i could not figure out how to edit the wiki.
     
    msphere_digital_io.h
     
    void pinMode(char pin, char mode)
    void pinFunction(char pin, char mode)
    char digitalRead(char pin)
    void digitalWrite(char pin, char data)
    void digitalToggle(char pin)
    void resistorMode(char pin, char mode)
     
     
    msphere.h
     
    void init()
    void setup()
    void loop()
    void main()
    void mapPin(char *pin, char *port)
    inline void wdtHold()
     
    msphere_math.h
     
    int min(int val1, int val2)
    int max(int val1, int val2)
    int abs(int val)
    int constrain(int val, int low, int high)
    long map(long x, long in_min, long in_max, long out_min, long out_max)
     
    msphere_gpio_interrupt.h
     
    inline void enableMaskableInterrupts()
    void gpioInterruptMode(char pin, char mode)
    char gpioFlagCheck(char pin)
    void gpioFlagClear(char pin)
    inline char gpioFlagCheckAndClear(char pin)
     
    msphere_advanced_io.h
     
    void shiftOut(char dataPin, char clockPin, char bitOrder, char value)
     
    msphere_tlv5620.h
     
    void tlv5620_updateMode(unsigned char mode, char ldacPin)
    void tlv5620_simultaneousUpdate(char ldacPin)
    void tlv5620_sendData(unsigned char dacSel, unsigned char gainSel, unsigned char value, char clockPin, char dataPin, char loadPin)
  10. Like
    gatesphere reacted to bluehash in Spam and Jan 2011 POTM   
    Hello Everyone,
     
    First, a Happy New Year to all you guys. Thanks for supporting us for the latter half of 2010 - It was great!
     
    Second, thanks for taking the time out and flagging down spam posts. This has been very helpful to moderate from the backend. The reason there is a delay when you file a report is because I'm in transit and do not have access to the net 24/7. In a few days, registration/captcha will be made a little harder and hopefully get rid of a few of them. However, human spammers cannot be beaten.
     
    Third, we are sorry that the Jan 2011 POTM could not be held. Maybe it was a good break. Feb 2011 should see something good.
     
    We are also getting good amount of hits from Adafruit, Dangerousprototypes and Makezine because of the " 5 simple breadboarding tips" post. Users then hop to the forums after the post and some of them join in too because of the forum content - so good job and keep it up! Many thanks to these sites too, for sending us visitors. We'll make it a point to do the same.
     
    Thanks again!
  11. Like
    gatesphere reacted to frozencarbonite in Basic Examples   
    Hi again,
     
    Thought I would share some links I found very helpful as a beginner
     
    I went through this C++ tutorial a while back and it has greatly helped me understand how to code basic programs for a variety of platforms like the arduino, Microsoft Visual C++ and now the MSP430 Launchpad. I think if you are a total newcomer you should start by completing this tutorial:
    http://cplusplus.com/doc/tutorial/
     
    Particularly I keep going to this page as a good reference of what is going on when looking at examples for sometimes the simplest things are not explained:
    http://cplusplus.com/doc/tutorial/operators/
     
    Here is a great explanation of how I/O works on the Launchpad and what got my head out of arduino land:
    http://andrewroycarter.com/?s=msp430
     
    Follow that up with this and memorizing the important bitwise operators:
    http://en.wikipedia.org/wiki/Bitwise_operator
     
    Cde's link seems very promising for newcomers but needs fleshed out especially the analog section:
    http://processors.wiki.ti.com/index.php ... _Community
     
    and then the more advanced projects and blogs
     
    Oh and of course 43oh forum :!: The community here seems very knowledgeable and helpful find what info you need rather than pouring over the fragmented bits of info strewn across the web.
     
    Thanks again
  12. Like
    gatesphere got a reaction from frozencarbonite in Basic Examples   
    All of my projects are rather simple. Check them out at my blog: http://blog.suspended-chord.info/
    plug>
  13. Like
    gatesphere reacted to cde in Free eZ430-F2013, just pay shipping   
    EZFREE2013 works for multiple quantities too. You are limited 3 per order, but the code will take off all 3. So 3 ez430s for free with free shipping. Awesome!
     
    But you can only use the code once per account.
  14. Like
    gatesphere got a reaction from netrafter in Free eZ430-F2013, just pay shipping   
    TI is having a promotion right now for a free eZ430-F2013 device, normally $20. I just ordered mine.
     
    To take them up on this offer, use the coupon code EZFREE2013 when you check out. Oh, and the HALFMSPTOOL coupon still works on many items too.
     
    Thought someone would enjoy this.
  15. Like
    gatesphere reacted to bluehash in [ ENDED ] Dec 2010 - 43oh Project of the Month Contest   
    We had four nice submissions...so why not Merry Christmas!
  16. Like
    gatesphere got a reaction from bluehash in [ ENDED ] Dec 2010 - 43oh Project of the Month Contest   
    My entry into the 43oh PoM contest is my photo-sensitive noise maker, the "glitchamin". (forum thread here: viewtopic.php?f=10&t=95, blog post here: http://blog.suspended-chord.info/?c=17)
     
    Here's a basic run-down: This project is an instrument you can play without touching it (for the most part), kind of like a theremin. It consists of a CdS cell, a resistor, two potentiometers, and an audio output. I believe the schematic is easy enough to glean from the code and the pictures, but if not, let me know.
     
    Basically, it works by sampling the ADC pin connected to the CdS cell, along with the two potentiometers, and creates a duty cycle out of that, which is then outputted as square waves to the audio out pin. The net effect of this is some cool, glitchy, electronic sounding stuff.
     
    Anyways, here's the code:

    // LaunchPad-based "glitchamin" // A photo-sensitive theremin-like noise maker // Based upon my previous work, the Arduino glitchamin // (info at http://suspended-chord.info/portfolio/micros/glitchamin-arduino-2010/) // // written by suspended-chord/gatesphere (http://suspended-chord.info/) // Released under the GPLv3. // version 2 (20100924): Actually works like it's supposed to now. #define __MSP430G2231__ #include #define PHOTOCELL INCH_0 // photocell divider on P1.0/A0 #define CUTTER INCH_1 // cutter pot on P1.1/A1 #define CYCLE INCH_2 // cycle pot on P1.2/A2 #define SPEAKER BIT5 // speaker on P1.5 #define DELAY 5 // adjust for best sound int analogRead(unsigned int pin); long map(long x, long in_min, long in_max, long out_min, long out_max); void main() { volatile unsigned int val, cutter, cycle, i, j; WDTCTL = WDTPW + WDTHOLD; // kill wdt+ P1OUT = 0x00; P1DIR = SPEAKER; ADC10CTL0 = ADC10ON + ADC10SHT_0 + SREF_0; // ACD10 on, 4 clock cycles per sample, Use Vcc/Vss references // change frequency to ~15.25mhz (DCO(15,3)) BCSCTL1 |= (BIT0 + BIT1 + BIT2 + BIT3); DCOCTL &= ~(BIT7); DCOCTL |= (BIT6 + BIT5); for (; { val = analogRead(PHOTOCELL); cutter = map(analogRead(CUTTER), 0, 1023, 15, 2); cycle = map(analogRead(CYCLE), 0, 1023, 1, 1000); val = (val/cutter) * DELAY; for (i = 0; i < cycle; i++) { P1OUT |= SPEAKER; for (j = 0; j < val; j++); P1OUT &= ~SPEAKER; for (j = 0; j < val; j++); } } } int analogRead(unsigned int pin) { ADC10CTL1 = ADC10SSEL_2 + pin;// Select MCLK and pin ADC10CTL0 |= ENC + ADC10SC; // enable and start conversion while (1) { if ((ADC10CTL1 ^ ADC10BUSY) & ((ADC10CTL0 & ADC10IFG)==ADC10IFG)) { // ensure conversion is complete ADC10CTL0 &= ~(ADC10IFG +ENC); // disable conversion and clear flag break; } } return ADC10MEM; } long map(long x, long in_min, long in_max, long out_min, long out_max) { return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; }
     
    Here are some pictures:



     
    And here is a sample track. Careful, it's annoying and loud
    (de)Modulator2
  17. Like
    gatesphere reacted to simpleavr in ezprobe, ez430 based logic probe   
    here is my entry to the december project of the month. comments welcomed.
     

     
    description
     
    this is a simple logic probe project based on TI Launchpad. i took advantage of a free offer on a couple of ez430s from TI in september 2010. they are very handy and fun in trying out small code snippets and watch the led blink. they had since been laying around my desk and i have to come up with something for them. and i want to stop people coming up and ask to borrow my "memory stick".
     
    well, this is no memory stick, 16bit MCU w/ multi-channel ADCs, adaquate 2K programming memory and runs up to 16Mhz. all packed up with the debugging programming interface board in a nice usb device package.
     
    my main design goal is to limit my intervention to the original ez430. in that i don't want do alter it too much physically and i want to retain it's programming / debugging function for other target board projects. all this while serve additional useful purposes.
     
    this is a linux project, as usual, i had given attention with my best knowledge to make provisions so that it can be built under windows. however i do not have the time and resources to try out everything under windows.
     
    most of my electronics projects are done on very small breadboards and i usually work on tight spaces (kitchen table, half a borrowed desk, etc). there are many instances that i need to check circuit logic levels and i've been using a multimeter (size of a brick) to check things out. it always annoys me as my projects are much smaller than my multimeter and i found it always gets in my way. i need an alternative, a small logic probe will do.
     
    the ez430 is perfect for this task. to begin with, it's already shaped like a probe, i just need to add a nail and some leds. as i mentioned earlier, i want to make this project simple and non-destructive. and i made use of what's available already.
     
    instead of building the project on a pcb / pref-board, i build this on a target msp430f2012 board, employing the 14 pin header thru holes as my prototyping area. this is where the tiny leds goes. i do not want to drill holes on the plastic casing, i don't want to run too many wire nor add additional contact points. all i need is a probe io contact and a button input for function select, plus gnd and vcc. the usb connection looks perfect for this task. i will power the probe via the usb (the programmer circuit will regulate a around 3v potential for me) and use the D+ and D- usb connects for my probe and switch.
     
    since the ez430 is slave / client device, upon initialization, it won't do a thing except a pull-up on D+ (to indicate it's a "hi-speed" usb). i use the floating D- as my probe io and D+ as my tactile button input (i don't even need to setup a pull-up resistor for that, it's already there)
     
    features and application
     
    * supply from circuit via usb connector
    * 3 operating modes rotating between logic read, pulse output, pwm output
    * long button press (about 1.5 sec) rotates through the 3 operating modes
    * p1.0 original green led as mode indicator, off - probe, on - output, blink - pwm
     
    logic probe
     
    * logic probe red - hi, green - low, none - floating
    * logic probe red / green blinks on continous pulse reads > 100hz
    * 4 yellow leds shows detected frequencies in 8 steps, blinking yellows indicate hi-range (i.e. step 5-8)
    * shows detected pulse frequences for 100hz+, 500hz+, 1khz+, 5khz+, 10khz+, 50khz+, 100khz+, 500khz+
    * for non-continous single pulse bursts, the red / green leds stays on and subsequent pulse counts are displayed incrementally on the leds, will count up to 8 pulse
     
    continuous pulse output, frequency setting
     
    * indicated by p1.0 original green led on
    * 4 yellow leds shows output pulse frequencies in 9 steps, blinking yellows indicate hi-range (i.e. step 5-8)
    * pulse frequences output for 100hz, 500hz, 1khz, 5khz, 10khz, 50khz, 100khz, 500khz, 1mhz
    * short button press rotates the 9 different frequency settings.
    continuous pulse output, pwm setting
     
    * indicated by p1.0 original green led blinking
    * same as previous operation mode, except pwm values are show (and be setup) instead of frequency
    * 4 yellow leds shows output pwm percentages in 9 steps, blinking yellows indicate hi-range (i.e. step 5-8)
    * pwm percentages for 0%, 12.5%, 25%, 37.5%, 50%, 62.5%, 75%, 87.5%, 100%
    * short button press rotates the 9 different pwm settings.
     
    schematic

     
    source file
    ezprobe.zip
     


     
    project page, construction details, schematics, etc.
    http://www.simpleavr.com/msp430-projects/ezprobe
     
    [EDIT] source code and schematic added, update more correct schematic
  18. Like
    gatesphere got a reaction from bluehash in New MSP430G2xxx Value Line chips?   
    Hello everyone.
     
    I did some mucking about in my include directory after the recent CCSv4 update and found some interesting new headers...
     
    On my blog I've done a writeup on what I was able to extract from those headers.
    http://blog.suspended-chord.info/?c=29
     
    I hope you all find this informative.
     
    Oh, and thanks, TI, for letting me do some detective work!
     
    EDIT: Now updated with flash size information. Check it out.
  19. Like
    gatesphere reacted to OCY in New MSP430G2xxx Value Line chips?   
    a) Do these chips have BSL ROM? The current G2xx1 do not have BSL ROM.
    Are the link command files for these chips in the newest CCS? If so, they should show the size of RAM and Flash.
  20. Like
    gatesphere reacted to NatureTM in New MSP430G2xxx Value Line chips?   
    I couldn't wait. I looked at the linker command files and unfortunately it appears the 4 new chips gatesphere listed have 2K flash. The good news is that they have 256B RAM.
     
    EDIT: I guess I was wrong about the flash. It looks like the 4 g24xx chips have 8k flash.
  21. Like
    gatesphere got a reaction from NatureTM in New MSP430G2xxx Value Line chips?   
    Hello everyone.
     
    I did some mucking about in my include directory after the recent CCSv4 update and found some interesting new headers...
     
    On my blog I've done a writeup on what I was able to extract from those headers.
    http://blog.suspended-chord.info/?c=29
     
    I hope you all find this informative.
     
    Oh, and thanks, TI, for letting me do some detective work!
     
    EDIT: Now updated with flash size information. Check it out.
  22. Like
    gatesphere reacted to GeekDoc 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. :? )
     
    MSP430G22xxEagleLibrary.zip
  23. Like
    gatesphere reacted to GeekDoc 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.
  24. Like
    gatesphere got a reaction from bluehash in ez430 case removal   
    If you hold it so that the TI logo is face up and readable, in the lower right corner of it, there's a notch between the two parts. Take off the end cap and open up the case with this notch using a flat-head screwdriver. It's a sturdy case, it'll be fine. At least, that's how I open mine.
     
    Two places NOT to try to open it are the circular hole and the square hole near the bottom of the case. There are capacitors there, and if you accidentally bump one of them off, the programmer part of the device becomes useless.
     
    Hope this helps!
  25. Like
    gatesphere got a reaction from mavis311 in ez430 case removal   
    If you hold it so that the TI logo is face up and readable, in the lower right corner of it, there's a notch between the two parts. Take off the end cap and open up the case with this notch using a flat-head screwdriver. It's a sturdy case, it'll be fine. At least, that's how I open mine.
     
    Two places NOT to try to open it are the circular hole and the square hole near the bottom of the case. There are capacitors there, and if you accidentally bump one of them off, the programmer part of the device becomes useless.
     
    Hope this helps!
×
×
  • Create New...