Jump to content

username

Members
  • Content Count

    305
  • Joined

  • Last visited

  • Days Won

    8

Reputation Activity

  1. Like
    username got a reaction from keithehenry in G2553 Hardware UART "Hello World" Example   
    A simple well documented hardware uart "Hello World" example.
    Updated, thanks for member comments 3/13/13
     
    Notes:
    This code is for launchpad rev 1.5
    This is hardware UART, your launchpad jumpers must be set for hardware UART
    The TI TUSB3410 is a TERRIBLE usb-> UART chip and is very buggy on WIN7 64bit. If your still having issues, it could be a driver issue. Try on XP or use a different USB -> serial device.
     
     
    //Nate Zimmer UART example // Press button to print hello to terminal #include  <msp430g2553.h> // System define for the micro that I am using #define RXD        BIT1 //Check your launchpad rev to make sure this is the case. Set jumpers to hardware uart. #define TXD        BIT2 // TXD with respect to what your sending to the computer. Sent data will appear on this line #define BUTTON    BIT3 void UART_TX(char * tx_data);            // Function Prototype for TX void main(void) {   WDTCTL = WDTPW + WDTHOLD;         // Stop Watch dog timer   BCSCTL1 = CALBC1_1MHZ;            // Set DCO to 1 MHz   DCOCTL = CALDCO_1MHZ;   P1DIR &=~BUTTON;                  // Ensure button is input (sets a 0 in P1DIR register at location BIT3)   P1OUT |=  BUTTON;                 // Enables pullup resistor on button   P1REN |=  BUTTON;   P1SEL = RXD + TXD ;                // Select TX and RX functionality for P1.1 & P1.2   P1SEL2 = RXD + TXD ;              //   UCA0CTL1 |= UCSSEL_2;             // Have USCI use System Master Clock: AKA core clk 1MHz   UCA0BR0 = 104;                    // 1MHz 9600, see user manual   UCA0BR1 = 0;                      //   UCA0MCTL = UCBRS0;                // Modulation UCBRSx = 1   UCA0CTL1 &= ~UCSWRST;             // Start USCI state machine   while(1)                          // While 1 is equal to 1 (forever)   {       if(!((P1IN & BUTTON)==BUTTON)) // Was button pressed?       {           UART_TX("Hello World! \r\n");  // If yes, Transmit message & drink beer           __delay_cycles(100000); //Debounce button so signal is not sent multiple times       }   } } void UART_TX(char * tx_data) // Define a function which accepts a character pointer to an array {     unsigned int i=0;     while(tx_data[i]) // Increment through array, look for null pointer (0) at end of string     {         while ((UCA0STAT & UCBUSY)); // Wait if line TX/RX module is busy with data         UCA0TXBUF = tx_data[i]; // Send out element i of tx_data array on UART bus         i++; // Increment variable for array address     } }
  2. Like
    username got a reaction from agaelema in NRF24L / Launchpad Example CCS   
    Couldn't find a simple msp430 CCS example of the NRF24L 2.4ghz so I wrote one. Requires 2 msp430g2553 launchpads and 2 NRF24L modules. Press button on 1 launchpad to toggle LED on other launchpad. Note example code assumes you know C language.
     
    *Note:  Driver referenced from Brad S, supreme overlord of all C
     
    Preview of main (download for full driver set):
    //Author: Nathan Zimmerman //Date: 3/2/14 // Driver referenced from Brad S, supreme overlord of all C //Launchpad CCS example of NRF24L Driver. Use P1.3 Button to toggle LED on other launchpad. Hence requires 2 NRF modules & 2 launchpads //Note example uses a fixed packet length of 5. //GPIO Pinouts //P2.0 = IRQ //P2.1 = CSN //P2.2 = CE //P1.5 SCLK //P1.6 MISO //P1.7 MOSI //P1.3 Button Launchpad Rev 1.5 //P1.0 Red LED Launchpad Rev 1.5 #include "msp430g2553.h" #include "stdint.h" #include "Drivers/rtc.h" #include "Drivers/clock.h" #include "Drivers/usi.h" #include "Drivers/External/NRF24L.h" #include "Drivers/External/LAUNCHPAD_IO.h" const uint8_t txMessage[PAYLOAD_WIDTH]= "Hello"; void main(void) {     uint8_t rxbuffer[PAYLOAD_WIDTH] = {0,0,0,0,0};     volatile uint8_t statusData = 0;     disableWDT();     setupCoreClock(CLK_16_MHZ);     setupRLED();     RLED_OFF;     setupButton();     SERIAL_CLASSES spiHandle = { SPI, SMCLK_16MHZ_SPI_CLK_4MHZ, MODULE_B}; // NRF cannot run at max baud 16mhz     initUSI(&spiHandle);     initNRF24L();     statusData = getNrfStatus();     if(statusData != 0x0E)     {         while(1); // NRF failed to init, check pinout or device     }     while(1)     {         if(recievedRfData())         {             getRfBuffer(rxbuffer);             if(rxbuffer[0]=='H') // newb check for "Hello" Message             {                 RLED_TOGGLE;             }         }         if(buttonPressed)         {             transmitTxData((uint8_t *)txMessage);             _delay_cycles(16000000); // newb button debounce         }         handleRxData();         handleTxData();     } }   NRF_Example_NateZ.zip
     
     
     
  3. Like
    username got a reaction from Barcooler in NRF24L / Launchpad Example CCS   
    Hey spirilis, your library looked good although I tried your code in CCSv5 and I was getting some odd ISR errors. Might have been doing something wrong or using the wrong device. 
  4. Like
    username got a reaction from Barcooler in NRF24L / Launchpad Example CCS   
    Couldn't find a simple msp430 CCS example of the NRF24L 2.4ghz so I wrote one. Requires 2 msp430g2553 launchpads and 2 NRF24L modules. Press button on 1 launchpad to toggle LED on other launchpad. Note example code assumes you know C language.
     
    *Note:  Driver referenced from Brad S, supreme overlord of all C
     
    Preview of main (download for full driver set):
    //Author: Nathan Zimmerman //Date: 3/2/14 // Driver referenced from Brad S, supreme overlord of all C //Launchpad CCS example of NRF24L Driver. Use P1.3 Button to toggle LED on other launchpad. Hence requires 2 NRF modules & 2 launchpads //Note example uses a fixed packet length of 5. //GPIO Pinouts //P2.0 = IRQ //P2.1 = CSN //P2.2 = CE //P1.5 SCLK //P1.6 MISO //P1.7 MOSI //P1.3 Button Launchpad Rev 1.5 //P1.0 Red LED Launchpad Rev 1.5 #include "msp430g2553.h" #include "stdint.h" #include "Drivers/rtc.h" #include "Drivers/clock.h" #include "Drivers/usi.h" #include "Drivers/External/NRF24L.h" #include "Drivers/External/LAUNCHPAD_IO.h" const uint8_t txMessage[PAYLOAD_WIDTH]= "Hello"; void main(void) {     uint8_t rxbuffer[PAYLOAD_WIDTH] = {0,0,0,0,0};     volatile uint8_t statusData = 0;     disableWDT();     setupCoreClock(CLK_16_MHZ);     setupRLED();     RLED_OFF;     setupButton();     SERIAL_CLASSES spiHandle = { SPI, SMCLK_16MHZ_SPI_CLK_4MHZ, MODULE_B}; // NRF cannot run at max baud 16mhz     initUSI(&spiHandle);     initNRF24L();     statusData = getNrfStatus();     if(statusData != 0x0E)     {         while(1); // NRF failed to init, check pinout or device     }     while(1)     {         if(recievedRfData())         {             getRfBuffer(rxbuffer);             if(rxbuffer[0]=='H') // newb check for "Hello" Message             {                 RLED_TOGGLE;             }         }         if(buttonPressed)         {             transmitTxData((uint8_t *)txMessage);             _delay_cycles(16000000); // newb button debounce         }         handleRxData();         handleTxData();     } }   NRF_Example_NateZ.zip
     
     
     
  5. Like
    username got a reaction from RROMANO001 in Who is using MSP430G2553?   
    For hobby use with low pin counts, yes, always G2553. For commercial use or if more pins are needed, I go with freescale MCUs or whatever i'm forced to use. Yes, I likewise hate the arduino 5V... 3.3V is fine for me in every application even in low power.
  6. Like
    username got a reaction from Camohe90 in MSP430+CC2500 board   
    Hey all,
     
    Been awhile since i've posted something. Here was a small portable 2.4GHz transceiver(CC2500) that I made. This can operate via battery or USB power. USB charges the battery. Has reverse + UVLO + OCLO protection (hence all the transistors on the right portion of the board).

    Here is a closeup of the RF chain. I used an integrated balun to reduce component counts. I use a 0603 tripad to switch RF output between SMA & chip antenna (unpopulated in pic). I used a coplanar waveguide as a TL.

    System seemed to be fairly efficient. I get 2.4dBm output power when using the 0 dBm power settings. If i'm not mistaken, TI uses a dev board to measure their power output after discrete balun to SMA. Consequently, I assume the insertion loss of the integrated balun is less than their discrete balun. Someone correct me on that if i'm wrong, i'd be interested to know. I've always wondered on how one would go about verifying a discrete balun. 

    Sorry, source files are not available. If ya know what your doing, the pictures are all ya need. XD 
  7. Like
    username reacted to Lgbeno in Sensorless BLDC motor control   
  8. Like
    username got a reaction from bluehash in MSP430+CC2500 board   
    Hey all,
     
    Been awhile since i've posted something. Here was a small portable 2.4GHz transceiver(CC2500) that I made. This can operate via battery or USB power. USB charges the battery. Has reverse + UVLO + OCLO protection (hence all the transistors on the right portion of the board).

    Here is a closeup of the RF chain. I used an integrated balun to reduce component counts. I use a 0603 tripad to switch RF output between SMA & chip antenna (unpopulated in pic). I used a coplanar waveguide as a TL.

    System seemed to be fairly efficient. I get 2.4dBm output power when using the 0 dBm power settings. If i'm not mistaken, TI uses a dev board to measure their power output after discrete balun to SMA. Consequently, I assume the insertion loss of the integrated balun is less than their discrete balun. Someone correct me on that if i'm wrong, i'd be interested to know. I've always wondered on how one would go about verifying a discrete balun. 

    Sorry, source files are not available. If ya know what your doing, the pictures are all ya need. XD 
  9. Like
    username got a reaction from JonnyBoats in DAC GUI V2   
    Hey all,
     
    Round 2: This extends the peripherals of the MSP430 to a UART based ascii AT command set. For example, send "AT+GET_ADC" over the USB->Serial bridge to get all the ADC values returned. Since I released my first GUI there have been a couple others like it. You will find that this version's strength is that the underlying C driver set is my personal driver set which is quite powerful XD . I then wrote a C# GUI as a wrapper around this command set.
     
    Features Implemented: Digital IO, Analog I, PWM, SPI

     
    PWM Example:

     
    Steps to use:
    1. Download code & .exe file here: https://github.com/NateZimmer/ICBM
    2. Import C code into CCSV5.1 (haven't tested with other versions) and flash to launchpad.
    3. Ensure UART jumpers on the MSP430 Launchpad are set to Hardware based UART on a msp430g2553 launchpad Rev 1.5
    4. Run GUI and connect to launchpad.
    5. Enjoy!
     
    Skip to 10:35 for setup instructions:
     
     


     
    Todo:
    Implement DCO Calibration for better CLK accuracy
    Implement I2C
    Implement Graphing/Logging
    Implement more flexible spi chip select features
     
    Please let me know if this does not work for you
  10. Like
    username reacted to spirilis in Voltage regulator 12vdc to 3.3vdc   
    I typically use these for such applications-
     
    http://www.mouser.com/ProductDetail/Murata-Power-Solutions/OKI-78SR-33-15-W36-C/?qs=sGAEpiMZZMt6Q9lZSPl3RZClZUSM9XSruU79hDuX5cI%3d
     
    Switching type regulator, so much less heat.  Rated up to 36V, designed for nominal 12V or 24V applications (Vin(MIN) = 7V fyi)
     
    Fwiw- I have one of the 5V versions of this in my wife's car running an arduino-based project that has been running continuously for some 2.5 years now... it works great.
    I did end up putting a filter cap and fuse in-line before the regulator after doing some research into alternator load dumps and the high voltages possible with alternators & noise and such.  Can't recall the exact values for all of them, but one piece involved a 1uF high voltage rated film cap.  Should be high voltage rated anyhow (150-250V or so to cover the worst case scenario).  Then a TVS diode and fuse to blow in case you get such a massive dump.
  11. Like
    username reacted to Lgbeno in analog.io   
    Hi Everyone,
     
    Awhile back I posted some info on a project that I was working on called imp.guru.  Basically it was a plotting front end for data.sparkfun.com where you can enter your stream public key and then plot data.  In my mind imp.guru was pretty successful, so far users have added  219 streams, some of then receiving more than 2000 views and the site gets about 100 visits per day.  That's nothing for most other web apps but considering that I haven't really done that much marketing, I think that it is a success, especially for what I would consider a "Minimum Viable Product"
     
    Anyway, for the last 4 months I've been working on a new site called analog.io.  I'm getting ready to release it to the public but want to get a few more users involved.  @@cubeberg has been already using it for some time and as far as I know, I think that he is liking it:
    http://forum.43oh.com/topic/5851-wireless-security-system-iot/#entry54389
     
    I definitely wouldn't say that it is perfect but I really need some more beta users to help me prioritize the next set of features.  If anyone is interested in signing up, please give it a try at the following link:
    http://analog.io/users/sign_up
     
    One thing that is lacking right now is marketing content for the site, I'm still figuring out how I want to present it concisely.  But I'm attaching some screen shots so you can know what it is like before signing up.
     
    One other note that makes analog.io totally different than any other IoT cloud service is that it has a distributed backend based on the open source library called phant.  What that means is that you can run a phant server on any hardware that you would like and analog.io can connect to it.  You could even host Phant on Raspberry Pi or a Beagle Bone and never let the data leave your LAN.  I'd definitely be interested in individuals who would like to test that out.
     
    Otherwise there are other fun things as well such as iPython notebooks for doing data processing in the cloud and the ability to host your own isolated phant server on a dedicated Virtual Private server.
     
    Very interested in your questions and comments!
     
    -Luke
     

     

     

     

     
     
  12. Like
    username got a reaction from tripwire in What am I going to do with ...   
    Hmmm.... in the spirit of 43oh you could make 229 balls of fire demonstrating your fierce loyalty towards the msp430
  13. Like
    username got a reaction from pine in What am I going to do with ...   
    Hmmm.... in the spirit of 43oh you could make 229 balls of fire demonstrating your fierce loyalty towards the msp430
  14. Like
    username got a reaction from spirilis in What am I going to do with ...   
    Hmmm.... in the spirit of 43oh you could make 229 balls of fire demonstrating your fierce loyalty towards the msp430
  15. Like
    username got a reaction from RobG in What am I going to do with ...   
    Hmmm.... in the spirit of 43oh you could make 229 balls of fire demonstrating your fierce loyalty towards the msp430
  16. Like
    username got a reaction from bluehash in Board Offline   
    Happy to see it back up, thanks for maintaining the site!
  17. Like
    username reacted to bluehash in Board Offline   
    Hello All,
    I'm taking the board offline for the night. Too many double/triple/quad posts. Need to figure out what is going on. 
    Earlier in the day, spam comments took down the main blog. Will keep updated.
  18. Like
    username got a reaction from sagarika36 in HC - SR04 Ultrasound Module Driver Code   
    The trig pin on the module wants to see a 0-5V digital input. The msp430 only has a 3.6V input max. That mosfet works as a 3.6V to 5V converter. Since its a 5V module I did this to be safe though i'm not sure its required. It might tolerate lower voltage inputs. Use any basic mosfet that can handle a 3.6V gate voltage. A 2n7007 is a basic FET that should work.
    As for how a mosfet works, see wikipedia.
    If your asking as to how the trig pin works on the module, see the module datasheet.
  19. Like
    username got a reaction from abecedarian in MSP430 Nixie Clock   
    3 hr to build and looks great! Note, you can download instructions on RobG's Tindie page and they are quite nice!
     

     
    Thanks RobG
  20. Like
    username got a reaction from RobG in MSP430 Nixie Clock   
    3 hr to build and looks great! Note, you can download instructions on RobG's Tindie page and they are quite nice!
     

     
    Thanks RobG
  21. Like
    username got a reaction from Donny M. Carter in MSP430 Nixie Clock   
    3 hr to build and looks great! Note, you can download instructions on RobG's Tindie page and they are quite nice!
     

     
    Thanks RobG
  22. Like
    username got a reaction from sagarika36 in HC - SR04 Ultrasound Module Driver Code   
    1MHz clock makes math easy, no other reason. Yes the mosfet can generate a 5V pulse with the circuit shown. Yes, you should be able to port this to other MCUs though if their core clocks are different you may have to tweak the math to get the proper distance.
  23. Like
    username got a reaction from RobG in MSP430 Nixie Clock   
    awww this makes it harder to use the additional shocking features
    none the less, please take my money
  24. Like
    username reacted to RobG in MSP430 Nixie Clock   
    This is how the display case option will look like.
    Standoffs will be white nylon, not brass. Screws will be silver.
    Faceplate can be used in 2 different ways, horizontal and vertical.
     

  25. Like
    username reacted to RobG in MSP430 Nixie Clock   
    Are you kitting me?
     
    Yes, yes I am!
     

     

     
    BTW, I will also have Nixie tube power supply kits.
     

     
     
     
     
×
×
  • Create New...