[SOLVED] Communicate with serial port on asus motherboard

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

************************UPDATE 30-Jan-2014************************

Problem solved, see my post below.
Problem was pinouts of com port and the header i bought.
You may experience same problems when buying headers for Asus Gigabyte ATX Motherboards
Here is the post https://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=1132148#1132148

************************ORIGINAL POST************************

Hello i have an atmega32a and i am having some issues communicating (sending data) to the serial port of my pc.

Before you send me reading codes and tutorials.

I have bought this

http://grobotronics.com/usb-to-serial-adapter-with-ft232.html#.Ut2g_7T8K71

which is a ftdi chip usb to serial converter.
I also download the ftdi virtual com port drivers.

I started communicating with the port properly using realterm emulator and i wrote a program in .net that makes the avr an oscilloscpoe.

All fine until now

I got a project in which i need to connect avr and another device using a serial port (not a virtual one).

So i started by buying this

which i need because my motherboard did not have a serial port output.

Just to note my motherboard is the ASUSP5Q3

Then i bought this
http://grobotronics.com/rs232-sh...

which is a serial port shifter and i just plugged the jumper wires to their proper positions.

Tried to communicate with the serial port and still cannot read anything.

I configured everything in realterm (port reader), device manager (windows) etc to be the same i am just getting (input = "green") in Ring pin of the serial port (pin 9).

Tried lower Baud Rates, tried Higher Baud Rates still nothing.
Sometimes with unmatching baud rates i may get one or more same values that are wrong (my sample program starts and sends values from 0 to 100).
The same program using the ftdi usb to serial chip runs just fine and im getting values on the emulator.

When i try to use the actual serial port i cant get it to work in any way.

So in concluding i think it may be relevant to other type of configuration.

Something with my motherboard maybe or dunno.

Here is an image displaying what happens with ftdi chip and a usb and what happens with actual serial port on pc

Any help would be precious.

Thanks in advance

Last Edited: Thu. Jan 30, 2014 - 02:18 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The first thing to try is a loopback. On the db9 connector connect pins 2&3. Your twrminal program should echo the characters typed. Remove the loopback, the echo should stop.
Then introduce the level shifter. Connect tx and rx. Repeat the test.

Have the avr output a known character at regular intervals. Connect the level shifter.

At this point you have proven the transmit path 100% and the receive path to the level shifter.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi
Is the port active in your bios settings ? and plugged in the correct way round at the motherboard end.

Essef

Just like the Thunderbirds, Printf needs "Strings" yes

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
The first thing to try is a loopback. On the db9 connector connect pins 2&3. Your twrminal program should echo the characters typed. Remove the loopback, the echo should stop.
Then introduce the level shifter. Connect tx and rx. Repeat the test.

Have the avr output a known character at regular intervals. Connect the level shifter.

At this point you have proven the transmit path 100% and the receive path to the level shifter.

First of all it is plugged correctly because there is only one way to plug it the other doesnt fit plus i checked the missing pin not to match any existing pin.

Then i tried the loopback and it failed.
There was one time i got what i sent from the Realterm but it seems it was accidentally because ive been trying so many times to loopback and i dont get anything. it just sends data, it wont receive.

Tried different baud rates.
Does not seem to work....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As I see, the port succecfuly opened in Realterm.
But I suspect wires can be crossed in some way.

To test it, open the port and go to "Pins" in Realterm.
When you click "500ms Break", line TXD changes its level from -12 to +12V for a half of second.

On db9 connector find that pin with a voltmeter against PC ground. Normally it should be pin3.
You can also measure which pin of db9 is connected directly to PC ground. Should be pin5 (GND).

And so on...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Visovian wrote:
As I see, the port succecfuly opened in Realterm.
But I suspect wires can be crossed in some way.

To test it, open the port and go to "Pins" in Realterm.
When you click "500ms Break", line TXD changes its level from -12 to +12V for a half of second.

On db9 connector find that pin with a voltmeter against PC ground. Normally it should be pin3.
You can also measure which pin of db9 is connected directly to PC ground. Should be pin5 (GND).

And so on...

I did two tests. The one you said and another one to test the cables

First of all i removed the db9 cable along with the header from the motherboard.
I took a voltometer and saw if the 1st pin (its female should i say hole) of the header which connects to mobo connects correctly to the first pin of the serial cable. I tested all the pins 1 to 1 and they seem all of them to be in the right place.

Your test.
I tried to figure out whih pin is the txd pin. I found that pin doing the test you proposed.
I think i found the rxd along with rts, dtr and gnd, but except gnd im not 100% sure about it. I found them by trying to do a loopback using the realterm.
When i connect txd an rxd (in the picture following) i get properly the values i send.

But what i found does not correspond to the proper pins set of the db9 cable.

I checked the whole cable from header to output and it seems ok. So the problem may be on the motherboard.... Seems like i need another header to give me a proper pin output setup....

Dont know what else to do....

Here is the picture showing the pins (you are facing it like you are holding the db1 and looking the pins directly so the real image should be mirrored, it doesnt matter though cause the connection seems to be really messed up)

In short, when i connect the pins that i mark as rxd and txd below i have a loopback acording to Realterm

Thanks for your reply and for your future replies :D .

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For your "serial port shifter" you need only lines TXD RXD GND.
The easiest would be to make a 3-lines 'adapting' cable db9_male <-> db9_female and cross the lines so that on the male side
pin5 = GND
pin3 = TXD
pin2 = RXD

You can see the pin numbers at pins with a magnifying glass.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok fould the problem

The pins on motherboard require specific header to be bought.

As i see many motherboards have that requirement.

The pins in motherboard are shown in picture below.

So by buying a simple header will not work with just pluging a serial cable.

Changed the title to a more general one because this is a more general problem linked with Asus motherboards and chasis which do not have a header preinstalled.

Thank you guys for your support and help.

C ya