<?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>2009-01-08T10:42:14-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-t11188.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t11188.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t11188.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t11188.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t11188.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t11188.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t11188.html" />
				</rdf:Seq>
				</items>
				</channel>
						<item rdf:about="http://www.8051projects.net/forum-t11188.html">
						<title>8051 serial port</title>
						<link>http://www.8051projects.net/forum-t11188.html</link>
						<dc:date>2009-01-08T10:42:14-08:00</dc:date>
						<dc:creator></dc:creator>
						<dc:subject></dc:subject>
						<description>I want to send characters to Hyperterminal from 8051. Please let me know if my connections and code are right.8051 TX -> MAX232 T1in.... MAX232 T1out -> PC RX=====9600 baud. 11.0592 MHz. 8 bits. 1 stopbit. No parity.CODE:<br />clr sm0<br />setb sm1<br />MOV TMOD, #20H<br />MOV TH1, #253<br />MOV A, PCON&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<br />clr ACC.7&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<br />MOV PCON, A&nbsp; &nbsp; &nbsp;<br />mov SCON, #50H ;8b, 1stop, 1start, REN enabled<br />GAIN: mov SBUF, #'A' ;letter A is transmitted<br />HERE: jnb TI, HERE<br />clr TI<br />sjmp GAIN<br />endThanks</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t11188.html">
						<title>Re: 8051 serial port</title>
						<link>http://www.8051projects.net/forum-t11188.html</link>
						<dc:date>2009-01-08T10:42:14-08:00</dc:date>
						<dc:creator>Arun Kumar V</dc:creator>
						<dc:subject></dc:subject>
						<description>Hi Mac, the max232 connection seems to be correct, the code doesn't work bcoz you haven't started the timer1, here's the modified code:CODE:MOV TMOD, #20H<br />MOV TH1, #253<br />ANL PCON,#7FH &nbsp;<br />MOV SCON, #50H ;8b, 1stop, 1start, REN enabled<br />SETB TR1<br /><br />GAIN: MOV SBUF, #'A' ;letter A is transmitted<br />HERE: jnb TI, HERE<br />clr TI<br />sjmp GAIN<br />endall the best !Arun</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t11188.html">
						<title>Re: 8051 serial port</title>
						<link>http://www.8051projects.net/forum-t11188.html</link>
						<dc:date>2009-01-08T10:42:14-08:00</dc:date>
						<dc:creator>sashijoseph</dc:creator>
						<dc:subject></dc:subject>
						<description>Connections are OK.In the code you've forgotten to start the timer (setb TR1).Some lines are superfluous...since you've already set SCON to 50H there's no need to explicitly clr and set smo and sm1.On reset,the PCON D7 bit is cleared automatically,so you can do away with those 3 lines as well.EDIT : Seems Arun and I posted at the same time..</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t11188.html">
						<title>Re: 8051 serial port</title>
						<link>http://www.8051projects.net/forum-t11188.html</link>
						<dc:date>2009-01-08T10:42:14-08:00</dc:date>
						<dc:creator>Colin Mac</dc:creator>
						<dc:subject></dc:subject>
						<description>ok thanks a lot guys</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t11188.html">
						<title>Re: 8051 serial port</title>
						<link>http://www.8051projects.net/forum-t11188.html</link>
						<dc:date>2009-01-08T10:42:14-08:00</dc:date>
						<dc:creator>Colin Mac</dc:creator>
						<dc:subject></dc:subject>
						<description>That worked. Now I'm trying to send 'A' from one micro to another to turn on a led. Can you let me know if you see a problem? CODE:<br />MOV TMOD, #20H<br />MOV TH1, #244 ;2400<br />ANL PCON,#7FH &nbsp;<br />MOV SCON, #50H ;8b, 1stop, 1start, <br />SETB TR1<br /><br />send:<br />MOV SBUF, #'A' ;letter A is transmitted<br />jnb TI, $<br />clr TI<br />jmp send<br />endCODE:<br />MOV TMOD, #20H<br />MOV TH1, &nbsp;#244 &nbsp;;2400<br />ANL PCON, #7FH &nbsp;<br />MOV SCON, #50H ;8b, 1stop, 1start, REN enabled<br />SETB TR1<br /><br />setb p1.7<br />start:<br />JNB RI, $ ; wait for an entire byte to be received<br />CLR RI ; the receive interrupt flag is set by hardware but must be cleared by software<br />MOV A, SBUF; <br />CJNE A, #'A', start<br />clr p1.7<br />jmp $<br />end<br />&nbsp;</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t11188.html">
						<title>Re: 8051 serial port</title>
						<link>http://www.8051projects.net/forum-t11188.html</link>
						<dc:date>2009-01-08T10:42:14-08:00</dc:date>
						<dc:creator>sashijoseph</dc:creator>
						<dc:subject></dc:subject>
						<description>seems ok....</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t11188.html">
						<title>Re: 8051 serial port</title>
						<link>http://www.8051projects.net/forum-t11188.html</link>
						<dc:date>2009-01-08T10:42:14-08:00</dc:date>
						<dc:creator>Colin Mac</dc:creator>
						<dc:subject></dc:subject>
						<description>I think it's working now. Cheers.</description>
						</item>
				</rdf:RDF>