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

Search the Community

Showing results for tags 'problem'.

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 7 results

  1. JStat60

    Noise in ADC

    Hi, I have a non-profit (Smoky Mountain Scientific, smokymtsci.com) that develops and sells low cost instruments for science education. One of our instruments incorporates a Tiva-C launchpad that outputs a pwm voltage and measures voltage and current passed in electrochemical reactions. I recently purchased a fairly large batch of Tiva launchpads from Mouser and I am having trouble with noise in the analog read channels for about 1/4th of the boards. We have been building and selling these instruments for a couple of years now and have never had this problem before. To test the boards, I send a pwm signal through a simple low pass filter (a resistor and a capacitor) then read the output on two channels (A11 and A8). The attached figures show examples of output from a good (file Board46) and a bad (file Board37) boards as displayed on our user interface. This seems to be a hardware problem and I dont know how to go about resolving it. Any recommendations? Thanks, Jack
  2. Hello, I am using example code of energia Pfatfs library named "PFatFsfileTest". This program reads "T_READ.txt" file from sd card properly. But It can't write string "Hello world" 10 times to the file "T_WRITE.txt" into sd card. Instead, it just writes only "H". I am posting the original code of file below: /*----------------------------------------------------------------------*/ /* Petit FatFs sample project for generic uC (C)ChaN, 2010 */ /*----------------------------------------------------------------------*/ /* ported to Energia */ /* copy the two files t_read.txt and t_write.txt from the example folder in the root of the sd card*/ #include "SPI.h" #include "pfatfs.h" #define cs_pin 10 // chip select pin #define read_buffer 128 // size (in bytes) of read buffer unsigned short int bw, br;//, i; char buffer[read_buffer]; int rc; DIR dir; /* Directory object */ FILINFO fno; /* File information object */ void setup() { pinMode(PUSH2, INPUT_PULLUP); Serial.begin(9600); // initialize the serial terminal FatFs.begin(cs_pin); // initialize FatFS library calls } void die ( /* Stop with dying message */ int pff_err /* FatFs return value */ ) { Serial.println();Serial.print("Failed with rc=");Serial.print(pff_err,DEC); for (; ; } /*-----------------------------------------------------------------------*/ /* Program Main */ /*-----------------------------------------------------------------------*/ void loop() { Serial.println(); Serial.println("Press button to start..."); while(digitalRead(PUSH2)==1){} delay(100); while(digitalRead(PUSH2)==0){} Serial.println(); Serial.println("Open a test file (t_read.txt)."); delay(100); rc = FatFs.open("T_READ.TXT"); if (rc) die(rc); Serial.println(); Serial.println("Type the file content."); delay(100); for (; { rc = FatFs.read(buffer, sizeof(buffer), &br); /* Read a chunk of file */ if (rc || !br) break; /* Error or end of file */ for (uint16_t i = 0; i < br; i++) /* Type the data */ Serial.print(buffer[i]); delay(100); } if (rc) die(rc); Serial.println(); Serial.println("Open a file to write (t_write.txt)."); delay(100); rc = FatFs.open("T_WRITE.TXT"); if (rc) die(rc); Serial.println(); Serial.println("Write a text data. (10 x Hello world!)"); delay(100); bw=0; for (uint16_t i=0;i<10;i++) { rc = FatFs.write("Hello world!\r\n", 14, &bw); if (rc || !bw) break; } if (rc) die(rc); rc = FatFs.write(0, 0, &bw); //Finalize write if (rc) die(rc); delay(100); Serial.println(); Serial.println("Verify the write process (t_write.txt)."); delay(100); rc = FatFs.open("T_WRITE.TXT"); if (rc) die(rc); Serial.println(); Serial.println("Type the file content."); delay(100); for (; { rc = FatFs.read(buffer, sizeof(buffer), &br); /* Read a chunk of file */ if (rc || !br) break; /* Error or end of file */ for (uint16_t i = 0; i < br; i++) /* Type the data */ Serial.print(buffer[i]); delay(100); } if (rc) die(rc); Serial.println(); Serial.println("Open root directory."); delay(100); rc = FatFs.opendir(&dir, ""); if (rc) die(rc); Serial.println(); Serial.println("Directory listing..."); delay(100); for (; { rc = FatFs.readdir(&dir, &fno); /* Read a directory item */ if (rc || !fno.fname[0]) break; /* Error or end of dir */ if (fno.fattrib & AM_DIR) {Serial.print("<dir>\t"); Serial.println(fno.fname);delay(100);} else {Serial.print(fno.fsize);Serial.print("\t"); Serial.println(fno.fname);delay(100);} } if (rc) die(rc); Serial.println(); Serial.print("Test completed."); //for (; ; } and i am also posting my terminal output below: Press button to start... Open a test file (t_read.txt). Type the file content. abc Open a file to write (t_write.txt). Write a text data. (10 x Hello world!) Verify the write process (t_write.txt). Type the file content. H Open root directory. Directory listing... 3 T_READ.TXT 3858759679 m 3842012416 N 1409286144 EWTEX~1T.XT Test completed. Press button to start... Plz tell me the solution as soon as possible.
  3. Optronik

    Signs of external crystal failure

    I am currently working on a project that uses the external crystal for the watchdog timer and the internal DSO clock for all other tasks. The crystal is 32kHz. The watchdog timer interrupt is taking care of controlling the state machine in the main loop. At first sight everything looks ok. However, after a while (hours later) the controller (MSP430G2553) appears to be stuck. Closer investigation show that this is due to the watchdog timer interrupt not served, means that the 32Khz clock is not present. I already tried to play with the XTAL capacitor settings to no effect. I am wondering if scope measures could be done in order to see if there is something ongoing in the clock circuit that could point to an issue with the XTAL capacitors, driver circuit, parasitics, etc. However, I do not know what exactly to look for. Can anyone help me here?
  4. ive compiled and uploaded my code (below) and when plug my msp430g2553 in it goes to the programmed angle it should when plugged in, but when i run the exe that is supposed to change its angle it doesnt do anything. the exe is programmed to connect to com4, and the msp430 application uart is set to com4. i know the exe can detect it because it wont run unless it can, it just isnt responding. im am using energia 0101E0010 to compile and upload. any help would be appreciated. here is the code: #include <Servo.h> Servo myServo; const int servoPin = 9; // the pin the servo is connected to int val = 0; // a value accumulated from data on the serial port int angle = 90; // the current angle of the servo void setup() { Serial.begin(9600); myServo.attach(servoPin); myServo.write(angle); // center the servo } void loop() { if ( Serial.available()) { char ch = Serial.read(); if(ch >= '0' && ch <= '9') // is ch a number? val = val * 10 + ch - '0'; // yes, accumulate the value else if(ch == '-') // is this the minus sign? { angle = angle - val; if(angle < 0) angle = 0; myServo.write(angle); // write the new angle val = 0; } else if(ch == '+') // is this the plus sign? { angle = angle + val; if(angle > 180) angle = 180; myServo.write(angle); // write the new angle val = 0; } } }
  5. When programming recently, I found that I had some trouble controlling a motor at the same time as several servo. The servos would go all crazy, and the motor wouldn't work. I guessed that this was because the timers were interfering, or not enough timers, or similar. Digging into the servo library, and the analogWrite function, I found that they're both trying to use Timer A. Thus, I modified the analogWrite function. In file energia/hardware/msp430/cores/msp430/wiring_analog.c , I commented out lines 110 to 123 (inclusive). Below is the code commented out. case T0A1: // TimerA0 / CCR1 TA0CCR0 = PWM_PERIOD; // PWM Period TA0CCTL1 = OUTMOD_7; // reset/set TA0CCR1 = PWM_DUTY(val); // PWM duty cycle TA0CTL = TASSEL_2 + MC_1 + analog_div; // SMCLK, up mode break; #if defined(__MSP430_HAS_TA3__) || defined(__MSP430_HAS_T0A3__) case T0A2: // TimerA0 / CCR2 TA0CCR0 = PWM_PERIOD; // PWM Period TA0CCTL2 = OUTMOD_7; // reset/set TA0CCR2 = PWM_DUTY(val); // PWM duty cycle TA0CTL = TASSEL_2 + MC_1+ analog_div; // SMCLK, up mode break; #endif This may only work using the G2553, but if you're stuck with a G2231 from a rev 1.4 board, just sample a new chip
  6. I'm working with the stellaris launchpad on energia (version 1010E0009). I need to use two hardware serial ports, and I'm finding that it does not work. I've made a VERY simple sketch that demonstrates this behavior: When every port but one is commented out, the program runs fine. The light blinks, serial data moves, etc. When more than one is created, the first round of data goes out to each port, but it crashes somewhere. Often, the first few characters of the second loop begin printing on port zero. This doesn't happen when the delay(100) is in there. I'm not sure if this is a known bug or not, but it seems like the hardware serial library should be able to have multiple instances and work fine. Ideas?
  7. competentScience

    Question about Timers and loops

    My question is this: can I use a while loop to suspend a program until a value in a global variable is >= a constant. I'm using timer0 to interrupt every one second. I update a global integer value by one every time the interrupt method executes. However, when my program reaches the while loop, it locks up my program. Does the while loop prevent the interrupt from firing, or is the while loop putting a lock on the variable and not allowing the interrupt statement to update. The code I have is as follows and I am new to hardware programming. // initialize timer TA0CCR0 = 12000; // Count limit (16 bit) TA0CCTL0 = CCIE + OUTMOD_3+ CM_0+ CCIS_0; // Enable Timer A0 interrupts, bit 4=1 TA0CTL = TASSEL_1 + MC_1; __enable_interrupt(); //interrupt method plus global variable declaration volatile int delay_clock =0; volatile int blink_clock =0; __attribute__((interrupt(TIMER0_A0_VECTOR))) void oneSecondHandler(void){ delay_clock++; blink_clock++; } //while loop void wait() { blink_clock = 0; while( blink_clock < 5){ wait_ghost = 111 // so the compiler doesn't throw out the code} } ANY help would be appreciated. I am developing this for a bluetooth IPhone application