NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Project Help and Ideas » Where Does the Serial Port Print Characters

August 01, 2013
by Q
Q's Avatar

I am starting a project in which I will need to print numbers and letters on to SOMETHING on my computer. I have seen the printf/scanf tutorial, and I understand the section of code that sets up the serial port (uart init,FDEV,etc.), but when I tried implementing that code into a test program (printing "hello"), it didn't work. After compiling the test program on the chip, I took it out of programming mode and powered it up and nothing happened. Do I need to open a special console to print stuff onto (I noticed in the printf/scanf tutorial there was something called "minicom" on the top of the displayed console) or did it execute so fast that I didn't see it or was there most likely a problem with my code. Thanks to anyone who can clear this up for me.

August 01, 2013
by Ralphxyz
Ralphxyz's Avatar

First question what are you using for the serial output?

A PC? What version/OS (Windows, MAC LInux)?

On your PC you need some sort of "Terminal". You can use Terminal on a MAC.

Some use PUTTY on a Windows machine.

I can not remember what it is called on a Linux machine but there is a "terminal" program available. Actual all OSs have multiple Serial Terminals.

Hope that helps.

Ralph

August 01, 2013
by Q
Q's Avatar

I am on Windows 7 Pro. If I need a terminal-like program, will command prompt work, or will I need to download PUTTY? Also, assuming I get or find the right terminal-like program to use, will I need to open it up before I power up the nerdkit, or will the nerdkit automatically start up the terminal-like program?

August 01, 2013
by dvdsnyd
dvdsnyd's Avatar

Q

Here is a link to PuTTY. I think I downloaded putty.exe. I also run Windows 7 Pro. There are other terminal programs out there...

When you open up Putty, it will bring up the PuTTY Configuration window. Set the serial line to whatever you have your programming cable connected - it should be the same as whatever you are using in your Makefile. Set the Speed to 115200. Make sure the connection type is serial. The rest should be good to go. Go ahead and hit Open. Then run your program.

Hope this helps.

Dave

August 01, 2013
by scootergarrett
scootergarrett's Avatar

I use Hyper Terminal on my windows XP, but now that I'm good with C programing I can write a program that communicates from a running C program to the micro controller. It's nice for printing A/D conversions to the screen or even plotting them.

August 01, 2013
by pcbolt
pcbolt's Avatar

Q -

All the Nerdkit chip will do is send the data out onto serial lines, it won't control the terminal program installed on your computer. My favorite terminal program is called RealTerm. It's a free download and it's great for troubleshooting. Also it can echo all the serial data out onto a TCP/IP line or another Comm port. Real easy to use and you can write scripts to interface with it.

August 01, 2013
by Q
Q's Avatar

Okay, this all seems pretty straightforward, now. I will check into all of these options, and thanks to everyone for helping me out.

Q

Post a Reply

Please log in to post a reply.

Did you know that electric fields behave differently in different materials? Learn more...