Jump to content

Search the Community

Showing results for tags 'msp430g2553'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 150 results

  1. I am new to launchpad and I've been trying to use the booster pack CC110L with no results. I am using the follwing: LaunchPad MSP430G2 (1.5) MSP430G2553 Anaren CC110L BoosterPack Energia 11 Windows 7 64-bit I am trying to run the example WirelessControl but i keep getting a huge error wihich at the end says: \energia0101E0011windows\energia0101E0011\hardware\msp430\libraries\AIR430BoostEuropeETSI\utility\Platform.cpp:114:28: error: 'SPIMISO_SET_MODE' was not declared in this scope Any ideas of what the problem could be??
  2. Hellow! First, sorry for my english. Second, I have one question. Can I set the baudrate in my MSP430G2553 more than 9600? In Arduino I can write the command "Serial.begin(115200)", but in Energia it doesn't work Can you tell me what I do wrong? Thanks!
  3. I couldn't find an example of someone using the Raspberry Pi as a receiving hub for sensor nodes that use the spirilis nRF24L01+ library and a MSP430G2553. I thought I would give it a shot since I think this would be beneficial to the community. I found a C library for the Raspberry Pi and nRF24L01+: https://github.com/stanleyseow/RF24. Class reference is here: http://maniacbug.github.io/RF24/classRF24.html There is also a newer python library but I haven
  4. Hi all, I would like to interface an I2C ADC (PCF8591) for one of my application. I have tried a lot with the sample programs. But still my launchpad is not even generating the clock pulse. Can anybody help me.
  5. Hello, I`m trying to use PCF8574N with the MSP430G2553, but with no luck so far. I tried several examples but nothing seems to work. Basically, what i`m trying to do is light up a selected number of LEDs using the PCF8574N, but no matter the value I use in the UCB0TXBUF, P0 to P7 are always on HIGH, please see the code below: #include <msp430.h> int main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop Watchdog Timer P1SEL |= BIT6 + BIT7; // Assign I2C pins to USCI_B0 P1SEL2|= BIT6 + BIT7; // Assign I2C pins to USCI_B0 UCB0CTL1 |= UCSWRST; // Enable SW reset UCB0CTL0 = UCMST+UCMODE_3+UCSYNC; // I2C Master, synchronous mode UCB0CTL1 = UCSSEL_2+UCSWRST; // Use SMCLK, keep SW reset UCB0BR0 = 12; // fSCL = SMCLK/12 = ~100kHz UCB0BR1 = 0; UCB0I2CSA = 0x20; // Set slave address UCB0CTL1 &= ~UCSWRST; // Clear SW reset, resume operation IE2 |= UCB0RXIE; // Enable RX interrupt TACCTL0 = CCIE; // TACCR0 interrupt enabled TACTL = TASSEL_2 + MC_2; // SMCLK, contmode while (1) { __bis_SR_register(CPUOFF + GIE); // CPU off, interrupts enabled UCB0CTL1 |= UCTR + UCTXSTT; // I2C TX, start condition __bis_SR_register(CPUOFF + GIE); // CPU off, interrupts enabled while (UCB0CTL1 & UCTXSTT); // Loop until I2C STT is sent UCB0TXBUF = 0x01; //send command byte while(!(UCB0TXIFG)){;} //wait for transmission to finish //UCB0CTL1 |= UCTXSTP; // I2C stop condition after 1st TX } } #pragma vector = TIMER0_A0_VECTOR __interrupt void TA0_ISR(void) { __bic_SR_register_on_exit(CPUOFF); // Exit LPM0 } I removed the P1.6 LED Jumper too. I'm really new to MSP430, so if someone could point out what is wrong with the code, or recommend some other code that I could use as example, I would really appreciate it. Thank you,
  6. Hello, I try to write my own library for the MSP430G2553 and and the 2.2" ILI9341 display. I know RobG has made one but this project is basically for learning about LCDs and SPI. I took the code from http://www.elecfreaks.com/wiki/index.php?title=2.2S%22_TFT_LCD:_TFT01-2.2S and modified it for the MSP430G2553. It worked fine but only as solftware SPI. Now I want to use the hardware SPI. Here ist my code: #include <msp430g2553.h> #define LCD_MISO BIT1 #define LCD_CLK BIT4 #define LCD_MOSI BIT2 #define LCD_DC BIT0 #define LCD_CS BIT3 #define LCD_REST BIT5 void LCD_Writ_Bus(char data) { P1OUT &= ~LCD_CS; UCA0TXBUF = data; //while(UCA0TXBUF); //while(UCA0TXIFG & UC0IFG); while (UCA0STAT & UCBUSY); //_delay_cycles(120000); P1OUT |= LCD_CS; } void LCD_Write_COM(char VL) { P1OUT &= ~LCD_DC; LCD_Writ_Bus(VL); } void LCD_Write_DATA(char VL) { P1OUT |= LCD_DC; LCD_Writ_Bus(VL); } void Address_set(unsigned int x1,unsigned int y1,unsigned int x2,unsigned int y2) { LCD_Write_COM(0x2a); LCD_Write_DATA(x1>>8); LCD_Write_DATA(x1); LCD_Write_DATA(x2>>8); LCD_Write_DATA(x2); LCD_Write_COM(0x2b); LCD_Write_DATA(y1>>8); LCD_Write_DATA(y1); LCD_Write_DATA(y2>>8); LCD_Write_DATA(y2); LCD_Write_COM(0x2C); } void LCD_Init(void) { P1OUT &= ~LCD_REST; _delay_cycles(120000); P1OUT |= LCD_REST; _delay_cycles(120000); LCD_Write_COM(0xCB);//Power control A LCD_Write_DATA(0x39); LCD_Write_DATA(0x2C); LCD_Write_DATA(0x00); LCD_Write_DATA(0x34); LCD_Write_DATA(0x02); LCD_Write_COM(0xCF);//Power control B LCD_Write_DATA(0x00); LCD_Write_DATA(0XC1); LCD_Write_DATA(0X30); LCD_Write_COM(0xE8);//Driver timing control A LCD_Write_DATA(0x85); LCD_Write_DATA(0x00); LCD_Write_DATA(0x78); LCD_Write_COM(0xEA);//Driver timing control B LCD_Write_DATA(0x00); LCD_Write_DATA(0x00); LCD_Write_COM(0xED);//Power on sequence control LCD_Write_DATA(0x64); LCD_Write_DATA(0x03); LCD_Write_DATA(0X12); LCD_Write_DATA(0X81); LCD_Write_COM(0xF7);//Enable 3G LCD_Write_DATA(0x20); LCD_Write_COM(0xC0); //Power control LCD_Write_DATA(0x23); //VRH[5:0] LCD_Write_COM(0xC1); //Power control LCD_Write_DATA(0x10); //SAP[2:0];BT[3:0] LCD_Write_COM(0xC5); //VCM control LCD_Write_DATA(0x3e); //Contrast LCD_Write_DATA(0x28); LCD_Write_COM(0xC7); //VCM control2 LCD_Write_DATA(0x86); //-- LCD_Write_COM(0x36); // Memory Access Control LCD_Write_DATA(0x48); //C8 LCD_Write_COM(0x3A);//COLMOD: Pixel Format Set LCD_Write_DATA(0x55); LCD_Write_COM(0xB1);//Frame Rate Control (In Normal Mode/Full Colors) LCD_Write_DATA(0x00); LCD_Write_DATA(0x18); LCD_Write_COM(0xB6); // Display Function Control LCD_Write_DATA(0x08); LCD_Write_DATA(0x82); LCD_Write_DATA(0x27); LCD_Write_COM(0x11); //Exit Sleep _delay_cycles(120000); LCD_Write_COM(0x29); //Display on LCD_Write_COM(0x2c); } void Pant(char VL) { int i,j; Address_set(0,0,240,320); for(i=0;i<320;i++) { for (j=0;j<480;j++) { LCD_Write_DATA(VL); } } } void loop() { Pant(0xFF); Pant(0xF0); Pant(0xE0); Pant(0x05); Pant(0x1F); Pant(0x00); } void main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer BCSCTL1 = CALBC1_12MHZ; // Set range DCOCTL = CALDCO_12MHZ; BCSCTL2 = 0; //Port1(ILI9341) P1DIR = LCD_DC + LCD_CS + LCD_REST; P1OUT = LCD_CS; P1SEL = LCD_MISO + LCD_CLK + LCD_MOSI; P1SEL2 = LCD_MISO + LCD_CLK + LCD_MOSI; UCA0CTL0 = UCMSB + UCMST + UCMODE_1; // 4-pin, 8-bit SPI master UCA0CTL1 = UCSSEL_2; // SMCLK UCA0BR0 = 3; // UCA0BR1 = 0; // //UCA0MCTL = 0; // No modulation UCA0CTL1 &= ~UCSWRST; LCD_Init(); loop(); while(1); } Nothing happens and I have no idea why ...
  7. srv


    i am using MSP430G2 launchpad with MSP430G2553 controller.but when i program it and make a pin high i am getting 1.4-1.6 v only please help.
  8. Hi I'm wondering if there's a way to create multiple threads on an msp430g2553 or msp430g2452 using Energia. My project is to try to get software PWM, so I need to create a loop to turn the pin on and off at the correct times, but in a different thread. Thanks in advance!
  9. hi everyone, i'm sampling from single channel ADC and send the data over UART. now i need to two channel simultaneously and send the data. for one channel my code is below: ----------------------------------------------- ADC10CTL1 = INCH_5 + ADC10DIV_3 ; // Channel 5, ADC10CLK/4 ADC10CTL0 = SREF_0 + ADC10SHT_3 + ADC10ON + ADC10IE; //Vcc & Vss as reference ADC10AE0 |= BIT5; ADC10CTL0 |= ENC + ADC10SC; // Sampling and conversion start, single measure! while(1) { if(!((P1IN & BUTTON)==BUTTON)) { ADC10CTL0 |= ENC + ADC10SC; value1 = ADC10MEM>>2; // used only 8 bits of 10bits adc conversion... while ((UCA0STAT & UCBUSY)); // Wait if line TX/RX module is busy with data UCA0TXBUF = value1; } } } ------------------------------------------------- can you please help me to make following changes... i need to use p1.4 and p1.5 for ADC conversion (two channel), and the ADC referance voltage should be 2.5V or lower. thank you all...
  10. here in florida, just saying hi!!! :wave: more development on the way.
  11. Hi All, I am trying to use the MSP430G2553 on a TI -Launchpad to Communicate with a bunch of sensors, My problem is that i need to use I2C for one (eeprom) and SPI for another (display LCD). But according to the energia pin mapping here, the I2C pins and the SPI are on the same pins (p1_7 (UCB0SOMI) and p1_6 (UCB0SIMO)). How do i shift the MISO and MOSI pins to p1_1 and p1_2 , i know its supported by the G2553 hardware since the pins correspond to UCA0SOMI UCA0SIMO. Can someone please point me to the changes i need to make in the Energia core for this to happen? Please help... Thanks in advance, sandbox
  12. Hi, i'm trying to make IR controlled relay board with programmable button to change IR remote codes, The IRremote library returning decoded infrared values in unsigned long type, when i try to write raw code in flash memory (energia mspflash.h library ) i get result similar to :
  13. Hi When trying to run following code, I can send the first integer "1" but if I continue after that, it just doesnt send anything back. However, with an Arduino UNO this code works 100%. How can I fix that? I hope somebody can try that for me, so I can confirm that it's the hardware/library and not the code. void setup() { Serial.begin(9600); } void loop() { if( Serial.available() > 0 ) { int inc = Serial.parseInt(); if(inc == 1) { int temp = analogRead(0); int pressure = analogRead(1); String t_str = String(temp); String p_str = String(pressure); String string = t_str + "#" + p_str + "."; Serial.println(string); } } } Thanks in advance.
  14. i did some work on SSD1289 (3.2" 320x240) Im using two 74xx595 IC for data lines (to save pins). here's the repo: https://github.com/kuldeepdhaka/bitbang-ssd1289-using-msp430g2553 schematics : .../doc/schematics TODO: driver for touchscreen not working. PENIRQ is working perfect. Compiler: msp430-gcc note for admin: i wasnt able to upload svg file (tried twice, "This upload failed") , is their any problem with svg's.
  15. Hello everyone! I'm continuing my project of creating an RGB LED matrix capable of displaying live images being transmitted from a laptop via a serial cable to the MSP430G2553. At the moment, I'm coding four 8x8 Common Anode RGB LED matrices joined together to create a 16x16 display. Hardware I'm using: - 3 * TLC5940s (one for each colour) - 2 * 74HC595 shift registers (drives the columns/anodes) I'm using code provided by RobG from this link <http://forum.43oh.com/topic/2315-tlc5940-examples/> and this one <http://forum.43oh.com/topic/3328-rgb-to-hsv-conversion-with-msp430g2231-help/#entry29106> in order to drive the LEDs with PWM enabled. BUT, the problem I'm having is that I'm trying to allow every pixel to have different colours, but when running, the microcontroller isn't refreshing the pixels fast enough so there is MASSIVE flickering - which isn't ideal.... Here is the code from which I am working : feel free to insult :-P #include <msp430g2553.h> #include <msp430.h> // Need to sort hsv2rgb because yellow is pish... // u_long is 32 bits so 2^32 - 1 is max value. Need more for 32x32 matrix // TLC inputs #define VPRG_PIN BIT0 // TIE TO GND? #define GSCLK_PIN BIT4 #define SCLK_PIN BIT5 #define DATA BIT6 // DS -> 1.6 | 595 DATA PIN #define MOSI_PIN BIT7 #define MOSI595 BIT2 // 595 data pin ? THIS ISNT DOING ANYTHING #define DCPRG_PIN BIT0 // TIE IT TO GND? #define XLAT_PIN BIT1 #define BLANK_PIN BIT2 #define CLOCK BIT3 // SH 11 -> 2.3 // 595 OUTPUTS #define LATCH BIT4 // ST 12 -> 2.4t typedef unsigned char u_char; typedef unsigned int u_int; typedef unsigned short u_short; typedef unsigned long u_long; // ================================// // Prototypes // // ================================// void init( void ); void SPI_setup( void ); void updateTLC( void ); void shiftOut( u_long ); void HSV2RGB( u_short*, u_short*, u_short*, short, u_char); void set_row_char_hue (u_char, u_long, short, u_char); void row_refresh(u_char,short,short,short,short,short,short,short,short,short,short,short,short,short,short,short,short); #define NUMBER_OF_OUTS 48 // TLC OUTPUTS #define NUMBER_OF_ROWS 8 #define NUMBER_OF_COLUMNS 16 #define max_COLUMN NUMBER_OF_COLUMNS-1 #define max_ROW NUMBER_OF_ROWS-1 #define OFF 0 u_short leds[NUMBER_OF_OUTS]; // 0 - 15 Red Rows, 16 - 31 Blue Rows, 32 - 47 Green Rows {0, } u_char timerCounter = 0; void init(void) { WDTCTL = WDTPW + WDTHOLD; // disable WDT BCSCTL1 = CALBC1_16MHZ; // 16MHz clock DCOCTL = CALDCO_16MHZ; BCSCTL2 |= DIVS_0; // divide clock by 1 P1OUT &= ~(VPRG_PIN); P1DIR |= (VPRG_PIN + GSCLK_PIN + DATA); // port 1.4 configured as SMCLK out P1SEL |= GSCLK_PIN; P2DIR |= (BLANK_PIN + XLAT_PIN + CLOCK + LATCH + DCPRG_PIN); P2OUT &= ~(BLANK_PIN + XLAT_PIN); P2OUT &= ~DCPRG_PIN; // setup timer CCR0 = 0xFFF; TACTL = TASSEL_2 + MC_1 + ID_0; // SMCLK, up mode, 1:1 CCTL0 = CCIE; // CCR0 interrupt enabled } void SPI_setup(void) { // setup UCA0 ----UCA0 ISNT DOING ANYTHING YET! SHOULD I CONFIGURE THE 595's TO BE CONTROLLED BY SPI? P1SEL |= MOSI595; // p1.2 P1SEL2 |= MOSI595; // UCA0SIMO UCA0CTL0 = UCCKPH + UCMSB + UCMST + UCSYNC; // data captured on 1st UCLK edge/changed on follwing edge, MSB first, master, 3-pin SPI,synchronous UCA0CTL1 |= UCSSEL_2; // SMCLK UCA0BR0 |= 0x01; // 1:1 UCA0BR1 = 0; UCA0CTL1 &= ~UCSWRST; // clear SW // setup UCB0 P1SEL |= SCLK_PIN + MOSI_PIN; // pins 5 + 7 P1SEL2 |= SCLK_PIN + MOSI_PIN; // UCB0CLK + UCB0SIMO UCB0CTL0 = UCCKPH + UCMSB + UCMST + UCSYNC; // data captured on 1st UCLK edge/changed on follwing edge, MSB first, master, 3-pin SPI,synchronous UCB0CTL1 |= UCSSEL_2; // SMCLK UCB0BR0 |= 0x01; // 1:1 UCB0BR1 = 0; UCB0CTL1 &= ~UCSWRST; // clear SW } void main(void) { init(); SPI_setup(); updateTLC(); P2OUT |= (XLAT_PIN); P2OUT &= ~(XLAT_PIN); short o = 240; short y = 60; // yellow short b = 240; // blue short hue = 0; _bis_SR_register(GIE); for(; { // creates box image row_refresh(0, b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,; row_refresh(1, b,y,y,y,y,y,y,y,y,y,y,y,y,y,y,; row_refresh(2, b,y,b,b,b,b,b,b,b,b,b,b,b,b,y,; row_refresh(3, b,y,b,y,y,y,y,y,y,y,y,y,y,b,y,; row_refresh(4, b,y,b,y,b,b,b,b,b,b,b,b,y,b,y,; row_refresh(5, b,y,b,y,b,y,y,y,y,y,y,b,y,b,y,; row_refresh(6, b,y,b,y,b,y,b,b,b,b,y,b,y,b,y,; row_refresh(7, b,y,b,y,b,y,b,y,y,b,y,b,y,b,y,; row_refresh(8, b,y,b,y,b,y,b,y,y,b,y,b,y,b,y,; row_refresh(9, b,y,b,y,b,y,b,b,b,b,y,b,y,b,y,; row_refresh(10, b,y,b,y,b,y,y,y,y,y,y,b,y,b,y,; row_refresh(11, b,y,b,y,b,b,b,b,b,b,b,b,y,b,y,; row_refresh(12, b,y,b,y,y,y,y,y,y,y,y,y,y,b,y,; row_refresh(13, b,y,b,b,b,b,b,b,b,b,b,b,b,b,y,; row_refresh(14, b,y,y,y,y,y,y,y,y,y,y,y,y,y,y,; row_refresh(15, b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,; _bis_SR_register(LPM0_bits); // go to sleep } // end of for(; loop } void updateTLC(void) // RobG's code { u_char ledCounter = NUMBER_OF_OUTS >> 1; while (ledCounter-- > 0) { u_char i = ledCounter << 1; UCB0TXBUF = leds[i + 1] >> 4; while (!(IFG2 & UCB0TXIFG)); // TX buffer ready? u_char unib = leds[i + 1] << 4; u_char lnib = (leds[i] >> 8) & 0x0F; UCB0TXBUF = unib | lnib; while (!(IFG2 & UCB0TXIFG)) ; // TX buffer ready? UCB0TXBUF = leds[i]; while (!(IFG2 & UCB0TXIFG)); // TX buffer ready? } } void row_refresh(u_char row,short a,short b,short c,short d,short e,short f,short g,short h,short i,short j,short k,short l,short m,short n,short o,short p) { // this function checks if led is supposed to be ON // for example, if row = 0, and a = 360 then the top left led is OFF // if a = 120, then the led will be ON, and will be assigned the appropriate hue (green) u_long col_data = 0x0000; if(a < 360){col_data = 0x8000; set_row_char_hue(row,col_data,a,1);} // 0 if(b < 360){col_data = 0x4000; set_row_char_hue(row,col_data,b,1);} // 1 if(c < 360){col_data = 0x2000; set_row_char_hue(row,col_data,c,1);} // 2 if(d < 360){col_data = 0x1000; set_row_char_hue(row,col_data,d,1);} // 3 if(e < 360){col_data = 0x0800; set_row_char_hue(row,col_data,e,1);} // 4 if(f < 360){col_data = 0x0400; set_row_char_hue(row,col_data,f,1);} // 5 if(g < 360){col_data = 0x0200; set_row_char_hue(row,col_data,g,1);} // 6 if(h < 360){col_data = 0x0100; set_row_char_hue(row,col_data,h,1);} // 7 if(i < 360){col_data = 0x0080; set_row_char_hue(row,col_data,i,1);} // 8 if(j < 360){col_data = 0x0040; set_row_char_hue(row,col_data,j,1);} // 9 if(k < 360){col_data = 0x0020; set_row_char_hue(row,col_data,k,1);} // 10 if(l < 360){col_data = 0x0010; set_row_char_hue(row,col_data,l,1);} // 11 if(m < 360){col_data = 0x0008; set_row_char_hue(row,col_data,m,1);} // 12 if(n < 360){col_data = 0x0004; set_row_char_hue(row,col_data,n,1);} // 13 if(o < 360){col_data = 0x0002; set_row_char_hue(row,col_data,o,1);} // 14 if(p < 360){col_data = 0x0001; set_row_char_hue(row,col_data,p,1);} // 15 } void set_row_char_hue (u_char row, u_long col_data, short hue, u_char bool) { u_char led = 0; u_long byte; for(led = 0 ; led < 16 ; led++ ) { byte = (col_data>>led)&(0x01); if( byte ) { HSV2RGB( &leds[row], &leds[row + 32], &leds[row + 16], hue, bool); //on; shiftOut( col_data ); } } // turn off leds leds[row] = OFF; leds[row+32] = OFF; leds[row+16] = OFF; } void HSV2RGB(u_short* r, u_short* g, u_short* b, short h, u_char bool) { const u_char s = 255; u_char v = 255; u_char i, p, q, t; u_short fs; if (h < 60 ) i = 0; else if (h < 120) i = 1; else if (h < 180) i = 2; else if (h < 240) i = 3; else if (h < 300) i = 4; else if (h < 360) i = 5; else return; fs = ((h - i * 60) * s)/ 60; p = 255 - s; q = 255 - fs; t = 255 - s + fs; switch(i) { case 0: *r = 255;*g = t;*b = p;break; case 1: *r = q;*g = 255;*b = p;break; case 2: *r = p;*g = 255;*b = t;break; case 3: *r = p;*g = q;*b = 255;break; case 4: *r = t;*g = p;*b = 255;break; case 5: *r = 255;*g = p;*b = q;break; } if ( bool == 1 ) { *r *= v/16; *g *= v/16; *b *= v/16; } else { *r *= 0; *g *= 0; *b *= 0; } } #pragma vector = TIMER0_A0_VECTOR __interrupt void Timer_A0(void) { // 4096 GS clock cycles have been generated, time to restart PWM P2OUT |= (BLANK_PIN); P2OUT |= (XLAT_PIN); P2OUT &= ~(XLAT_PIN); P2OUT &= ~(BLANK_PIN); // increase timer counter timerCounter++; if (timerCounter == 1) // this is also from RobG, except updateTLC is every interrupt because otherwise it is far too slow { // is it time to for next frame? updateTLC(); // data was already prepared by main loop when it was awake last time timerCounter = 0; _bic_SR_register_on_exit(LPM0_bits); // wake up main loop so that it can prepare data for the next frame } } void shiftOut(u_long val) { P2OUT &= ~LATCH; int i; for (i = 0; i < 16; i++) // iterate over each bit 16 { if(val & (1 << i)) { P1OUT |= DATA; } else { P1OUT &= ~DATA; } P2OUT |= CLOCK; // PULSE CLOCK P2OUT ^= CLOCK; } // } P2OUT |= LATCH; // PULSE LATCH P2OUT &= ~LATCH; } If anyone has any suggestions on how to improve this code, it will be greatly appreciated, because I've really hit a wall with it. I did think that using SPI P1.2 for UCA0SIMO instead of the shiftOut() function might be a solution but I don't know how to go about doing that. Keep in mind that soon I'll be using P1.1 for RXD. Cheers!
  16. I'm trying to start working with a TI Launchpad on my Mac (I also have a Ubuntu virtual machine I can work in), and I want to program it in assembly using mspgcc. However, I'm getting confused with a lot of the information I'm finding about how to actually write code for this! Any assembly tutorials I find (even in the MSP430 Microcrontroller Basics book) use references such as #WDTPW|WDTHOLD, &WDTCTL or &P2OUT, and whenever I try to compile assembly files with those, mspgcc throws a bunch of errors about how it can't refernce those. So, what is the best way for a beginner looking to program in assembly on a TI Launchpad to get started? What am I doing wrong when I compile all of these test files? (If I didn't provide enough information, feel free to ask for more)
  17. QUESTION: Any pointers as to why the Serial Port is grayed out on 64-bit Centos 6? In the next post, is my detailed installation log (with errors) - but here is a quick summary: I determined that I'm on 64-bit X86 Centos 6. I checked to see if the libusb drivers are installed. I checked to see what version of Java is installed. I checked to see how Java is configured. I downloaded the Energia Linux binary tarball (energia-0101E0009-linux.tgz) I untarred the Energia tarball to create an energia-0101E0009 directory. I ran the energia application. I set the board to msp430g2553 (16MHz) I failed at selecting the serial port because the selection was grayed out. I ran the default "Blink" procedure, which caused the board LEDs to blink. I modified the "Blink" procedure, and tested that it was working. I tried to open the Energia Serial Monitor - but failed. Googling for how to solve this problem, I added a udev file & rebooted. Googling further, I added user1 to the various groups and rebooted. Googling further, I obtained and compiled librxtx-master. I installed the EPEL rxtx using "sudo yum install rxtx". Yet, the serial port is still grayed out! Q: How do I diagnose WHY the MSP430 serial port is grayed out? Note: Searching this forum came up with this - but it doesn't seem to apply as it's on Windows: - serial port grayed out in IDE ver E0009
  18. Dear all, Please let me know which is analog refernce pin MSP430g2553. How to configured iN Energia IDE.
  19. AMPS


    Dear all, Is there any liberary for Energia similar to beolw liberary in arduino http://playground.arduino.cc/Main/MsTimer2
  20. Hi, I've finally found my "cahones" and decided to become a doer, and hopefully more active on the forum. I've been working on his for more than a year on my free time and have learned a lot. However, nothing real have come out of this project until recently. With the recent release of energia library for nRF24L01P by spirillis, I decided to restart working on it. Anyway. I'll post what I've done so far and move along with the suggestions. I'm a noob, so I've gone the noob way: Breadboarded first using what I had in my noob bin (msp430g2553 , nRF24l01P, ds18b20, thermistor, 7805, lm358, 9v battery, couple of resistors and capacitors) Used the launchpad schematics to get the components values. Board Layout with fritzing. Eagle was too complicated for me. Ordered the board thru Oshpark after exporting the gerbers. [ yay!!! I'm speaking like the pros :grin:) Programming with Energia, so far everything is going ok. I attached the fritzing file as well as the oshpark rendering of the board. Please, take a look, let me know where I've gone wrong. YAWSB.zip
  21. MSP430g2553 ALL DOCUMENTATION BELOW Playing with IR receiver (IR Library from Energia) and RGB led. I cant write analog values to my RGB led without breaking the program. I connected the three outputs to analogWrite capable pins. All works great when writing 0 or 255 but the library stop working well when i try to write other value to make the color less bright. Then i read about timers and PWM. I notice my library use Timer1_A so i need to connect leds to pins capable of analog writing but using Timer0_A. These pins were three, but one is RXD of Serial and messed things up. So I changed the library to use Timer0_A and connect leds to pins capable of analog writing but using Timer1_A. The program at the moment works nice, but again only with 0 or 255 values. BUT i noticed i can write other values to ONE of these pins, it dont breaks things. I wonder what could be the difference, with datasheet. The pins were: #define RED P2_1 #define GREEN P2_2 #define BLUE P2_4 ---> this works with values between 0 and 255 With datasheet i noticed pin P2_4 has "Out2 output", thats all difference i have found. BUT i put RED to P2_5 wich is "Out2 output" too and again it breaks things, while BLUE doesnt. All of these without knowing what can be out2 output. I miss something. Can you help me? I can give you more details if needed. EDITED: Individually, it works. Pins that are analogWrite capable and use T0_A are {2_1 - 2_2 - 2_4 - 2_5} DOCUMENTATION ABOUT: Problems with timers and IR library http://forum.43oh.com/topic/3550-ir-library-and-pwm/ Datasheet(page 6) http://www.ti.com/lit/ds/symlink/msp430g2553.pdf PinOUT https://www.dropbox.com/s/mcvbnkdpzsn1wna/LaunchPad%20MSP430G2553-V1.4.jpg
  22. In the past few month our older daughter woke up in the middle of the night once in a while. She didn't know whether it was late enough to get up and ready for Kindergarten. So she woke my wife and myself up and asked. Bad idea... I needed a solution for her without the need to read the clock. So I decided to build the "Sundial" clock for her 4th birthday. Well this idea came up maybe 2 month before her birthday. This brought me under pressure to complete it, but I had a good plan and it was ready the day before her birthday. It's driven by a MSP430G2553. It has one LED for the moon and one for the sun. The twelve LEDs for the clock are charlieplexed to four pins. The plexiglass is called endlighten and has some particles in it to enlight the entire area of the glass and not only the edges. The clock is off all the time. From 7am to 8am the sun and clock are on. From 6 to 7pm the moon and clock are on. Beside the moon is a capacitive sensing area behind the wood. It's just one button and turns on the clock and depending on the time 7am - 6pm the sun and 6pm - 7am the moon for 30 seconds. The video shows a bit of the details.
  23. Hi everyone, I'm hoping I can get some advice about my senior project. For my part of my project I have to connect my MSP430G2553 to an LCD display so I can display stuff like internal temperature and battery charge. I should be able to figure out how to read the inputs on my own. But my problem is that I have no idea which LCD to use. Its clear that it can be done with MSP430 devices, but how do I know which display to use with mine? Thanks
  24. Hello MSP430 Coders i have finished all the basic modules, now i stuck in to uart. i need some ideas from your side,( if possible please give me code also :-P ) my Launchpad send signal to print numbers like 1,2,3 ... for every 1 second delay, numbers should be printed in to hyper terminal. what will the pin connection for the launchpad, Jumper setting and the most important thing is how the launchpad will work. Thanks you all.
  25. Hi. Need a quick answer for this one please. I need to measure the StateOfCharge of a battery, preferably via the ADC (don't know if there are any other options). The SOC is going to decide whether to initiate charging or end charging, in another program that is already made. Would love a code example! Thx in advance Jais
  • Create New...