Hello all, Today I made myself a nice and simple serial cable - TX, RX and ground (I don't need anything else), and it works well when I connect 2 laptops to each other, running HyperTerminal. Unfortunately, HyperTerminal does not record serial data sent by 2 different evaluation boards (MCBSTR7/9), running Keil / ST sample code. What can be the cause of this? Can it be related to the type of wire I used? Any ideas are welcome!
Thanks in advance
You need to swap RX and TX on one end of the cable.
The swap (based on the cable you have built) is not when talking PC to PC, but when you talk PC to Eval board you need to swap one end.
Robert, Thanks for your reply. Could you please explain further? I have made a null cable, of course. What do you mean exactly by "swap"?
Greetings, Tamir
Don't use a null cable to talk to the dev board. Go straight through.
Ok, I will try that tomorrow...thanks.
Hi Tamir,
if I understand you correctly you do the following:
RX---\ /------RX uC Board-1 X uC Board-2 TX---/ \------TX (null-modem cable)
As you can see from the figure above, you can only monitor one transmit channel at the time (uC Board-1 or uC Board-2). It is important to notice that if you connect the PC serial port transmitter line to the wrong wire, the two RS232 drivers will compete. The result is most probably that the PC driver will be stronger and your uC Board will not be seen on the RS232 bus.
PC monitoring serial link: RX---\ /------RX uC Board-1 X uC Board-2 TX---/ \---+--TX | |--RX PC serial port TX PC serial port (not required)
I hope this helps!
Frank
Note This message was edited to reduce width.
Serial ports on computers are generally wired as DTE (Data Terminal Equipment) while the serial ports on evaluation boards are generally wired as DCE (Data Communications Equipment). What this means is that connecting DTE to DTE requires RX/TX swapping. However, DTE to DCE RX/TX is wired straight thru.
Jon
F D, Thanks for your reply. Actually, I am only connecting one evaluation board to a PC. I understand that I need to make a non-null cable for that - so that's what I'm going to do.
Why?
In general they are not DCEs - ie, they are not modems - so why are they wired as such?
Robert, Did you mean that if I connect a PC to a single microcontroller (not 2), I don't need a null cable?
"Did you mean that if I connect a PC to a single microcontroller (not 2), I don't need a null cable?"
The number of microcontrollers is irrelevant - what matters is the pinout of the connectors!
It should be obvious that the data output from the PC needs to feed the data input of the microcontroller - yes?
Beware that the pin called "TxD" on a DCE is an input - it is the data to be transmitted to the conns link;
Similarly, the pin called RTxD" on a DCE is an output - it is the data that has been received from the conns link.
See my post of 20-Sep-2007 23:47 in this thread: http://www.keil.com/forum/docs/thread10745.asp
Should, of course, be:
Similarly, the pin called "RxD" on a DCE is an output - it is the data that has been received from the comms link.
good link. thanks.
Well they're DTEs even less than that. But they're typically meant to be connected to DTEs, so it's easier if their wiring is that of a DCE. For one thing, straight-through cabling is cheaper (just crimp a plug on a ribbon cable).
Andy, Thanks for your reply. I have made a new cable nad successfully tested it. And I also did some reading which cleared things up further. You see, until now, every time I did a project I got the hardware and the cable(s) so I didn't have to worry about anything bit the software - now that I need to do it myself, I get to learn a lot. Sometimes a push in the right direction helps, too.