• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Microcontrollers » MSP430™ Microcontrollers » MSP430 Ultra-Low Power 16-bit Microcontroller Forum » Data transmission from MSP430F2619 to PC
Share
MSP430™ Microcontrollers
  • Forum
  • Announcements
  • E2E Wiki
Options
  • Subscribe via RSS
MSP430 Resources
  • MSP430 Product Folder
  • MSP-EXP430G2 - MSP430 LaunchPad Value Line Development kit
  • MSP430 Getting Started Guide
  • MSP430 Microcontroller Projects
  • More Resources >
  • Forums

    Data transmission from MSP430F2619 to PC

    This question is answered
    janmay b c
    Posted by janmay b c
    on Feb 15 2012 09:20 AM
    Expert1235 points
    Hi,

    I really hope that one day i will be helping others on this forum, 
    rather then screaming "help" all the time :-)


    But for now here's my current problem:

    Goal: To send ADC converion result to PC.

    Background : Initially the idea was to use the FT2232D chip to send data to the PC, 
    but i  really am not able to make this scheme work.

    Current status : with my project guide forcing me to use the 
    current board to send data to the PC, 
    i have been left with no other choice but to send data through serial port.

    The "HELP" part : 

    1) How will i send the data to the PC (SPI or UART) and which pins do i need to bring out 
    ( coz its better to know which pins will be required before i mutilate my PCB ) ??

    2) I did some snooping around the internet and found that a level shifter is required in-between the 
    MCU and PC, i wanted to know its part number?

    If there are any other links/webpages/schematics that elucidate this scheme, please post them.

    Buying another board is not an option now, as my guide wants results out of my current board. 
    If someone could help me out here i would be  very much grateful
    
    
    best wishes
    janmay



    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Andy Neil
      Posted by Andy Neil
      on Feb 15 2012 10:13 AM
      Guru31775 points

      janmay b c
      ... use the FT2232D chip to send data to the PC, 
      but i  really am not able to make this scheme work.

      Why not??
      That really does sound like the simplest and most obvious way to do it!!
      Lots of people manage to do this - where are you stuck??

      How will i send the data to the PC (SPI or UART)
      PCs don't have SPI ports - so you can't use that directly.
      A UART will go to the PC's COM port (or to a USB adaptor, if the PC doesn't have a real COM port).
      But the FT2232D is exactly the chip you need to connect a UART to a PC via USB - so what's your problem?
      and which pins do i need to bring out 
      Obviously, you have to bring out the SPI pins if you want to use SPI, or the UART pins if you want to use a UART!!
      ( coz its better to know which pins will be required before i mutilate my PCB )
      If your "project guide" insists that you use that board then, surely, it must be suitably equipped for the task that you have been set??
      I did some snooping around the internet and found that a level shifter is required in-between the MCU and PC
      A PC COM port is RS232 - so you would need a "level shifter" (more precisely, an RS232 Transceiver) to connect that to your MCU.
      But, again, if you're thinking of doing this then why not just use the FT2232; that's exactly what it's for! It effectively takes the place of the RS232 Transveicer for connecting via USB  to a "virtual" COM port on the PC!
       
      FTDI

      This device features two multi-purpose UART/FIFO controllers which can be configured individually in several different modes.  As well as a UART interface, a FIFO interface and the Bit-Bang IO mode of the 2nd generation FT232B and FT245B devices, the FT2232D offers a variety of additional new modes of operation including a Multi-Protocol Synchronous Serial Engine (MPSSE) interface which is designed specifically for synchronous serial protocols such as I2C, JTAG and SPI bus.




      http://www.ftdichip.com/Products/ICs/FT2232D.htm
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Andy Neil
      Posted by Andy Neil
      on Feb 15 2012 10:18 AM
      Guru31775 points

      Well, I don't know what you've done to mess up the forum like that!!

      Let's try again:

      janmay b c
      ... use the FT2232D chip to send data to the PC,

      but i  really am not able to make this scheme work.

      Why not??

      That really does sound like the simplest and most obvious way to do it!!

      Lots of people manage to do this - where are you stuck??

      How will i send the data to the PC (SPI or UART)

      PCs don't have SPI ports - so you can't use that directly.

      A UART will go to the PC's COM port (or to a USB adaptor, if the PC doesn't have a real COM port).

      But the FT2232D is exactly the chip you need to connect a UART to a PC via USB - so what's your problem?

      and which pins do i need to bring out

      Obviously, you have to bring out the SPI pins if you want to use SPI, or the UART pins if you want to use a UART!!

      ( coz its better to know which pins will be required before i mutilate my PCB )

      If your "project guide" insists that you use that board then, surely, it must be suitably equipped for the task that you have been set - surely??

      Why are you not seeking advice & guidance on this from your "project guide"...?

      I did some snooping around the internet and found that a level shifter is required in-between the MCU and PC

      A PC COM port is RS232 - so you would need a "level shifter" (more precisely, an RS232 Transceiver) to connect that to your MCU.

      But, again, if you're thinking of doing this then why not just use the FT2232; that's exactly what it's for!
      It effectively takes the place of the RS232 Transveicer for connecting via USB  to a "virtual" COM port on the PC!

      FTDI
      This device features two multi-purpose UART/FIFO controllers which can be configured individually in several different modes.  As well as a UART interface, a FIFO interface and the Bit-Bang IO mode of the 2nd generation FT232B and FT245B devices, the FT2232D offers a variety of additional new modes of operation including a Multi-Protocol Synchronous Serial Engine (MPSSE) interface which is designed specifically for synchronous serial protocols such as I2C, JTAG and SPI bus.

      http://www.ftdichip.com/Products/ICs/FT2232D.htm

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Andy Neil
      Posted by Andy Neil
      on Feb 15 2012 10:30 AM
      Guru31775 points

      Perhaps the simplest way to just connect a UART to a PC via USB is to use one of these:

      Also available with bare wire ends:

      The USB end just plugs into the PC, and appears as a COM port;

      The other end just connects to the UART's logic-level pins.

      Take care to use the correct version for your UART logic levels - 3.3V or 5V

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jens-Michael Gross
      Posted by Jens-Michael Gross
      on Feb 15 2012 10:53 AM
      Guru139900 points

      janmay b c
      How will i send the data to the PC (SPI or UART)

      Most likely UART, since UART cards (or USB/USRT converters) are common, but SPI interfaces are special (and therefore expensive and rare) industrial stuff.

      janmay b c
      which pins do i need to bring out

      The same you had used for stuffing the FTDI chip (basically, those USB/serial converters are nothing more than an FTDI-liek chip and an additional level shifter for RS232 output levels (if any).
      If you want to connect to a real COM port ont he PC, you'll need a level shifter on the MSP side for the required RS232 signal levels. For 3V VCC, use the MAX3232 or similar.

      janmay b c
      If there are any other links/webpages/schematics that elucidate this scheme, please post them.

      Did you search this forum? There have been several threads about this. You're not the first one wanting to attach an MSP to a PC :)

      janmay b c
      my guide wants results out of my current board

      What one wants and what one gets are often two different things :) I have been asked to violate some physical laws during my IT courses too. I refused to, as I was afraid what the universe could do to me then. Still got my diploma. Sometimes you don't need to solve a task, you only need as good explanation why you didn't. :) (and providing an alternative solution gains extra points)

      However, in your case, there is hope :)

      _____________________________________
      Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.
      If you cannot discuss your problem in the public, feel free to start a private conversation: click on my name and then 'start conversation'. But please do so only if you really cannot do it in a public thread, as I usually read all threads. And I prefer to answer where others can profit from it (or contribute to it) too.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • janmay b c
      Posted by janmay b c
      on Feb 15 2012 11:22 AM
      Expert1235 points
      Hi Mr Andy,

      Thanks for your prompt response.

      Before i explain my situation and well before the ever-helpful Mr 
      Roberto Romano accuses my knowledge of MSP's to be microscopic :-). 
      Here are the Facts:

      1) I simply dont understand the datasheet of FT2232D, the problem is that i have 
      copied the connections of the pins of FT2232D pins from an earlier design
       which used the FT2232D in FIFO mode.

      Now, for fifo mode i need to connect 8 I/O pins of MCU to the FT2232D, 
      in my case i have connected 6 (only god knows how i made this mistake during design !!)


      2) There's no step-by-step kinda documentation for the FT2232D.

      3) My project guide just wants to avoid the cost of making another board, thats it :-)


      4) Till now i have installed the needed drivers and the FT2232D is being
       recognised as COMPORT15 and COMPORT16 in my device manager


      All in all, my understanding of the FT2232D is not that great. And nobody in my institute is using it,
       infact i am the first to use a MSP430 over here!!, the rest work with the 8-bit PIC MCU.  But Thats not an
       valid excuse i know.

      best wishes
      janmay
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • janmay b c
      Posted by janmay b c
      on Feb 15 2012 11:36 AM
      Expert1235 points

      Dear Sir,

      Jens-Michael Gross
      For 3V VCC, use the MAX3232 or similar.

      Thanks for your prompt response.

      best wishes

      janmay

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • janmay b c
      Posted by janmay b c
      on Feb 15 2012 11:36 AM
      Expert1235 points

      Dear Sir,

      Jens-Michael Gross
      For 3V VCC, use the MAX3232 or similar.

      Thanks for your prompt response.

      best wishes

      janmay

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Andy Neil
      Posted by Andy Neil
      on Feb 15 2012 12:08 PM
      Guru31775 points

      janmay b c
      I simply dont understand the datasheet of FT2232D

      So just use one of the ready-made cable assemblies, then!

      As I said, with those cables all you have to do is connect the wires to your UART pins, and plug the other end into your PC!
      Simples!

      Alternatively, you might look at one of the simpler FTDI chips - one that just does UART-to-USB (without the FIFO, etc).

      Or look at one of the many modules using the FTDI chips.

      Or any other manufacturer's USB-to-UART bridge chips...

      My project guide just wants to avoid the cost of making another board


      Again, why are you not getting your "guide" to actually guide you in this?!

      the rest work with the 8-bit PIC

      That's completely irrelevant!

      The way you connect the MCU's UART pins to a UART-to-USB bridge is identical whether it's a PIC or an 8051  or just a plain 16550 UART.

      The FTDI chips are so common that you must, surely, be able to find an examle somewhere...

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • janmay b c
      Posted by janmay b c
      on Feb 15 2012 22:22 PM
      Expert1235 points

      Hi Andy,

      Thanks for your quick response. Will ponder over the things you said.

      Yes, the FT2232 does seem to be commonly used. Will go back,

      do some reading and experimentation. Thanks.

      best wishes

      janmay

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Andy Neil
      Posted by Andy Neil
      on Feb 16 2012 01:25 AM
      Guru31775 points

      Why don't you just use one of the FTDI cables:

      As previously mentioned, you just connect the wires direct to your UART pins - that's all there is to it!

      Just make sure you use the correct voltage option. 

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • janmay b c
      Posted by janmay b c
      on Feb 16 2012 12:31 PM
      Expert1235 points
      Hi Andy,

      Thanks for your advice. Before i jump into any more hardware modifications, i want to get my code right.

      If possible plese clear my following doubts:

      I want to send 20(h) to the PC.This is how i am doing it.

      UART initialization:

      UCA0CTL1 = UCSSEL_1 | UCSWRST; // Clk = Aclk(32KHz), Reset = 1
      UCA0CTL0 = UCMSB; // send MSB first
      UCA0BR0 = 0x03; // select baud rate as 9600, 32kHz/9600 = 3.41
      UCA0BR1 = 0x00;
      UCA0MCTL = UCBRS1 + UCBRS0; // Modulation UCBRSx = 3 (Don't Know what this does
      but every example prgm on UART has this)
      UCA0CTL1 &= ~UCSWRST; // Reset = 0

      Sending 20(h):

      UCA0TXBUF = 0x20; // send 20(h)
      while (!(IFG2 & UCA0TXIFG));

      1) What is meant by this "Modulation"?? i read the users guide,
      but could not make out its purpose.

      2) Is the sending part correct??

      best wishes
      janmay
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jens-Michael Gross
      Posted by Jens-Michael Gross
      on Feb 16 2012 12:38 PM
      Guru139900 points

      janmay b c
      UCA0BR0 = 0x03; // select baud rate as 9600, 32kHz/9600 = 3.41
      UCA0BR1 = 0x00;
      UCA0MCTL = UCBRS1 + UCBRS0; // Modulation UCBRSx = 3 (Don't Know what this does
      but every example prgm on UART has this)


      32kHz/9600 is 3.41, yet the baudrate divider is an integer (you cannot count to 3.41 clock pulses, you only know at the 4th clock pulse that you're too late).
      So 32768/3 is 10922Bd, not 9600Bd.

      The modulation now introdices a patter that for soem bits not 3, but 3+1 is used. If properly selected, some bits are too short (too-high baudrate) and some are too long (low baudrate), but the average is the desired baudrate and the bit edges fall not too far from the desired timing.

      The clock module uses a similar mechanism for the DCO.

      _____________________________________
      Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.
      If you cannot discuss your problem in the public, feel free to start a private conversation: click on my name and then 'start conversation'. But please do so only if you really cannot do it in a public thread, as I usually read all threads. And I prefer to answer where others can profit from it (or contribute to it) too.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • janmay b c
      Posted by janmay b c
      on Feb 16 2012 12:45 PM
      Expert1235 points

      Dear Sir,

      In layman terms, this modulation compensates for the 0.41 part and makes

      sure that the baud rate remains 9600Bd, am i right?

      and sir, are the init and sending part okay??

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Roberto Romano
      Posted by Roberto Romano
      on Feb 16 2012 16:44 PM
      Mastermind6840 points

      janmay b c
      Before i explain my situation and well before the ever-helpful Mr 
      Roberto Romano accuses my knowledge of MSP's to be microscopic :-). 
      
      

       Hey Janmay, lack of knowledge to complete this project signify you MUST get a couple of book with topic basic electronics and basic programming, after that I suppose you  also need a BASIC programming course on MSP, you confuse port register bit and what they mean. At almost port bit register need to be fully understood, where you can go whitout this? Is this your job? Ok we cannot solve for you.. so....

       You posted this question in Stellaris forum and I told you about your code is still wrong. Again no port initialization exist and without this knowledge base you cannot complete the project.

       Again I pointed that on how you settled spi cannot program precise phase relationship on AD9834 pairs, if you need to do sync rectification or IQ demodulator from them  to evaluate phase and amplitude of real and imaginary part of signals jiiter fail miserably integration and measurement.

       Again on FT2232 I suggested you to use a cable like the one Andy pictured to check FT interface is ok then proceed step by step checking MSP communication..

       I suggested to get an MSP board with USB and experiment and fully understand with code examples on that board, you answered a new pcb is making???

       I completed myself my thesis without screaming to professors how to write single chapter or paragraph....

       If you did'nt grasp knowledge of how to solve problem you never go to a solution, making a new pcb is not a good solution: new error can be added to.. best is to rewire the one you have then make the final version. Try insist other solve your miriad of single problem and this generate a bad set of ununderstood  and system block never can fit together.

       Regards

       Regards

       Roberto


       Please login & click    Verify Answer    if this post answered your question.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Andy Neil
      Posted by Andy Neil
      on Feb 16 2012 17:01 PM
      Guru31775 points

      Roberto Romano
      making a new pcb is not a good solution: new error can be added to.. best is to rewire the one you have

      That, of course, depends on how much re-wiring is needed!

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    1234
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use