<?xml version="1.0" encoding="utf-8" ?>
				<!-- generator="e107" -->
				<!-- content type="Forum / topic" -->
				<rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
				<channel rdf:about="http://www.8051projects.net/">
				<title>8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes : Forum / topic</title>
				<link>http://www.8051projects.net/</link>
				<description>Learn to make simple microcontroller projects, pic, 8051, avr and arm projects. download 8051 projects, tutorials, libraries, sample codes. join the microcontroller discussion forum and ask doubts regarding electronics. the best source for 8051 over internet.</description>
				<dc:language>en-gb</dc:language>
				<dc:date>2008-12-01T23:47:08-08:00</dc:date>
				<dc:creator>contact@nospam.com</dc:creator>
				<admin:generatorAgent rdf:resource="http://e107.org" />
				<admin:errorReportsTo rdf:resource="mailto:contact@nospam.com" />
				<sy:updatePeriod>hourly</sy:updatePeriod>
				<sy:updateFrequency>1</sy:updateFrequency>
				<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
				<items>
				<rdf:Seq>
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10557.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10557.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10557.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10557.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10557.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10557.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10557.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10557.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10557.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10557.html" />
				</rdf:Seq>
				</items>
				</channel>
						<item rdf:about="http://www.8051projects.net/forum-t10557.html">
						<title>Problems with serial data</title>
						<link>http://www.8051projects.net/forum-t10557.html</link>
						<dc:date>2008-12-01T23:47:08-08:00</dc:date>
						<dc:creator></dc:creator>
						<dc:subject></dc:subject>
						<description>Hi guys, I've been having problems getting my 8052 to communicate serially. I have a handmade board with a  max 232 and 8052 and other supporting circuitry.I am trying to use windows (xp) hyper terminal to send/ receive data serially.This is what I do to setup hyperterm:New connection(enter some name)>select com1>Properties(bits per sec=9600,data bits=8,parity=none,stop bits=1,flow control=none)> Now we have a window with a cursor thats blinking.Then I  go to File>Properties >and under ascii settings I say echo typed characters locallyThe program I have written sends the word ALOHA continuously at 9600 bits per sec to the serial port( see code). It simulates correctly in keil micro vision 3 and I can see that it sends ALOHA continuously in the serial window.My hardware seems to be fine- to test it I short the Tx and Rx pins (10 and 11) after removing the microcontroller from its zif socket in my board and type something in hyper term and it echoes back. So max 232 seems to be fine.despite doing this I  have had no luck    Am I doing something wrong or stupid?  Any help would be very much appreciated. This thing is driving me nuts!   CODE:#include &lt;reg52.h> //<br /><br />void main&#40;void&#41;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //main function<br />&#123;&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; unsigned char sdat&#91;5&#93;=&#123;"ALOHA"&#125;;<br />&nbsp; &nbsp; unsigned char m;<br />&nbsp; &nbsp; &nbsp; &nbsp; TMOD=0x21;<br />&nbsp; &nbsp; TH1=0xFD; &nbsp; &nbsp; &nbsp; /* 9600 baud rate*/<br />&nbsp; &nbsp; SCON=0x50; &nbsp; &nbsp; &nbsp;/* 8 bit uart&nbsp; &nbsp; &nbsp; &nbsp; */<br />&nbsp; &nbsp; &nbsp; &nbsp; IP=0x32; &nbsp; &nbsp; &nbsp; &nbsp;/* highest priority to serial int*/ &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; TR1=1; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//start serial data timer<br />&nbsp; &nbsp; &nbsp; &nbsp; while&#40;1&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &#123;<br />&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;TI=0; //clear flag<br />&nbsp; &nbsp; &nbsp; &nbsp; for&#40;m=2;m&lt;5;m++&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &#123; SBUF=sdat&#91;m&#93;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;while&#40;TI==0&#41;; &nbsp; &nbsp;//wait till byte is txed<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TI=0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &#125;<br />&nbsp; &nbsp;&#125;<br />&#125;// belongs to main&nbsp; &nbsp; &nbsp; <br /><br />&nbsp;</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10557.html">
						<title>Re: Problems with serial data</title>
						<link>http://www.8051projects.net/forum-t10557.html</link>
						<dc:date>2008-12-01T23:47:08-08:00</dc:date>
						<dc:creator>sashijoseph</dc:creator>
						<dc:subject></dc:subject>
						<description>Change TMOD value to 0x20.Are you using a 11.0592 MHz xtal?Is your micro working at all?Insert a small led blinky in your code and see if the led blinks... this would confirm that the 8052 is indeed working.</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10557.html">
						<title>Re: Problems with serial data</title>
						<link>http://www.8051projects.net/forum-t10557.html</link>
						<dc:date>2008-12-01T23:47:08-08:00</dc:date>
						<dc:creator>zen bEaR</dc:creator>
						<dc:subject></dc:subject>
						<description>yikes! my mistake..the db9 pin no 5 wasnt grounded   thank you for the reply  ok..but I still have a problem. Now that my MCU works fine (its now displaying data in hyper term) I want to write a short program on my pc to send data to my MCU. using C doesnt work (outportb()) since i am using win xp. I dont have win 98 or 95 and dont want to install it either... is there a way to "unlock" the ports on my comp so that i can use them in a c  program  i write while using xp?</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10557.html">
						<title>Re: Problems with serial data</title>
						<link>http://www.8051projects.net/forum-t10557.html</link>
						<dc:date>2008-12-01T23:47:08-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>there is something called porttalk which unlocks your ports. Porttalk Driver download:http://www.beyondlogic.org/porttalk/porttalk.htmPorttalk installation info (can also be found on download page):http://www.qsl.net/dl4yhf/winpic/install_porttalk.htm</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10557.html">
						<title>Re: Problems with serial data</title>
						<link>http://www.8051projects.net/forum-t10557.html</link>
						<dc:date>2008-12-01T23:47:08-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>well TMOD just configure your timers,20 means Timer 1 mode 2 and Timer 0 mode 021 means Timer 1 mode 2 and Timer 0 mode 1timers will only get activated when u set their corresponding Timer Run Control Bit (TRx)</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10557.html">
						<title>Re: Problems with serial data</title>
						<link>http://www.8051projects.net/forum-t10557.html</link>
						<dc:date>2008-12-01T23:47:08-08:00</dc:date>
						<dc:creator>say2paul</dc:creator>
						<dc:subject></dc:subject>
						<description>Why to change TMOD value to 0x20? I am using TMOD 0x21 instead, please let me know what is the difference?</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10557.html">
						<title>Re: Problems with serial data</title>
						<link>http://www.8051projects.net/forum-t10557.html</link>
						<dc:date>2008-12-01T23:47:08-08:00</dc:date>
						<dc:creator>Arun Kumar V</dc:creator>
						<dc:subject></dc:subject>
						<description>Hi Say2 paul,there is a lot of difference ! with TMOD as 20H(0x20), you are using timer1 in mode2 ( 8 bit) auto reload  mode to generate baudrate and  timer0 is not initialized (not used/set)with TMOD as 21H(0x21), timer1 is used as above and timer0 is also used but in mode1( 16 bit )hope you got the idea !Arun</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10557.html">
						<title>Re: Problems with serial data</title>
						<link>http://www.8051projects.net/forum-t10557.html</link>
						<dc:date>2008-12-01T23:47:08-08:00</dc:date>
						<dc:creator>pdi33</dc:creator>
						<dc:subject></dc:subject>
						<description>say2paul wrote ...mmm a bit  But I tried my code with both 20H and 21H and it is working fine with 9600 bps.So unable to find the difference  hi say to paul,by changing the TMOD from 20h to 21h, u are changing the configuration of the timer0 only,but ur serial baud rate is determined by timer1 and is independent of timer0 configuration. so u did not find the difference. u will find the difference only when u are using the timer0 for some other purpose.</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10557.html">
						<title>Re: Problems with serial data</title>
						<link>http://www.8051projects.net/forum-t10557.html</link>
						<dc:date>2008-12-01T23:47:08-08:00</dc:date>
						<dc:creator>say2paul</dc:creator>
						<dc:subject></dc:subject>
						<description>mmm a bit  But I tried my code with both 20H and 21H and it is working fine with 9600 bps.So unable to find the difference</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10557.html">
						<title>Re: Problems with serial data</title>
						<link>http://www.8051projects.net/forum-t10557.html</link>
						<dc:date>2008-12-01T23:47:08-08:00</dc:date>
						<dc:creator>say2paul</dc:creator>
						<dc:subject></dc:subject>
						<description>pdi33 wrote ...say2paul wrote ...mmm a bit  But I tried my code with both 20H and 21H and it is working fine with 9600 bps.So unable to find the difference  hi say to paul,by changing the TMOD from 20h to 21h, u are changing the configuration of the timer0 only,but ur serial baud rate is determined by timer1 and is independent of timer0 configuration. so u did not find the difference. u will find the difference only when u are using the timer0 for some other purpose.Thanks pdi33, now I got it</description>
						</item>
				</rdf:RDF>