Jump to content

bluehash

Administrators
  • Content Count

    7,290
  • Joined

  • Last visited

  • Days Won

    193

Reputation Activity

  1. Like
    bluehash got a reaction from NJC in Digital LED Clock   
    They don't "communicate". There is a clock line going to each slave from the master.
  2. Like
    bluehash reacted to NJC in LaunchScope   
    I finally got around to posting my final post in the scope series. I just wanted to thank Doc for his help a while ago with testing the code. If anyone finds any errors, or typos, or anything else please let me know; its hard to make sure everything is perfect.
     
    http://www.msp430launchpad.com/2010/12/ ... scope.html
     
    Any ideas on the next post? I'm open to suggestions. For now I'm thinking I2C communication between multiple chips, but I would not mind a distraction from my all my plans.
  3. Like
    bluehash reacted to Joby Taffey in [ ENDED ] Dec 2010 - 43oh Project of the Month Contest   
    MSP430G2221 jar-of-fireflies
     
    A classic project, re-told on the MSP430 Launchpad's MSP430G2221.
     
    http://blog.hodgepig.org/2010/12/23/finished-fireflies/
     



     
    (I've just finished this project and published the details, but it was already mentioned on 43oh back when I started it http://www.43oh.com/2010/10/msp430_firefly_throwies/ So, perhaps it's ineligible for the competition - no problem).
     
    Forum page here: viewtopic.php?f=9&t=287#p2230)
  4. Like
    bluehash reacted to NatureTM in [ ENDED ] Dec 2010 - 43oh Project of the Month Contest   
    Hey guys.
    My submission for this month's contest is my Launchpad/MSP430G TV output project.

     
    Many of you are already familiar with the project, but here's a short description:
     
    My goal was to push the limitations of the G-series microcontroller. A lot of people (not in this forum) scoffed at the 128B RAM, 2KB flash, and single timer. I wanted to do something that would make people put down their Arduinos and give Launchpad another look. I'm still pretty novice, so this was a big challenge for me.
     
    To display video, the MSP430 must output proper sync timings and image data. For h-sync, I attached TimerA to a pin and triggered sync pulses at a regular interval. The TimerA_CCR0 ISR contains software loops that handle v-sync.
     
    To display the image, I used the USI to spit out 16 bit chunks of image data at a time. Software delays handle the reloading of the USI at the proper time. In hindsight, I may have been wise to use the USI interrupt to reload the USI, but a big change like that means a lot debugging. A couple of cycles of timing misalignment results in very visible image distortion.
     
    The 192
  5. Like
    bluehash reacted to RobG in LaunchPad controlling up to 8 RC Servos   
    Here's my take on controlling RC servos with LaunchPad.
    Again, I am using my favorite shift register, 74HC595 (later I will be adding another example which will use 74HC164.)
    Since the voltage may be different in your application and the default DCO is used, you will have to work out the timing.
     
    If you need only 4ch, look at this post.
    Here is another 4ch example with ADC
    The simplest single channel ADC -> Servo example is here
    And finally, 2ch version is here
     


     
    Besides LP you will need 74HC595 and 8 10k pull down resistors.

     

    #include unsigned int counter = 5; // Servo counter, start with 5 (see below in timer interrupt section.) unsigned int servoPosition[8] = {180, 180, 180, 180, 180, 180, 180, 180}; // Default servo position // DEMO counter unsigned int demoCounter = 0; void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT P1OUT &= ~BIT0; // Port P1.0 will be used as serial out to set first bit P1DIR |= BIT0 + BIT2; // Port P1.0 & P1.2 out P1SEL &= ~BIT2; // An ugly way to clear register volatile int c; // This could be done by some sort of POR for( c = 0; c < 8; c++ ) { P1OUT |= BIT2; P1OUT &= ~BIT2; } P1SEL |= BIT2; // P1.2 TA1 option select CCTL0 = CCIE; // CCR0 interrupt enabled CCR0 = 325; // ~2.5ms CCTL1 = OUTMOD_3; // CCR1 set/reset CCR1 = 180; // CCR1 duty cycle ~1.5ms TACTL = TASSEL_2 + MC_1 + ID_3; // SMCLK/8, upmode _bis_SR_register(LPM0_bits + GIE); // Enter LPM0 w/ interrupt } // Timer A0 interrupt service routine #pragma vector = TIMERA0_VECTOR __interrupt void Timer_A (void) { counter++; // Increase counter if(counter == 0x08) counter = 0; // Counter range 0 to 7 if(counter == 6) { // Set serial in to 1, then reset P1OUT |= BIT0; // Both clocks of 595 are connected together, serial in must be set earlier } else if(counter == 7) { P1OUT &= ~BIT0; } // DEMO demoCounter++; if(demoCounter == 800) servoPosition[0] = 80; if(demoCounter == 1600) servoPosition[0] = 280; if(demoCounter == 2000) servoPosition[7] = 280; if(demoCounter == 2400) servoPosition[7] = 180; if(demoCounter == 2800) servoPosition[7] = 280; if(demoCounter == 3200) servoPosition[0] = 130; if(demoCounter == 3600) servoPosition[0] = 230; if(demoCounter == 4000) { servoPosition[0] = 180; servoPosition[7] = 180; demoCounter = 0; } // END DEMO CCR1 = servoPosition[counter]; }
  6. Like
    bluehash 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
  7. Like
    bluehash reacted to simpleavr in MSP430 and Nokia 6100 LCD   
    it's this one, kind of like a test board for "a lot" of different phone types.
     
    http://rossum.posterous.com/screen-play ... or-microco
     
    i really don't want to do smd / pcb, will find another old phone to and try my soldering skills again. if i ask, i always get phones to play w/. people are switching phones every 6 months now.
     
    i am sure i can wire a nokia 1208 (w/ 0.5mm 10 pin connector, 128x96, 4096 color), but that also seems to be "too old" and hard to get by.
  8. Like
    bluehash reacted to RobG in LaunchPad, 74HC165, Switches   
    *******************
    Also checkout this post
    *******************
     
    In this example, I am demonstrating how to connect switches using parallel-serial shift register 74HC165.
    You can daisy chain as many 165s as you want.
    In my example I have 2 of them, which allowes me to connect up to 16 switches.
    In the video, I am using small 6 position DIP switch and all unused inputs are grounded and do not have pull-up resistors.
    Also, the state of switches is displayed on a 7 segment display (see my other post for how to connect 7 segment display.)
    De-bouncing is accomplished by comparing previous state with current (switchReady.)
     


     

    #include unsigned int data = 0; // data to be displayed unsigned int digitCounter = 0; // Digit counter unsigned char digit = 0; // Single digit to be displayed unsigned char hex7digit[16] = {0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F,0x77,0x7C,0x58,0x5E,0x79,0x71}; // Hex to 7 digit map unsigned char digitSelector[4] = {0x01, 0x02, 0x04, 0x08}; // Digit selector map unsigned int switchReady = 0x0; // When BITn is 0, means switch is unstable H->L or L->H unsigned int switchStatus = 0x0; // Pressed or released void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT P1OUT |= 0x01; // Port P1.0 will be used to latch both, 74HC165 and 74HC595 P1DIR |= 0x01; USICTL0 |= USIPE7 + USIPE6 + USIPE5 + USIMST + USIOE; // In, out & clk enable, SPI Master USICTL1 |= USICKPH + USIIE; // Counter interrupt, flag remains set USICKCTL = USIDIV_4 + USISSEL_2; // /16 SMCLK USICTL0 &= ~USISWRST; // USI released for operation USICNT = USI16B; // Enable 16 bit CCTL0 = CCIE; // CCR0 interrupt enabled CCR0 = 625; // Approx. 5ms TACTL = TASSEL_2 + MC_1 + ID_3; // SMCLK/8, upmode _bis_SR_register(LPM0_bits + GIE); // Enter LPM0 w/ interrupt WDTCTL = WDTPW + WDTHOLD; // Stop WDT } // Timer A0 interrupt service routine #pragma vector = TIMERA0_VECTOR __interrupt void Timer_A (void) { //P1OUT &= ~0x01; // You could latch input right now //P1OUT |= 0x01; if(digitCounter == 0) { // Update switch status every 20 ms switchReady = ~(USISR ^ switchStatus); // Copy USI's register to switchReady and switchStatus switchStatus = USISR; if((switchReady & 0x3F) == 0x3F) { // When all 6 switches are ready... data = switchStatus; // move input to data } } digitCounter++; // Increase digit counter digitCounter &= 0x03; // Mask, counter range is 0-3 digit = data>>(4 * digitCounter); // Shift digits right digit &= 0x0F; // Mask, we need first digit only USISRL = hex7digit[digit]; // Get segments from the map USISRH = digitSelector[digitCounter]; // USICNT |= 16; // Start USI } // USI interrupt service routine #pragma vector = USI_VECTOR __interrupt void USI_TXRX (void) { USICTL1 &= ~USIIFG; // Clear pending flag P1OUT &= ~0x01; // Latch data display (& input for next timer interrupt) P1OUT |= 0x01; }
     
    Schematic:

  9. Like
    bluehash reacted to jbremnant in MSP430 and Nokia 6100 LCD   
    Finally made a bit more progress on this project.
    I got wii nunchuck working with msp430g2211.
    Now I can retrieve the values and plot them on the nokia lcd. 8-)
     

     
    Here's a video proof.
     


     
    You can see I am also working under linux.
    First, mspdebug flashes the chip, and then it shows wii nunchunk joy stick controlling the small dot on lcd screen.
     
    Time to fit a small game into 200bytes of flash I have left. haha
     
     
    @gatesphere
    I still owe you this code. Let me tidy it a bit more, do a write up and then post the code in git or google code.
    I'll let you know.
  10. Like
    bluehash reacted to simpleavr in ezprobe, ez430 based logic probe   
    thanks.
     
    if u mean connectors inside the casing (between programmer side and mcu target board), i will need special (and expensive) 0.05in connectors, will do it when i come across a right one.
    if u mean the probe head (usb connector), again i tried standard 0.1in headers and i still found them too obstructive, but definitely i will take your advice and build a better probe-head. i did two and is still not satisfied.
     
    don't u recognized your own launchpad? , i am putting it in good use. it's a logic analyzer i pull up to show the ezprobe functionalities. they share very similar code (logic capture + signal generation), except the launchpad application does (1) add uart for host side visualization, (2) four channels instead of one. it's far from finish, just got the basics in, there is no control from host side and auto-frequency adjustment, the high side capture is not fast enough (yet). may be a january POM.
     
    i wish, but they won't take me, all my works are crude w/o any safety considerations.
     
    i actually has a 128x64 from ebay, it didn't work out, need a smaller one like 128x32, etc. had made provisions in the code and by changing the timer_a capture from just falling edge to both edges, pulse width can be captured easily. then i need to work out a board (size of the programmer board) and do smd pcb work. it will come in the future. but i do like the current one as it's easier and less expensive for anyone to build.
     
    now it's your turns to submit yours.
  11. Like
    bluehash 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
  12. Like
    bluehash reacted to simpleavr in Interfacing Launchpad to Digital Caliper   
    another project made HaD
     
    congrats.
     
    http://hackaday.com/2010/12/15/reading- ... ontroller/
  13. Like
    bluehash reacted to RobG in LaunchPad and fun with the flash (strobe & slave trigger)   
    Last weekend I was doing a little photo shoot and I was in need of extra flash source. I have an old Nikon SB-28 laying around so I figured I could use it if I had a slave trigger. Sure I can buy one from Amazon for <$10 (dumb one) or build one using 555 (which would ignore TTL pre-flash,) but why not go one step further and use LaunchPad.
     
    Step 1, build strobe light.
    This is pretty simple, just add opto-isolator and write short program.
    FL1 connects to the center pin of the hot shoe, FL2 to the side.
    If you need a hot shoe, you can get one cheap from BHPhotoVideo.com, just search for AS-E900 (or SK-E900, you'll get nice bracket as a bonus!)




    #include unsigned int sw = 0; void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT P1OUT |= 0x01; // Port P1.0 will be used to trigger flash P1DIR |= 0x01; CCTL0 = CCIE; // CCR0 interrupt enabled CCR0 = 20000; // TACTL = TASSEL_2 + MC_1 + ID_3; // SMCLK, upmode _bis_SR_register(LPM0_bits + GIE); // Enter LPM0 w/ interrupt } // Timer A0 interrupt service routine #pragma vector = TIMERA0_VECTOR __interrupt void Timer_A (void) { if(sw = ~sw) { // Flash every other interrupt P1OUT |= 0x01; } else { P1OUT &= ~0x01; } }
     
    Step 2, add S2 to control speed.
     

    #include unsigned int counter = 0; unsigned int resetCounterAt = 100; unsigned int pressedS2 = 0; // BITn of switchReady and switchStatus corresponds to Port P1.n unsigned int switchReady = 0x0; // When BITn is 0, means switch is unstable H->L or L->H unsigned int switchStatus = 0x0; // Pressed or released void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT P1OUT |= BIT0; // Port P1.0 will be used to trigger flash P1DIR |= BIT0; P1DIR &= ~BIT3; // Port P1.3 as input P1OUT |= BIT3; // Pull up resistor P1REN |= BIT3; // Enable pull up resistor CCTL0 = CCIE; // CCR0 interrupt enabled CCR0 = 1250; // Approx. 10ms TACTL = TASSEL_2 + MC_1 + ID_3; // SMCLK/8, upmode // we will use USI as a delay USICTL0 |= USIMST; // SPI Master USICTL1 |= USICKPH + USIIE; // Counter interrupt USICKCTL = USIDIV_4 + USISSEL_2; // SMCLK/16 USICTL0 &= ~USISWRST; // USI released for operation _bis_SR_register(LPM0_bits + GIE); // Enter LPM0 w/ interrupt } // Timer A0 interrupt service routine #pragma vector = TIMERA0_VECTOR __interrupt void Timer_A (void) { switchReady = ~(P1IN ^ switchStatus); switchStatus = P1IN; if(switchReady & BIT3 && !(switchStatus & BIT3)) { if(!pressedS2) { // Update only once resetCounterAt -= 20; if(resetCounterAt < 20) { resetCounterAt = 100; } pressedS2 = 1; // Set pressedS2 flag } } if(switchReady & BIT3 && switchStatus & BIT3) pressedS2 = 0; // S2 released, clear pressedS2 flag counter++; if( counter > resetCounterAt ) { counter = 0; P1OUT |= BIT0; // Flash on interrupt USICNT |= 8; // Start delay } } // USI interrupt service routine #pragma vector = USI_VECTOR __interrupt void USI_TXRX (void) { USICTL1 &= ~USIIFG; P1OUT &= ~BIT0; // Clear P1.0 }
     
     
    Step 3, add phototransistor to make it work as a slave trigger
    Since 70's are long gone, I don't think I will have any use for the strobe, so we will add phototransistor to make it work as a dumb slave trigger


    #include void main(void) { WDTCTL = WDTPW + WDTHOLD; // stop WDT P1OUT &= ~BIT0; // port P1.0 will be used to trigger flash P1DIR |= BIT0; P1DIR &= ~BIT7; // port P1.7 input P1IE |= BIT7; // P1.7 interrupt enabled P1IES &= ~BIT7; // P1.7 lo/high edge P1IFG &= ~BIT7; // P1.7 IFG cleared _bis_SR_register(LPM0_bits + GIE); // LPM0 with interrupts } // Port 1 interrupt service routine #pragma vector=PORT1_VECTOR __interrupt void Port_1(void) { P1IE &= ~BIT7; // disable P1.7 interrupt P1IFG &= ~BIT7; // P1.7 IFG cleared P1OUT |= BIT0; // flash on interrupt _no_operation(); // 1 cycle delay, just in case //__delay_cycles(50); // if there are problems wih trigger, longer delay may be needed P1OUT &= ~BIT0; // clear P1.0 P1IE |= BIT7; // enable P1.7 interrupt }
     
     
    Step 4, add delay to make it work with TTL pre-flash
    Since in TTL mode main flash is not the first one, we have to add delay to ignore pre-flash(s)
     
    As it turns out, this is not an easy task. Pre-flashes are far more complicated than I thought and simple delay may not work.
    So this is my first stab at it. I am simply ignoring first flash and triggering the slave on second one. If there's no second flash within 200ms, counter is reset. This setup works with my D80 and SB-28 in TTL mode except when flashing too close to detector.
     
    When I find some extra time, I will improve this thing or hopefully someone else will contribute.
     

    #include unsigned char mainFlash = 0; // 0 indicates pre-flash, 1 main flash void main(void) { WDTCTL = WDTPW + WDTHOLD; // stop WDT P1OUT &= ~BIT0; // port P1.0 will be used to trigger flash P1DIR |= BIT0; P1DIR &= ~BIT7; // port P1.7 input P1IE |= BIT7; // P1.7 interrupt enabled P1IES &= ~BIT7; // P1.7 lo/high edge P1IFG &= ~BIT7; // P1.7 IFG cleared CCTL0 = CCIE; // CCR0 interrupt enabled CCR0 = 0; // timer idle TACTL = TASSEL_2 + MC_1 + ID_3; // SMCLK/8, up mode _bis_SR_register(LPM0_bits + GIE); // LPM0 with interrupts } // Port 1 interrupt service routine #pragma vector=PORT1_VECTOR __interrupt void Port_1(void) { P1IE &= ~BIT7; // disable P1.7 interrupt P1IFG &= ~BIT7; // P1.7 IFG cleared if(mainFlash) { // this is a main flash, trigger slave P1OUT |= BIT0; // trigger slave _no_operation(); // 1 cycle delay, just in case P1OUT &= ~BIT0; // clear P1.0 mainFlash = 0; // clear flag CCR0 = 0; // no need for timer } else { // pre-flash CCR0 = 25000; // start timer, approx. 200ms mainFlash = 1; // set flag } P1IFG &= ~BIT7; // P1.7 IFG cleared P1IE |= BIT7; // enable P1.7 interrupt } // Timer A0 interrupt service routine #pragma vector = TIMERA0_VECTOR __interrupt void Timer_A (void) { if(mainFlash) { // for some reason, there was no main flash mainFlash = 0; // reset flag CCR0 = 0; // no need for timer } }
  14. Like
    bluehash reacted to jbremnant in simpleavr on Hackaday   
    Noticed this:
     
    http://hackaday.com/2010/12/14/make-your-own-minimalist-avr-isp/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+hackaday%2FLgoM+%28Hack+a+Day%29&utm_content=Google+Reader
     
    Which points to instructables page that simpleavr seems to have set up.
    Good going!
  15. Like
    bluehash reacted to simpleavr in MSP430 LaunchPad, basic uart   
    just tried again the spectrum analyzer comm. and has more info for u.
     
    during development, i alternatively do flashing (via mspdebug) and running the perl script (host comm.). and when i do that, i always need to unplug / replug the usb cable when i do the firmware flashing. looks to me that the launchpad usb controller have to be reset and clear some status when i use the two interfaces (hid and serial) alternatively.
     
    if i am not flashing and just run the host script, i can reliably start a session (host script sends start comm. and end comm. at each session), ends it and start a new session consecutively.
     
    the linux hid probing can have an effect. it can mess up the launchpad usb controller's status (i suspect) and get your comm. hung.
     
    i use two one line "sudo" scripts to turn it off / on (turn it off after the 1st time u plug in launchpad)

    echo 0 > /sys/bus/hid/drivers_autoprobe and echo 1 > /sys/bus/hid/drivers_autoprobe
     
    good luck w/ your projects.
  16. Like
    bluehash got a reaction from jbremnant in MSP430 LaunchPad, basic uart   
    Probably of some help till savr replies:
    http://groups.google.com/group/ti-launc ... c8a4f00ab6
  17. Like
    bluehash reacted to Maris in Interfacing Launchpad to Digital Caliper   
    Hello there,
    I'm new here and this is my first Launchpad project. May I apply for project of the moth contest? (BTW this is cool idea as those kind of things always help to find motivation to describe what you did not just stop when you see everything is working)
     
    I recently bought digital caliper and decided to try to read it's data port readings from my Launchpad. One of uses would be to use caliper for precise position sensor if 8Hz updates are enough. It had Clock and Data pin. Had to setup pin that connects to Clock to trigger interrup on every pulse and then in interrupt function do bit shifting to assemble 16 bit signed integer representing caliper reading. Then sent it out to PC via soft UART serial port. For that I reused examples from well known blog at http://www.msp430launchpad.com/.
     
    Also I had to figure out how to connect calipers lines to MSP430 as caliper is using 1.5V levels where MSP430 +3V levels. Used two transistors and two resistors and breadboard to amplify levels. Schematics:

     
    Also took caliper apart just to find out what principle is used to sense position changes:

     
    You can find full source code and detailed explanation in article I worte:
    http://robocombo.blogspot.com/2010/12/using-tis-launchpad-to-interface.html
     
    Let me know if you have any questions or suggestions!
  18. Like
    bluehash reacted to GeekDoc in Another Design Contest!   
    Well, I entered and forgot about this project, and guess what came via FedEx today!
     

     
    Their site says they are out of the 1000 free boards, so I must have been one of the last to get one. This board is pure geek pr0n! It has everything! I wonder if I'll ever learn to use it properly, let alone finish my entry in the contest!
     
    For a "little" help, Renesas also included a very nice book:
     

     
    Look at the size of that book! (LaunchPad included for scale). If it takes this much to understand this platform, I don't think I have much of a chance at a prize. No matter, I feel like I've already won and received a $110 dev board and an expensive book as prizes!
  19. Like
    bluehash got a reaction from rivalslayer in Need a favicon?   
    That is sweet! Added it to the site. I may have to tweak it a little, but this works perfectly fine. I totally forgot about favicons.
    Thank you Geekdoc!
  20. Like
    bluehash reacted to gatesphere 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.
  21. Like
    bluehash 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.
  22. Like
    bluehash reacted to juani_c in Eagle parts for MSP430G22xx   
    Here it is, if anyone found problems with the symbols please tell me in order to correct them
    TI_MSP430G_v1.rar
  23. Like
    bluehash 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
  24. Like
    bluehash got a reaction from GeekDoc 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.
    msp430g2xx.rar
  25. Like
    bluehash reacted to gatesphere 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...