NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Microcontroller Programming » Temperature sensor
October 18, 2010 by newbie |
I have the temperature sensor working but want to get it to display on the computer. I have been trying to get this for some time but do not know how. I know there is a line in the program but how do you go from there?? |
---|---|
October 18, 2010 by Ralphxyz |
At the beginning of the code right after main() make sure you have:
This turns the UART communications on. Then at the bottom of the tempsensor c code make sure this line is not commented out:
This sends the data to your pc. You need a terminal program running to see the output on a MAC you use Terminal screen. In Windows you use Hyper Terminal. I am not sure about Linux. Ralph |
October 24, 2010 by newbie |
Hello I have all the code you suggested in the program. I'am not sure what you mean by window's hyper terminal. |
October 24, 2010 by Rick_S |
newbie, Hyperterminal was a serial communications program bundled with versions of windows through XP. Vista and beyond do not have hyperterminal. If you are running Windows Vista or 7, you can get a simple terminal program to display the serial data such as PuTTY. Simply configure it for the correct com port and baud rate and you'll see your data coming thru. Rick |
October 24, 2010 by newbie |
Thanks for the responce I found the hyper terminal and configured but get a bunch of junk getting printed on the screen. I have the correct com port tried changing the baud rate did not get any where. this is what I get on the screen: yx~ú ùúú ûûþ ûùúùûùü ùûùþ û ùþøþ ý ûþ ûù ùû ûùúú ùü ùûùþ ùûüû ûû ûý ýùûùûùûùþ ùû þûþùú ùûùþø þ úù þû ù ûùüý ûø ùþùþ ú ûø ùûùûþ û ýù û þ û þ ûþ ù ûþû ùþûûúûùþøþ ùþþý ûûú ùþ ûûþ ù ûûûùû þý þý ú ùý ý üú þü ú þüû þûý þýþ ü þüúþ üú þý þüúþûýý ûú ùýý ûý úþ ýþ ûììììÄìììÄìììììììÄÄìÄìÄÄììÄìÄÄìì ììÄÄììÄìÄìÄÄÄÄÄììììììÄììììÄÄìììÄììÄÄÄìììÄìÄÄÄÄÄìÄìììÄÄìììììíÄííÄíÄÄìÄíìÄíííííÄÄÄ ííÄÄÄíÄììììÄÄÄíÄÄÄÄÄÄííííííÄíÄííÄÄíÄííÄííÄíííí Any ideas ?? |
October 24, 2010 by mongo |
Check the error checking and parity bits. Most terminals run 8 n 1 (8 data, no parity, single bit checking) |
October 24, 2010 by newbie |
hello The settings are what you said my baud rate is 2400. Is there something in the hyper terminal that I have to program or is this the correct baud rate. I tried other rates and got no communications. |
October 24, 2010 by Rick_S |
Change the baud rate to 115200. Rick |
October 24, 2010 by newbie |
Thanks That worked . I should have tried more baud rates. Why did it give me what it did at the slower rate? |
October 24, 2010 by Rick_S |
Because the data was faster than what the PC was reading so it was getting bits from different bytes making wierd charachters. Glad you got it going! Rick |
Please log in to post a reply.
Did you know that you can control multiple LEDs from one microcontroller output? Learn more...
|