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
janmay b c ... use the FT2232D chip to send data to the PC, but i really am not able to make this scheme work.
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
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
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
Well, I don't know what you've done to mess up the forum like that!!
Let's try again:
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"...?
FTDIThis 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
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
janmay b cHow will i send the data to the PC (SPI or UART)
janmay b cwhich pins do i need to bring out
janmay b cIf there are any other links/webpages/schematics that elucidate this scheme, please post them.
janmay b cmy guide wants results out of my current board
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.
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 managerAll 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 wishesjanmay
Dear Sir,
Jens-Michael GrossFor 3V VCC, use the MAX3232 or similar.
Thanks for your prompt response.
janmay b cI 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
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...
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.
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.
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 = 1UCA0CTL0 = UCMSB; // send MSB firstUCA0BR0 = 0x03; // select baud rate as 9600, 32kHz/9600 = 3.41UCA0BR1 = 0x00;UCA0MCTL = UCBRS1 + UCBRS0; // Modulation UCBRSx = 3 (Don't Know what this does but every example prgm on UART has this)UCA0CTL1 &= ~UCSWRST; // Reset = 0Sending 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 b cUCA0BR0 = 0x03; // select baud rate as 9600, 32kHz/9600 = 3.41UCA0BR1 = 0x00;UCA0MCTL = UCBRS1 + UCBRS0; // Modulation UCBRSx = 3 (Don't Know what this does but every example prgm on UART has this)
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.
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??
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 :-).
Before i explain my situation and well before the ever-helpful Mr
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
Roberto
Please login & click Verify Answer if this post answered your question.
Roberto Romanomaking 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!