Jump to content
43oh

SirPatrick

Members
  • Content Count

    55
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by SirPatrick

  1. SirPatrick

    Goofy board?!

    Hova, have you tried any of the TI asm examples regarding input? Here is a CCS asm sample in the TI MSP430G2xx3 Code Examples download. ;******************************************************************************* ; MSP430G2xx3 Demo - Software Port Interrupt on P1.4 from LPM4 ; ; Description: A hi/low transition on P1.4 will trigger P1_ISR which, ; toggles P1.0. Normal mode is LPM4 ~ 0.1uA. LPM4 current can be measured ; with the LED removed, all unused P1.x/P2.x configured as output or inputs ; pulled high or low, and ensure the P2.0 interrupt input does not float. ; ACL
  2. Hey Sirri, Welcome to 43oh. Looking forward to seeing what kind of projects you bring us.
  3. Hey AntScran, TI has tons of sample code available for every variant of msp430. Check out that page here. So looking at that page you are going to want to download the MSP430G2xx1 zip file. Once you download that you can choose if you want to look at C code or ASM. In the C folder you will see a bunch of different programs with descriptive names. A readme.txt also exists with a little more info on each file, here is an excerpt so you can get an idea of what you will be looking at. File Name Description ---------------------------------------------------------------------------
  4. It's not a picture haha. It is a breadboard on a custom wall mount
  5. My bedroom bench setup. Enough of a setup to be dangerous.
  6. SirPatrick

    Goofy board?!

    I would also check the P1IN interrupt bits like in the link I sent. I have a ZIF here on another board and it looks like you may be able to squeeze it in, barely.
  7. SirPatrick

    Goofy board?!

    Hova, I had the same thing happen on my board. I ended up just using an external switch. Also, if you have the version 1.5 launchpad make sure you have the pull up resistor settings correct. Such as: //if using switch 2 (P1.3) P1REN |= BIT3; More info here . Let me know if that works.
  8. Oversight and neglecting to use standard definitions in stdint.h. I am new to this.
  9. I am assuming your circuit is hooked up correctly? This code uses an H-Bridge so if you don't have one check you have many options to choose from. Here is one from sparkfun, note the voltage specifications. Also, our forums have a great search feature and help find similar projects. This is a good project by RobG that shows how to control a DC motor (both speed and direction) with an h bridge.
  10. Oh wow! Best of luck on your recovery. Look forward to helping you more on this down the line.
  11. Here are a couple good links on the msp430 timers: NU Timer and clock system pdf The clocks section in Gustavo Litovsky's tutorial. (Read it all eventually)[pdf]
  12. In order to see the variables you have to set breakpoints in CCS. Then you can see their value between states.
  13. From the heater applications I have seen the switching speed really isn't that fast. Of course this will be dependent on your heater and the volume of water you will be controlling. Just to get a rough idea I would start looking at relays that have the proper power related values and go from there. If switching speed becomes a problem you can look into that later. Here is electronics exchange topic on this exact scenario.
  14. Welcome to 43oh. It really is a great community that you can learn quite a bit from! Also, the insane low power capabilities of the msp430 are really what brought me to learn it. Have you seen the video of the msp430 running off of grapes? It is insane!
  15. Thomas, It is definitely easier to make use of functions and loop structures rather than hard coding repetitive statements. Even if it wasn't necessarily "easier" you still we need to be able to utilize it down the road as it is an essential fundamental concept to programming of all types. Okay so an array can hold a "list" of things. These things can be anything from numerical constants to strings. Now in order to make use of this data structure we need to think of what we could put in there to make our code better. So first let's ask some question about your code as it is now. W
  16. Alright so you are on the right track currently but we definitely can improve. Before I go into showing you how to fade an LED let me first give you some tips on your code. First lets take a look at your main function. It looks like you are going through each LED and turning it on for a certain amount and then back off. It also looks like your are doing pretty much the same thing for several lines. To clean that up a bit you should think about using some type of loop. I am going to pseudocode the loop and let you try to attempt it. for every LED: set LED high delay N seconds set LED
  17. This code just controls the speed of a small 3V DC motor on P1.2. The speed is controlled by a potentiometer on P1.1. Feel free to suggest improvements as I am new to the MSP430. #include #define motorPin BIT2 #define analogInPin INCH_1 void initADC(); void stopWDT(); void initTimerA(); long map(long x, long in_min, long in_max, long out_min, long out_max); int analogRead(unsigned int pin); void main(void) { volatile unsigned int potentiometerValue; stopWDT(); initTimerA(); initADC(); for (; { potentiometerValue = map(analogRead(analogInPin),0,1023,0,1000); CCR1 =
  18. SirPatrick

    LED Display?

    Driving a large number of LEDs with a small number of pins is a very common challenge with microcontrollers. Many different ways exist to do this so choosing which one you want to use is dependent on many different factors. Because of this I will link you to some very detailed discussions that will allow you to choose which avenue you would like to pursue. A great MAKE Magizine forum posting on the subject http://forums.makezine.com/comments.php ... ionID=5356 The stackoverflow of electronics has some really good input as well http://electronics.stackexchange.com/qu ... n-my-micro
  19. In that case DIY sensors should work for you. Here are a couple of links on constructing your own sesnors http://letsmakerobots.com/node/2907 Here is one that is directional http://letsmakerobots.com/node/10822 Those should work perfectly. If you don't want to buy online you can pick all these parts up at Radioshack.
  20. How are these sensors too large? What are the size requirements you are trying to stay within? For distance detection on the cheap you really aren't going to do better than those IR sensors linked above. Any homebrew solution with IR LED and IR receiver is going to be quite a bit more inaccurate and prone to noise.
  21. This is great motivation to work on a project. What is the deadline?
  22. TASSEL_1 uses ACLK, which means you must be using the external clock source. If you aren't change it to SMCLK. Also, we need to see the rest of your code.
  23. Without the proper commandline flag the string may not be converted correctly. Check out this SO post for more information http://stackoverflow.com/questions/8877 ... mmand-line
  24. I don't think any 16 bit MCU is going to be capable of video processing. You could maybe look into a rasberry pi or something that has more processing power. As a project however this is definitely feasible. You just need to find the proper hardware to meet your requirements.
×
×
  • Create New...