Jump to content
Forum sending old emails Read more... ×

Search the Community

Showing results for tags 'msp430g2553'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Calendars

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests


Sparkfun


Github

Found 142 results

  1. muzay

    dual channel ADC conversion

    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...
  2. here in florida, just saying hi!!! :wave: more development on the way.
  3. sandbox

    SPI on portA

    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
  4. tempest690

    Storing IR codes in flash memory

    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 :
  5. 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.
  6. kuldeepdhaka

    Driving SSD1289 using MSP430 and 74xx595

    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.
  7. 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!
  8. 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)
  9. 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
  10. AMPS

    Ananlog refernce pIN

    Dear all, Please let me know which is analog refernce pin MSP430g2553. How to configured iN Energia IDE.
  11. AMPS

    mstimer2

    Dear all, Is there any liberary for Energia similar to beolw liberary in arduino http://playground.arduino.cc/Main/MsTimer2
  12. legailutin

    Yet Another Wireless Sensor Board

    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
  13. chipi92

    RGB Led IR Library PWM problem

    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
  14. GG430

    Sundial - Kids Clock with LEDs

    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.
  15. 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
  16. 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.
  17. actionjais

    Voltage measurement

    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
×