Jump to content

Search the Community

Showing results for tags 'timing'.



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

  1. Still new to embedded programming and I am trying to use the MMA8452 accelerometer (datasheet) on SparkFun's breakout board (link). I programmed SparkFun's example program (link) into the MSP430G2553 via Energia with no issues and plotted the serial data in Excel. However this data, for lack of a better word, was "noisy." There would be huge spikes in the data even though the device was sitting still. Sometimes the WHO_AM_I value would be reported incorrectly as well. I found out the board shipped with 10k pull ups so I dropped them to the recommended 4.7k? resistors and the problem persisted. When I tried to investigate the SCL and SDA lines with my oscilloscope, the problem would disappear and the data would be a pristine flat line (as expected). That told me the scope probe capacitance was actually helping the circuit and rather than decrease resistance I should increase resistance. That seemed very counter intuitive to me, but I followed the data and changed pull ups to 15k. The problem disappeared and the data was clean. I was using short leads with and without a breadboard. The jumper to the Green LED was also removed from the SCL line. Being required to have 15k pull ups on the I2C bus seems wrong to me especially since the datasheet recommends 4.7k. Am I missing something? I am not well versed in I2C and Freescale's tech support has been less than helpful. I did order a MMA8451 sample and swapped it on SparkFun's breakout board and had the same problem. So I know the problem was not specific to that MMA8452. Other I2C devices (like the BQ32000) work fine.
  2. Hey all, I'm having some trouble with a project that checks a pin every hour and should trip a relay if a certain pin is HIGH. Some notes: - this is with the MSP430G2553 chip - it seems to run fine if duration is low (ex: 5000ms) - it worked at least once (triggered buzzer after an hour) when I replaced the relay circuit with a simple buzzer I'm using this relay circuit: And this code using TwoMsTimer library: #include <TwoMsTimer.h> unsigned long duration = 3600000; int relayPin = 14; int moistPin = 15; int state = 0; void setup() { pinMode(relayPin, OUTPUT); pinMode(moistPin, INPUT); digitalWrite(relayPin, LOW); // necessary bc energia sets green led HIGH by default? TwoMsTimer::set(duration, checkMoisture); TwoMsTimer::start(); } void loop() { if (state == 1) { state = 0; // set state back to zero digitalWrite(relayPin, HIGH); delay(500); digitalWrite(relayPin, LOW); } } void checkMoisture() { if(digitalRead(moistPin) == HIGH) { // set state to 1 to trip relay next time loop runs state = 1; } } Any help is much appreciated. Thanks, Matt
×