Jump to content

frozencarbonite

Members
  • Content Count

    10
  • Joined

  • Last visited

  • Days Won

    2

frozencarbonite last won the day on January 8 2011

frozencarbonite had the most liked content!

About frozencarbonite

  • Rank
    Member
  1. First sorry I will probably look a bit naive as I am very much new to this. Woops, that was a typo, I meant to say: "I tried changing the code below by just changing the instances of BIT2 to BIT5 but it did not work. I have no application in mind yet just came across something I did not understand and thought I'd ask. I do see the pins I can use have listed TA0.1 in the function but I didn't quite understand exactly because on P1.5 it shows TA0.0 and that is why I thought there was a way of enabling the timer. Does TA0.0 not have a CCR1 register? Is that the difference?
  2. frozencarbonite

    TA0.0

    Hi, I'm pretty new to programing microcontrollers but I am trying to learn. I came across NJC's PWM code (attached below). I wanted to change the timer A output from P1.2 to P1.5. I looked at the datasheet for MSP430G2231 and it says it has Timer0_A, compare: Out0 output (TA0.0) on this pin. The pins that work with this code all say Timer0_A, compare: Out1 output (TA0.1) I tried changing the code below by just changing the instances of BIT2 to BIT6 but it did not work. Can someone explain how to use this code for BIT6 or any of the TA0.0 pins and explain what the significance is between these TA0 bits? //************************************************************************ // MSP430G2231 Demo - Timer_A, PWM TA1, Up Mode, SMCLK // // Description: This program generates one PWM output on P1.2 using // Timer_A configured for up mode. The value in CCR0, 1000-1, defines the // PWM period and the value in CCR1 the PWM duty cycles. Using SMCLK, // the timer frequenciy is about 1.1kHz with a 25% duty cycle on P1.2. // Normal operating mode is LPM0. // MCLK = SMCLK = default DCO (about 1.1MHz). // // MSP430G2231 // ----------------- // /|\ | | // | | | // --|RST P1.2/TA1|--> CCR1 - 75% PWM // | | // | | // // M.Buccini / L. Westlund // Texas Instruments, Inc // October 2005 // Built with CCE Version: 3.2.0 and IAR Embedded Workbench Version: 3.40A // // Modified by NJC for MSP430LaunchPad.com - July 2010 // //************************************************************************ #include "msp430G2231.h" void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT P1DIR |= BIT2; // P1.2 to output P1SEL |= BIT2; // P1.2 to TA0.1 CCR0 = 1000-1; // PWM Period CCTL1 = OUTMOD_7; // CCR1 reset/set CCR1 = 250; // CCR1 PWM duty cycle TACTL = TASSEL_2 + MC_1; // SMCLK, up mode _BIS_SR(LPM0_bits); // Enter LPM0 }
  3. Hi, @ jsolarski Thanks for the suggestion but I did try that in my attempts but no matter what I do after I plug in the launchpad it is recognized and the drivers are installed. Continuing with the keys metaphor seems once you get the keys from the horse trailer you cant get rid of them very easily. :roll: For anyone wondering: I have discovered on a typical install of IAR Embedded Workbench Kickstart on XP the VCP drivers folder is located here: C:\Program Files\IAR Systems\Embedded Workbench 6.0 Kickstart\430\drivers\TIUSBFET To install the VCP driver manually you can just point the device manager installer to the eZ430-UART folder.
  4. @zeke;Sorry, too late. In less time than it took to post that snide remark you probably could have answered his question, made yourself look intelligent and win some respect. Obviously you went a different route. I wish I could answer his question but I am very new to these micro-controllers and not very knowledgeable yet. @ealdaz Hang in there I think someone here will get to you.
  5. Hi again :roll: Okay I am wrong somewhere... When I got my Launchpad the drivers were installed alongside IAR on my Windows XP machine. I uninstalled IAR as completely as I can but the launchpad still get's recognized as "MSP430 Application UART" in the device manager under "Ports COM & LPT" and works as a VCP. I wanted to test the new drivers I linked to above by removing the working drivers from this system and using those. I though I did that by uninstalling the device in the device manager then deleting usbser from the windows registry. After doing that if I plug the Launchpad windows won't recognize it although it still listed under "Ports COM & LPT" . I then updated the drivers pointing to the new driver's folder and they are installed and seem to work correctly on this system. Though I was on the right track but... So just now I have tried it on a different Win XP machine that has never had IAR installed. First the Launchpad shows up as "MSP430 Application UART" but under "Other devices" and I can not install the new drivers. :oops: I am thinking their is some little file that is installed with the IDE that tells windows that it is not a "Other device" but that it is a "Ports COM & LPT". That file seems to not be removed easily once you uninstall IAR :roll:
  6. Hi again, The USB chip on the MSP430 Launchpad is a TUSB3410 so I did a search and found this: http://focus.ti.com/docs/toolsw/folders ... invcp.html I am not very knowledgeable about the legalese in the license agreement but it looks like there is no trouble as long as the driver is used with a TI chip and since the launchpad uses this chip and their own firmware no problem right? Personally I do not even need to change the PID or VID but it seems that is not that big of a deal either or am I reading this wrong? I have not yet tested it on a fresh computer though. I did uninstall IAR studio and tried to remove that driver but it kept recognizing the launchpad afterwards. Only after deleting usbser from the windows registry was the driver not found anymore. I was able to then install the stand alone driver from the link above and it worked perfectly
  7. Hi again, Thought I would share some links I found very helpful as a beginner I went through this C++ tutorial a while back and it has greatly helped me understand how to code basic programs for a variety of platforms like the arduino, Microsoft Visual C++ and now the MSP430 Launchpad. I think if you are a total newcomer you should start by completing this tutorial: http://cplusplus.com/doc/tutorial/ Particularly I keep going to this page as a good reference of what is going on when looking at examples for sometimes the simplest things are not explained: http://cplusplus.com/doc/tutorial/operators/ Here is a great explanation of how I/O works on the Launchpad and what got my head out of arduino land: http://andrewroycarter.com/?s=msp430 Follow that up with this and memorizing the important bitwise operators: http://en.wikipedia.org/wiki/Bitwise_operator Cde's link seems very promising for newcomers but needs fleshed out especially the analog section: http://processors.wiki.ti.com/index.php ... _Community and then the more advanced projects and blogs Oh and of course 43oh forum :!: The community here seems very knowledgeable and helpful find what info you need rather than pouring over the fragmented bits of info strewn across the web. Thanks again
  8. Hello, I need to install the Virtual Com Port driver for the MSP430 Launchpad on several different Win machines without installing any of the IDEs. Is there a standalone driver available to download? If not can I extract it out of the IAR folder and what files would I need? Has anyone done this?
  9. Hey thanks everyone your links are really helpful. CDE, I found your link very interesting especially the "Tutorials that include theory/schematics/code/pictures" section which has a subheading of "Analog Interfacing" and "Potentiometer Input" This is exactly what I wanted but alas no article for that yet : ( I'm sure you guys are busy but it would be great if someone would make those pages soon. I think the analog section is quite important Thanks again for the pointers, This is a great forum :!:
  10. Hi, I have been using the Arduino for some time now but recently bought an MSP430 Launchpad and want to start learning to program it. I would like see some basic examples similar to those included in the Arduino IDE. I would prefer that they are small and not part of a larger project. For starters personally I really would like to see a small example program that reads the analog value of a 10k pot and increases or decreases the delay of a flashing LED. I would also like to see some code that shows how to configure an existing button on the board to start the LED flashing when pressed. The code I just mentioned should be separate snippets and only focus on the main concept so the latter would use a fixed delay amount instead of combing it with the analog read example. I think it is better for beginners like me if you not get too carried away and make a more complex example. I know it's temping to make the analog input pot example dim an LED with PWM but I think PWM should be a separate example. Let us students put what we need together If anyone can help me here or point me to the right site I would appreciate it.
×
×
  • Create New...