Main Site Documentation

Testing UART using TerraTerm


#1

Am I doing something wrong? I have connected my Fez Domino to a DB9 shield, then connected that to a COM port on my computer. I open up TerraTerm, and see the new COM port, so I choose it and connect to it (COM5 on computer). After that, I see nothing, i can’t type or anything. I was able to get my Fez Domino working with a loop/jumper. Is there something special I have to do?


#2

Have you set the Tera Term Terminal Setup like in the picture??


#3

Yes I do. One thing I noticed based on your image, is when I send a string, do I need to add “\n” after the string to send a carriage return (CR) ?

This is my function for sending data via COM port:


static void send(String msg)
        {
            tx_data = Encoding.UTF8.GetBytes(msg);  //get file

            // flush all data
            UART.Flush();
            // send some data
            UART.Write(tx_data, 0, tx_data.Length);
            // wait to make sure data is transmitted
            Thread.Sleep(100);


        }


#4

you can set the Transmit to CR+LF so you don’t need to add \n

Have you try to use the example in the eBook, from the download page?

http://www.tinyclr.com/downloads/Beginners%20guide%20to%20NETMF.pdf

17.1 UART page 76

Could not tell from the code snippet, what you want to do exactly.


#5

Thanks for your recommendation. However, when I try the sample code, this is the output i get…


#6

Good progress. Now make sure the baudrate in teratem is the same. I see in your code it is 115200


#7

Oh man, how could I be so forgetful! I really appreciate your help and patience. I’m really kicking myself right now for not even checking that…how embarrassing! But either way… Thank you!


#8

I did the exact mistake when I first learnt UART. :stuck_out_tongue:


#9

I think basically everyone has fallen into that pitfall at some point or another. I know I have. Don’t feel too bad :wink:


#10

…but always assume the answer to your first question is “Yes” :slight_smile: