<?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:06:16-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-t10320.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10320.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10320.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10320.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10320.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10320.html" />
				</rdf:Seq>
				</items>
				</channel>
						<item rdf:about="http://www.8051projects.net/forum-t10320.html">
						<title>serial interfacing doubt.</title>
						<link>http://www.8051projects.net/forum-t10320.html</link>
						<dc:date>2008-12-01T23:06:16-08:00</dc:date>
						<dc:creator></dc:creator>
						<dc:subject></dc:subject>
						<description>hi, i'm trying to learn how to programme a simple serial interfacing using 8051. I found this programme from a site that uses 8051 and visual basic. before implementing the real hardware i would like to try in a simulator. I'm using EdSim51 simulator to try the programme, but it doesn't look like the programme is working. This programme is used to ON/OFF the LED in port 1.7. This is the programme that i modified a litttle bit to suits the EdSim51 simulator. Can anyone help me with this problem?                     ORG     00H    		      	MOV TMOD,#20H				MOV TH1,#0FDH				MOV TL1,#0FDH	MOV SCON,#50H				SETB TR1READ:	JNB RI,READ					MOV A,SBUF					CJNE A,#0FFH,CLEAR					CLR RI					WAIT:	JNB RI,WAIT					MOV A,SBUF					CJNE A,#00H,NXT			CLR P1.7						SJMP DOWN				NXT:	CJNE A,#01H,DOWN			SETB P1.7				CLEAR:	CLR RI						SJMP HERE					END</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10320.html">
						<title>Re: serial interfacing doubt.</title>
						<link>http://www.8051projects.net/forum-t10320.html</link>
						<dc:date>2008-12-01T23:06:16-08:00</dc:date>
						<dc:creator>Arun Kumar V</dc:creator>
						<dc:subject></dc:subject>
						<description>Hello Oreo, in your program you are comparing the incoming characters to some fixed ones and switching LED on/off.  you have defined some labels/segments  which are not present in your code like :ORG 00HMOV TMOD,#20HMOV TH1,#0FDHMOV TL1,#0FDHMOV SCON,#50HSETB TR1READ: JNB RI,READMOV A,SBUFCJNE A,#0FFH,CLEARCLR RIWAIT: JNB RI,WAITMOV A,SBUFCJNE A,#00H,NXTCLR P1.7SJMP DOWNNXT: CJNE A,#01H,DOWNSETB P1.7CLEAR: CLR RISJMP HEREEND data sent over serial port will be in ASCII format, so its better to compare with known ASCII letters than HEX values  for eg: a b c a modified code looks  like this:CODE:ORG 00H<br /><br />MOV TMOD,#20H<br />MOV TH1,#0FDH<br />MOV TL1,#0FDH<br />MOV SCON,#50H<br />SETB TR1<br /><br />SETB P1.7<br /><br />READ: JNB RI,READ<br />MOV A,SBUF<br />CLR RI<br />CJNE A,#'A',NOTA &nbsp; &nbsp; &nbsp; ; &nbsp;if it is "A" then the LED glows<br />CLR P1.7<br />SJMP READ<br /><br />NOTA: CJNE A,#'B',READ<br />SETB P1.7 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; if its "B" &nbsp;LED is off <br />SJMP READ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; if you enter any other letters/nums it just ignores<br /><br />END<br />&nbsp;</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10320.html">
						<title>Re: serial interfacing doubt.</title>
						<link>http://www.8051projects.net/forum-t10320.html</link>
						<dc:date>2008-12-01T23:06:16-08:00</dc:date>
						<dc:creator>oreo</dc:creator>
						<dc:subject></dc:subject>
						<description>thank u so much for replying. one question is, the data transmitted is in ASCII right? So should i send an 'A' or 41H instead? i try it in Edsim51 simulator. It is a free simulator that i downloaded.It has quite an interesting diaplay to use. But it does'nt seem to work in both data that I transmitted in the external UART panel. Am i doing it all wrong?</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10320.html">
						<title>Re: serial interfacing doubt.</title>
						<link>http://www.8051projects.net/forum-t10320.html</link>
						<dc:date>2008-12-01T23:06:16-08:00</dc:date>
						<dc:creator>Arun Kumar V</dc:creator>
						<dc:subject></dc:subject>
						<description>Hello Oreo,you can either use 'A' or 41H, because the compiler ultimately converts all Ascii, Decimal, binary values into hex.i had used Edsim51 last year,it looked good but not very flexible. the code i gave works well and has been tested on some other sim called 80513 Simulator. here are the test results:When 'A' is pressed - P1.7 is 0 	When 'B' or any other letter is pressed P1.7 is 1	i'll try it on Edsim51 tonight.......... one more thing, in our forum we have a Thanks giving Button, if you find the replies helpful you can press the Thanks buttonArun</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10320.html">
						<title>Re: serial interfacing doubt.</title>
						<link>http://www.8051projects.net/forum-t10320.html</link>
						<dc:date>2008-12-01T23:06:16-08:00</dc:date>
						<dc:creator>oreo</dc:creator>
						<dc:subject></dc:subject>
						<description>hai arun. i did'nt notice the thanks button. hehehe anyway i have downloaded the simulator u mentioned and i will i try it.  Once again thanks.</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10320.html">
						<title>Re: serial interfacing doubt.</title>
						<link>http://www.8051projects.net/forum-t10320.html</link>
						<dc:date>2008-12-01T23:06:16-08:00</dc:date>
						<dc:creator>oreo</dc:creator>
						<dc:subject></dc:subject>
						<description>hai. this the vb source code that i mentioned before. I have modified  a little bit based on your given code. Do you think it's ok?Private Sub Form_Load()On Error Resume Next    MSComm1.CommPort = 1    MSComm1.Settings = "9600,N,8,1"    MSComm1.DTREnable = False    MSComm1.PortOpen = TrueEnd SubPrivate Sub cmdsend_Click()Dim LED As LongIf opton.Value = True Then    LED = AElse    LED = BEnd IfMSComm1.Output = Char$(LED)End SubPrivate Sub Form_Unload(Cancel As Integer)MSComm1.PortOpen = FalseEnd Sub</description>
						</item>
				</rdf:RDF>