<?xml version="1.0" encoding="utf-8"?>
				<!-- generator="e107" -->
				<!-- content type="Forum / topic" -->
				<rss  version="2.0">
				<channel>
				<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>

<language>en-gb</language>
				<copyright>2008 Rickey's World</copyright>
				<managingEditor>contact@nospam.com (Ajay Bhargav)</managingEditor>
				<webMaster>contact@nospam.com (Ajay Bhargav)</webMaster>
				<pubDate>Thu, 08 Jan 2009 21:04:20 -0800</pubDate>
				<lastBuildDate>Thu, 08 Jan 2009 21:04:20 -0800</lastBuildDate>
				<docs>http://backend.userland.com/rss</docs>
				<generator>e107 (http://e107.org)</generator>
				<ttl>60</ttl>
				<textInput>
				<title>Search</title>
				<description>Search 8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes</description>
				<name>query</name>
				<link>http://www.8051projects.net/search.php</link>
				</textInput>
						<item>
						<title>RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[Hello,<br /><br />I have to finish and make a report about the project below in a week.<br />My problem is: I dont have hardware part now and i m wondering how to simulate my assembly program in any sofware. I m used to simuate in  Proteus Isis. But i dont know how to build the circuit with RS232 in ISIS. <br />Can anybody help me?<br />Thanks in advance! <br /><br /><br />an Assembly Language Program to control a DC Motor interfaced to a PC through the parallel port. The project contains the following modules:<br /><br />1.      Motor Driving Module (Output Module):<br /><br />·         The motor will rotate clockwise if f (forward) key is pressed and will rotate anticlockwise if r (reverse) key is pressed.<br /><br />·         The speed of the motor will be changed by introducing different PWM signals with changing duty cycles.<br /><br />2.      Speed Display Module (Output Module):<br /><br />·         The speed of rotating motor will be indicated by displaying a single digit 7-segment display. There will be speeds from 0 to 9. The speed which is displayed on the 7-segment display will also be displayed on the monitor with its direction (clockwise or anticlockwise).<br /><br />·         The positive speeds will be shown as they are (from 0 to 8) and the negative speeds will be displayed in two’s complement form.<br /><br />3.      Up and Down Push Buttons (Input Module):<br /><br />·         The speed of the motor will be controlled by the two external push buttons (Up and Down) connected to the PC through the parallel port. The speed will be incremented or decremented one by one by pushing to Up or Down buttons respectively.]]></description>
<pubDate>Sun, 06 Jan 2008 23:32:20 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[u can use  virtual terminal in instruments section or COMPIM (in devices) to simulate serial port.  <img src='http://www.8051projects.net/e107_images/emotes/yahoo/3.gif' alt='' style='vertical-align:middle; border:0' />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 07 Jan 2008 01:55:07 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[Yeah I know this. Thanks.<br />But i couldnt do it properly. Can you give me a link? or maybe a tutorial working properly.<br />I m not sure with my problem. It may be because of ports <img src='http://www.8051projects.net/e107_images/emotes/yahoo/17.gif' alt='' style='vertical-align:middle; border:0' />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 07 Jan 2008 01:59:12 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[i dont have any tutorial or link  <img src='http://www.8051projects.net/e107_images/emotes/yahoo/22.gif' alt='' style='vertical-align:middle; border:0' />  .  but if u tell what problem you are facing <img src='http://www.8051projects.net/e107_images/emotes/yahoo/22.gif' alt='' style='vertical-align:middle; border:0' />    we can solve it <img src='http://www.8051projects.net/e107_images/emotes/yahoo/1.gif' alt='' style='vertical-align:middle; border:0' />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 07 Jan 2008 02:09:34 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[If it is possible, can you make a little circuit working properly, that includes rs232 is connected to 1 led and i can  test it by using "out #,data" command.<br />You may send to my emai: mpguybrush@yahoo.com or upload anywhere and everybody can see it in the future.]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 07 Jan 2008 02:46:27 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[There is no need of using COMPIM. Just make circuit on proteus.. with DC motor connected.. and make use of virtual terminal provided in the proteus.<br /><br />For driving a DC motor.. you need a H-Bridge circuit commonly available as L293D IC. But simulation of this IC is not available so make use of transistor based H-bridge.. you can take a look at the sample circuit from the DC Motor tutorial.. BJT based H-Bridge demo is given...<br /><br />Just make the simulation circuit... and it will work perfectly. if you feel any problem i am here.. <img src='http://www.8051projects.net/e107_images/emotes/yahoo/1.gif' alt='' style='vertical-align:middle; border:0' />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 07 Jan 2008 05:09:01 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[and tell me if u want to simulate L293D <img src='http://www.8051projects.net/e107_images/emotes/yahoo/1.gif' alt='' style='vertical-align:middle; border:0' />   i have its simulation model <img src='http://www.8051projects.net/e107_images/emotes/yahoo/3.gif' alt='' style='vertical-align:middle; border:0' />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 07 Jan 2008 05:40:05 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[wow... mail me..]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 07 Jan 2008 05:58:07 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[try if it works in this way<br />L293D Spice model <div class='indent'><b>The content of the post is hidden!<br />Please <a href='http://www.8051projects.net/login.php'>Login</a> to see the hidden post.<br />If you are new to the website Please <a href='http://www.8051projects.net/signup.php'>Signup!</a></b></div>]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 07 Jan 2008 06:36:30 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[I want to put it in the download section.. so asking you if its working or not..<br />can you give me a screenshot of it? i am not on my PC hence no softwares.. <img src='http://www.8051projects.net/e107_images/emotes/yahoo/1.gif' alt='' style='vertical-align:middle; border:0' />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 07 Jan 2008 06:51:50 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[then put this.how to use l293d on proteus<br />http://rapidshare.com/files/81973769/using_l293d.zip<br /> <img src='C:&amp;#092;Documents and Settings&amp;#092;Win XP&amp;#092;Desktop&amp;#092;dc motor.JPG' class='bbcode' alt=''  /><br /><img src='http://www.8051projects.net/e107_files/public/1199719751_383_FT4572_dc_motor_.jpg' class='bbcode' alt='' width='550' height='406'  /><br />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 07 Jan 2008 07:30:10 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[you gave him the code? <img src='http://www.8051projects.net/e107_images/emotes/yahoo/10.gif' alt='' style='vertical-align:middle; border:0' />  lol!]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 07 Jan 2008 07:50:14 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[no problem.. do not remove it now.. <img src='http://www.8051projects.net/e107_images/emotes/yahoo/1.gif' alt='' style='vertical-align:middle; border:0' />  just let him take it as a reference.. ok! anyways thank you for the model..<br /><br />Just wanted to ask. is it ok to host Proteus spice model file on server? <img src='http://www.8051projects.net/e107_images/emotes/yahoo/7.gif' alt='' style='vertical-align:middle; border:0' />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 07 Jan 2008 10:27:14 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[oho  <img src='http://www.8051projects.net/e107_images/emotes/yahoo/102.gif' alt='' style='vertical-align:middle; border:0' />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 07 Jan 2008 09:13:34 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[i dont think that there will be any problem <img src='http://www.8051projects.net/e107_images/emotes/yahoo/1.gif' alt='' style='vertical-align:middle; border:0' />   <img src='http://www.8051projects.net/e107_images/emotes/yahoo/10.gif' alt='' style='vertical-align:middle; border:0' />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 07 Jan 2008 10:47:03 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[Thanks a lot!]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 07 Jan 2008 18:07:09 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[no there wont be.. he still has to do the major parts.. hope he come back and see what is going on <img src='http://www.8051projects.net/e107_images/emotes/yahoo/1.gif' alt='' style='vertical-align:middle; border:0' />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 07 Jan 2008 18:02:40 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[is this model a custom made? or what?]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Tue, 08 Jan 2008 10:03:02 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[<div class='quote_top'>Ajay wrote ...</div><div class='quote'><br />no there wont be.. he still has to do the major parts.. hope he come back and see what is going on <img src='http://www.8051projects.net/e107_images/emotes/yahoo/1.gif' alt='' style='vertical-align:middle; border:0' /> <br /></div><br />lol  <img src='http://www.8051projects.net/e107_images/emotes/yahoo/10.gif' alt='' style='vertical-align:middle; border:0' />  <br />i was talking about placing proteus model on server.. <img src='http://www.8051projects.net/e107_images/emotes/yahoo/10.gif' alt='' style='vertical-align:middle; border:0' />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Tue, 08 Jan 2008 04:32:36 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[Hi, <br />I came back again <img src='http://www.8051projects.net/e107_images/emotes/yahoo/1.gif' alt='' style='vertical-align:middle; border:0' /> <br />Thanks for explaining me how to simulate the circuit but i have to write the program. I wish i could write in C, unfortunately i have to write it in asm, even in tasm. So i dont have much time and i cant find sources. You helped me a lot but please if you can show me how to finish this, i will be very grateful.<br />I dont know how to write those functions for key_pressed situation.<br />And another question, should i use a pic to get the data from parallel port and from push buttons and then control the 7seg and dc motor? or should the data from parallel port control the dc motor and the 7seg ( but then how can i include push buttons )? <img src='http://www.8051projects.net/e107_images/emotes/yahoo/17.gif' alt='' style='vertical-align:middle; border:0' /> <br /><br />; cursor function<br />cursor	macro	r,c<br />		<br />			mov	bh,00<br />			mov ah,02<br />			mov	dh,r<br />			mov dl,c<br />			int 10h<br />		<br />		endm<br /><br /><br />; display function<br />display macro	str<br />			mov ah,09h<br />			mov dx,offset str<br />			int 21h<br />		endm<br /><br />.stack 64<br />.data<br />	l1			db	'						Welcome									','$'<br />	l2			db  '			Press f to rotate clockwise							','$'<br />	l3			db  '		Press r to rotate counter-clockwise						','$'<br />	l4			db  '	You may adjust the speed by speed adjust buttons			','$'<br />	l5			db  '	  You can see the motor speed on the 7-seg					','$'<br />	l6			db  '			Press q to quit the program							','$'<br />	<br />	delayer		dw	33147<br />	hu			dw	0<br />	ku			dw	0<br />	<br />	7segport	db	?<br />	motorport1	db	?<br />	motorport2	db	?<br />	btnUpPort	db	?<br />	btnDownPort	db	?<br />	<br />	<br />.code<br />	main:<br />		mov	ax,@data<br />		mov	ds,ax<br />	<br />		clr<br />	<br />		cursor 2,6<br />		display l1<br />		cursor 4,6<br />		display l2<br />		cursor 6,6<br />		display l3<br />		cursor 8,6<br />		display l4<br />		cursor 10,6<br />		display l5<br />		cursor 12,6<br />		display l6<br />	<br />		cursor 16,6<br />	<br /><br />	key_check:<br />		mov ah,07<br />		int	21h<br />		<br />		cmp al,'r'<br />		je	r_pressed<br />		cmp al,'f'<br />		je f_pressed<br />		cmp al,'u'<br />		je up_pressed<br />		cmp al,'d'<br />		je down_pressed<br />		cmp al,'q'<br />		je	quit<br />		jmp key_check<br /><br />		<br />	r_pressed:<br />		jmp	key_check<br /><br />	<br />	f_pressed:<br />		jmp	key_check<br /><br />	<br />	down_pressed:<br />		jmp	key_check<br /><br />	<br />	up_pressed:<br />		jmp	key_check<br /><br />	<br />	q_pressed:<br />		jmp	key_check<br /><br />		<br />	quit:<br />		mov ah,4ch<br />		int 21h<br />		end	main<br />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Wed, 09 Jan 2008 14:18:58 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[I think you should give me all the explanation of what peripherals you are going to use in your project.. and possibly send a circuit diagram because without that you cannot program.<br />for now just send me list of peripherals like motor, 7-seg etc whatever u are going to use.]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Wed, 09 Jan 2008 23:49:53 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[the project is as i explained in my first message.<br />It doesnt matter what microcontroller i use but i have to show the program coded in tasm.<br />This program should work in Dos and it should control a dc motor and a 7seg control via rs232. And it should include 2 push buttons for speed adjustion.<br />It is really important because i m dealing with my other exams in these days.Thanks for your attention.]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Thu, 10 Jan 2008 04:11:13 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[so you have two push buttons, one 7-segment and one DC-Motor. Use of buttons is to change speed.. is it? and rs232 also do the same?<br /><br />Please explain the use of switch and rs232.. are you going to use then together or u want to use them differently like two different programs. I hope you have already gone through the PWM code.. and code you posted before is a good start..<br /><br />Just make a flowchart how you want your peripherals to work only then you will be able to program. decide how your final thing will work.. and make flowchart on that.]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Thu, 10 Jan 2008 08:27:18 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[what do you suggest for peripherals?<br /><br />i will not use buttons to change speed. Everything must be controlled by keyboard and the asm program.<br /><br />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Thu, 10 Jan 2008 08:30:48 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[actually i m mixed up.<br />should i use microcontroller? or can everything be controlled from rs232?<br />i dont know enough information to finish this thing.]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Thu, 10 Jan 2008 08:33:39 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[well.. use anything you want.. will be simple to do if you use RS232.. just receive and then and do work.. <img src='http://www.8051projects.net/e107_images/emotes/yahoo/1.gif' alt='' style='vertical-align:middle; border:0' />  if you use RS232 then there will be no need of button.<br />just receive a character from serial port and act upon the command..]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Thu, 10 Jan 2008 08:52:44 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[hmm.. <img src='http://www.8051projects.net/e107_images/emotes/yahoo/1.gif' alt='' style='vertical-align:middle; border:0' />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Thu, 10 Jan 2008 12:47:03 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[you already have the code for starting and stopping a motor.. all you need is to control speed now <img src='http://www.8051projects.net/e107_images/emotes/yahoo/1.gif' alt='' style='vertical-align:middle; border:0' />  i am sure its not difficult for you as you already have the PWM code.]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Fri, 11 Jan 2008 11:26:40 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[the problem is i m not familer with tasm and there is no more sources or i couldnt find any.<br /><br />i can do anything in C, at least i can search but in asm and electronics i m limited.]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Fri, 11 Jan 2008 11:30:33 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[hmm.. so why dont you do it in C? everything is same in C as you do in asm.. just small differences.. <br />ok write start and stop of motor in C PWM i will explain..]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Fri, 11 Jan 2008 11:50:12 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[<div class='code_asm'>CODE:</div><div class='code_highlight' style='unicode-bidi: embed; direction: ltr'><div class="asm" style="font-family: monospace;"><br /><span style="color: #adadad; font-style: italic;">;delay function</span><br /><br />delay&nbsp; &nbsp;<span style="color: #0000ff;">macro</span>&nbsp; &nbsp;duration<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">local</span> waitf<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">cx</span>,duration<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">loop</span> waitf<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">end</span> m<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /><br /><span style="color: #adadad; font-style: italic;">; cursor function</span><br />cursor&nbsp; <span style="color: #0000ff;">macro</span>&nbsp; &nbsp;r,<span style="color: #0000ff;">c</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span>&nbsp; &nbsp; &nbsp;<span style="color: #46aa03; font-weight:bold;">bh</span>,<span style="color: #ff0000;">00</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">ah</span>,<span style="color: #ff0000;">02</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span>&nbsp; &nbsp; &nbsp;<span style="color: #46aa03; font-weight:bold;">dh</span>,r<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dl</span>,<span style="color: #0000ff;">c</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">int</span> 10h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">endm</span><br /><br /><br /><span style="color: #adadad; font-style: italic;">; display function</span><br />display <span style="color: #0000ff;">macro</span>&nbsp; &nbsp;<span style="color: #00007f; font-weight:bold;">str</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">ah</span>,<span style="color: #ff0000;">09h</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #0000ff;">offset</span> <span style="color: #00007f; font-weight:bold;">str</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">int</span> 21h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">endm</span><br /><br />.<span style="color: #0000ff;">stack</span> <span style="color: #ff0000;">64</span><br />.<span style="color: #0000ff;">data</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #adadad; font-style: italic;">;Seven Segment Table</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; zero&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; 3fh<span style="color: #adadad; font-style: italic;">;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; |&nbsp; &nbsp; -&nbsp; &nbsp; &nbsp; -&nbsp; &nbsp; &nbsp; &nbsp;| |&nbsp; &nbsp; &nbsp;|-&nbsp; &nbsp; &nbsp; |-&nbsp; &nbsp; &nbsp; -|&nbsp; &nbsp; &nbsp; |-|&nbsp; &nbsp; &nbsp;|-|</span><br />&nbsp; &nbsp; &nbsp; &nbsp; one&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">6</span><span style="color: #adadad; font-style: italic;">;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| |&nbsp; | &nbsp; &nbsp;_|&nbsp;_| &nbsp; - &nbsp;|- &nbsp;|_&nbsp; -|&nbsp; &nbsp; &nbsp; &nbsp;-&nbsp; &nbsp; &nbsp; &nbsp;-</span><br />&nbsp; &nbsp; &nbsp; &nbsp; two&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; 5bh<span style="color: #adadad; font-style: italic;">;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; |_&nbsp; _|&nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; _| |_|&nbsp; |&nbsp; &nbsp; &nbsp; |_|&nbsp; &nbsp; &nbsp; _|</span><br />&nbsp; &nbsp; &nbsp; &nbsp; three&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; 4fh<br />&nbsp; &nbsp; &nbsp; &nbsp; four&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; 66h<br />&nbsp; &nbsp; &nbsp; &nbsp; five&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; 6dh<br />&nbsp; &nbsp; &nbsp; &nbsp; six&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; 7dh<br />&nbsp; &nbsp; &nbsp; &nbsp; seven&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">7</span><br />&nbsp; &nbsp; &nbsp; &nbsp; eight&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; 7fh<br />&nbsp; &nbsp; &nbsp; &nbsp; nine&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; 6fh<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; speedCtr&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; ?<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; l1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; <span style="color: #7f007f;">'&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Welcome&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '</span>,<span style="color: #7f007f;">'$'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; l2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span> &nbsp;<span style="color: #7f007f;">'&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Press f to rotate clockwise&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '</span>,<span style="color: #7f007f;">'$'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; l3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span> &nbsp;<span style="color: #7f007f;">'&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; Press r to rotate counter-clockwise&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '</span>,<span style="color: #7f007f;">'$'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; l4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span> &nbsp;<span style="color: #7f007f;">'&nbsp; &nbsp;You may adjust the speed by '</span>u<span style="color: #7f007f;">' for up and '</span>d<span style="color: #7f007f;">'for down&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '</span>,<span style="color: #7f007f;">'$'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; l5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span> &nbsp;<span style="color: #7f007f;">'&nbsp; &nbsp; &nbsp;You can see the motor speed on the 7-seg&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '</span>,<span style="color: #7f007f;">'$'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; l6&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span> &nbsp;<span style="color: #7f007f;">'&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Press q to quit the program&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '</span>,<span style="color: #7f007f;">'$'</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />.<span style="color: #0000ff;">code</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,378h&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #adadad; font-style: italic;">;parallel port initialization</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">00h</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #adadad; font-style: italic;">;for writing data</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #adadad; font-style: italic;">; D7 is for forward D6 is for backward D5 is for enabling of dc motor with L293d</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; main:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span>&nbsp; &nbsp; &nbsp;<span style="color: #46aa03; font-weight:bold;">ax</span>,@<span style="color: #0000ff;">data</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span>&nbsp; &nbsp; &nbsp;<span style="color: #46aa03; font-weight:bold;">ds</span>,<span style="color: #46aa03; font-weight:bold;">ax</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">clr</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor <span style="color: #ff0000;">2</span>,<span style="color: #ff0000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display l1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor <span style="color: #ff0000;">4</span>,<span style="color: #ff0000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display l2<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor <span style="color: #ff0000;">6</span>,<span style="color: #ff0000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display l3<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor <span style="color: #ff0000;">8</span>,<span style="color: #ff0000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display l4<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor <span style="color: #ff0000;">10</span>,<span style="color: #ff0000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display l5<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor <span style="color: #ff0000;">12</span>,<span style="color: #ff0000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display l6<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor <span style="color: #ff0000;">16</span>,<span style="color: #ff0000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span>&nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#91;</span>speedCtr<span style="color: #66cc66;">&#93;</span>,<span style="color: #ff0000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; key_check:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">ah</span>,<span style="color: #ff0000;">07</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">int</span>&nbsp; &nbsp; &nbsp;21h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #7f007f;">'r'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span>&nbsp; &nbsp; &nbsp; r_pressed<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #7f007f;">'f'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> f_pressed<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #7f007f;">'u'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> up_pressed<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #7f007f;">'d'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> down_pressed<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #7f007f;">'q'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span>&nbsp; &nbsp; &nbsp; quit<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> key_check<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; r_pressed:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; delay <span style="color: #ff0000;">2</span><span style="color: #adadad; font-style: italic;">;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wait for 2 seconds and then start rotating in reverse direction</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">01000000b</span><span style="color: #adadad; font-style: italic;">;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 01100000B for reverse direction</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,378h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span>&nbsp; &nbsp; &nbsp;key_check<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; f_pressed:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; delay <span style="color: #ff0000;">2</span><span style="color: #adadad; font-style: italic;">;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Wait for 2 minutes and then start rotation forward direction</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">10000000b</span><span style="color: #adadad; font-style: italic;">;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 10000000B for forward direction</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,378h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span>&nbsp; &nbsp; &nbsp;key_check<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; down_pressed:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">add</span>&nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#91;</span>speedCtr<span style="color: #66cc66;">&#93;</span>,<span style="color: #ff0000;">-1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span>&nbsp; &nbsp; &nbsp;key_check<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; up_pressed:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">add</span> <span style="color: #66cc66;">&#91;</span>speedCtr<span style="color: #66cc66;">&#93;</span>,<span style="color: #ff0000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span>&nbsp; &nbsp; &nbsp;key_check<br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; quit:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">ah</span>,4ch<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">int</span> 21h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">end</span>&nbsp; &nbsp; &nbsp;main</div></div>]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Tue, 15 Jan 2008 10:47:32 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[dez please show me what you have done till now.. I will add things which are needed..!]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Tue, 15 Jan 2008 10:21:16 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[<br />first i need to define a speedcontrol macro that will increase or decrease the speed when user push 'u' or 'd'.<br />secondly i need a 7seg function that will send the speed to 7segment which is stored in speedCtr<br />and thats all.<br />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Tue, 15 Jan 2008 10:51:17 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[<img src='http://www.8051projects.net/e107_images/emotes/yahoo/7.gif' alt='' style='vertical-align:middle; border:0' />  <br />are you using x86 processor? <img src='http://www.8051projects.net/e107_images/emotes/yahoo/17.gif' alt='' style='vertical-align:middle; border:0' />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Tue, 15 Jan 2008 10:58:21 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[yes <br />i m trying to write just a program in dos to control the peripherals. There is no microcontroller]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Tue, 15 Jan 2008 11:20:17 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[hmm... but i don't know much about x86 processors.. <img src='http://www.8051projects.net/e107_images/emotes/yahoo/17.gif' alt='' style='vertical-align:middle; border:0' />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Tue, 15 Jan 2008 20:14:50 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[i cant believe there are many step motor examples around the net<br />but there is no bloody dc motor by pwm example.<br />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Tue, 15 Jan 2008 13:56:11 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[actually speed of DC motor changes when you change the voltage of motor... and in digital world this is done with the help of Pulse width modulation.<br />So i think you should see this for learning about PWM.<br />I have no idea whether x86 processors have timers or not.. if not then it will be difficult to generate PWM, or you have to make use of some external thing to generate PWM.<br />Please go through this to read about PWM.<br /><a class='bbcode' href='http://www.8051projects.net/forum-t1720-post.html' rel='external'  target='_blank'>www.8051projects.net/forum-t1720-post.html</a>]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Wed, 16 Jan 2008 22:30:53 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[can you write psuedo code?<br />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Wed, 16 Jan 2008 08:46:52 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[i can help you with 8051... if you can translate that..then will be possible i guess..]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Wed, 16 Jan 2008 08:48:29 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[yes please]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Wed, 16 Jan 2008 12:19:05 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[please just write the pseudo code,<br />what should i do to increase speed? <br /><br />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Wed, 16 Jan 2008 12:25:10 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[Ofcourse they have, In asm there is a subroutine named waitf and all my problem was that. In order to arrange pwms,  we should use it. But i didnt know how to use it, anywayi submit my last work as written below...<br />It may have problems:S<br /><br /> <div class='code_asm'>CODE:</div><div class='code_highlight' style='unicode-bidi: embed; direction: ltr'><div class="asm" style="font-family: monospace;"><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /><span style="color: #adadad; font-style: italic;">; cursor function</span><br />cursor&nbsp; <span style="color: #0000ff;">macro</span>&nbsp; &nbsp;r,<span style="color: #0000ff;">c</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span>&nbsp; &nbsp; &nbsp;<span style="color: #46aa03; font-weight:bold;">bh</span>,<span style="color: #ff0000;">00</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">ah</span>,<span style="color: #ff0000;">02</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span>&nbsp; &nbsp; &nbsp;<span style="color: #46aa03; font-weight:bold;">dh</span>,r<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dl</span>,<span style="color: #0000ff;">c</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">int</span> 10h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">endm</span><br /><br /><br /><span style="color: #adadad; font-style: italic;">; display function</span><br />display <span style="color: #0000ff;">macro</span>&nbsp; &nbsp;<span style="color: #00007f; font-weight:bold;">str</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">ah</span>,<span style="color: #ff0000;">09h</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #0000ff;">offset</span> <span style="color: #00007f; font-weight:bold;">str</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">int</span> 21h<br /><span style="color: #0000ff;">endm</span><br /><br />waitf &nbsp; <span style="color: #0000ff;">macro</span> &nbsp; <span style="color: #adadad; font-style: italic;">; al times</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">local</span> waitloops<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">shl</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waitloops:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00007f; font-weight:bold;">dec</span> <span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00007f; font-weight:bold;">jnz</span> waitloops<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">endm</span><br /><br /><span style="color: #0000ff;">.model</span> small<br />.<span style="color: #0000ff;">stack</span> <span style="color: #ff0000;">64</span><br />.<span style="color: #0000ff;">data</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #adadad; font-style: italic;">;Seven Segment Table</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; zero&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">01011011b</span><span style="color: #adadad; font-style: italic;">;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; |&nbsp; &nbsp; -&nbsp; &nbsp; &nbsp; -&nbsp; &nbsp; &nbsp; &nbsp;| |&nbsp; &nbsp; &nbsp;|-&nbsp; &nbsp; &nbsp; |-&nbsp; &nbsp; &nbsp; -|&nbsp; &nbsp; &nbsp; |-|&nbsp; &nbsp; &nbsp;|-|</span><br />&nbsp; &nbsp; &nbsp; &nbsp; one&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">00000110b</span><span style="color: #adadad; font-style: italic;">;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| |&nbsp; | &nbsp; &nbsp;_|&nbsp;_| &nbsp; - &nbsp;|- &nbsp;|_&nbsp; -|&nbsp; &nbsp; &nbsp; &nbsp;-&nbsp; &nbsp; &nbsp; &nbsp;-</span><br />&nbsp; &nbsp; &nbsp; &nbsp; two&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">01011011b</span><span style="color: #adadad; font-style: italic;">;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; |_&nbsp; _|&nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; _| |_|&nbsp; |&nbsp; &nbsp; &nbsp; |_|&nbsp; &nbsp; &nbsp; _|</span><br />&nbsp; &nbsp; &nbsp; &nbsp; three&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">01001111b</span><span style="color: #adadad; font-style: italic;">;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; four&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">01100110b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; five&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">01101101b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; six&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">01111101b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; seven&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">00000111b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; eight&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">01111111b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; nine&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">01101111b</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; direction &nbsp; <span style="color: #0000ff;">db</span> &nbsp;<span style="color: #7f007f;">'n'</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; speedCtr&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; ?<br />&nbsp; &nbsp; &nbsp; &nbsp; delayCtr &nbsp; &nbsp;<span style="color: #0000ff;">db</span> &nbsp;?<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; l1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span>&nbsp; &nbsp; &nbsp; <span style="color: #7f007f;">'&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Welcome&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '</span>,<span style="color: #7f007f;">'$'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; l2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span> &nbsp;<span style="color: #7f007f;">'&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Press f to rotate clockwise&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '</span>,<span style="color: #7f007f;">'$'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; l3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span> &nbsp;<span style="color: #7f007f;">'&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; Press r to rotate counter-clockwise&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '</span>,<span style="color: #7f007f;">'$'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; l4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span> &nbsp;<span style="color: #7f007f;">'&nbsp; &nbsp;You may adjust the speed by '</span>u<span style="color: #7f007f;">' for up and '</span>d<span style="color: #7f007f;">'for down&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '</span>,<span style="color: #7f007f;">'$'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; l5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span> &nbsp;<span style="color: #7f007f;">'&nbsp; &nbsp; &nbsp;You can see the motor speed on the 7-seg&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '</span>,<span style="color: #7f007f;">'$'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; l6&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">db</span> &nbsp;<span style="color: #7f007f;">'&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Press q to quit the program&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '</span>,<span style="color: #7f007f;">'$'</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />.<span style="color: #0000ff;">code</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,378h&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #adadad; font-style: italic;">;parallel port initialization</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">00h</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #adadad; font-style: italic;">;for writing data</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #adadad; font-style: italic;">; D7 is for forward D6 is for backward D5 is for enabling of dc motor with L293d</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; main:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span>&nbsp; &nbsp; &nbsp;<span style="color: #46aa03; font-weight:bold;">ax</span>,@<span style="color: #0000ff;">data</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span>&nbsp; &nbsp; &nbsp;<span style="color: #46aa03; font-weight:bold;">ds</span>,<span style="color: #46aa03; font-weight:bold;">ax</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #adadad; font-style: italic;">;clr</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor <span style="color: #ff0000;">2</span>,<span style="color: #ff0000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display l1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor <span style="color: #ff0000;">4</span>,<span style="color: #ff0000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display l2<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor <span style="color: #ff0000;">6</span>,<span style="color: #ff0000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display l3<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor <span style="color: #ff0000;">8</span>,<span style="color: #ff0000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display l4<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor <span style="color: #ff0000;">10</span>,<span style="color: #ff0000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display l5<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor <span style="color: #ff0000;">12</span>,<span style="color: #ff0000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display l6<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor <span style="color: #ff0000;">16</span>,<span style="color: #ff0000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span>&nbsp; &nbsp; &nbsp;speedCtr,<span style="color: #ff0000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> delayCtr,<span style="color: #ff0000;">10</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; key_check:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">ah</span>,<span style="color: #ff0000;">01</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">int</span> 16h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">ah</span>,<span style="color: #ff0000;">00</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">int</span> 16h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #7f007f;">'r'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span>&nbsp; &nbsp; &nbsp; r_pressed<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #7f007f;">'f'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> f_pressed<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #7f007f;">'u'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> up_pressed<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #7f007f;">'d'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> down_pressed<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #7f007f;">'q'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span>&nbsp; &nbsp; &nbsp; quit<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> key_check<br /><br />&nbsp; &nbsp; here: &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dl</span>,speedCtr<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> speedCtr,<span style="color: #ff0000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> zerow<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> speedCtr,<span style="color: #ff0000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> onew<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> speedCtr,<span style="color: #ff0000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> twow<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> speedCtr,<span style="color: #ff0000;">3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> threew<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> speedCtr,<span style="color: #ff0000;">4</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> fourw<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> speedCtr,<span style="color: #ff0000;">5</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> fivew<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> speedCtr,<span style="color: #ff0000;">6</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> sixw<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> speedCtr,<span style="color: #ff0000;">7</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> sevenw<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> speedCtr,<span style="color: #ff0000;">8</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> eightw<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> speedCtr,<span style="color: #ff0000;">9</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> ninew &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> endt<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zerow:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,378h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">00000000b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> endt<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; onew:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,378h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">00010000b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> endt<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; twow:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,378h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">00100000b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> endt<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; threew:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,378h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">00110000b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> endt<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fourw:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,378h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">01000000b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> endt<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fivew:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,378h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">01010000b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> endt<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sixw:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,378h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">01100000b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> endt<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sevenw:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,378h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">01110000b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> endt<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eightw:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,378h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">10000000b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> endt<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ninew:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,378h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">00000000b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; endt:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> key_check<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; r_pressed:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> direction,<span style="color: #7f007f;">'n'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jne</span> check_r<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> direction,<span style="color: #7f007f;">'r'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #adadad; font-style: italic;">;delay 2;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wait for 2 seconds and then start rotating in reverse direction</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #adadad; font-style: italic;">;reverse e 1 gonderme fonksiyonu</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rgoes:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">127</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waitf<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">00000001b</span><span style="color: #adadad; font-style: italic;">;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 00000001B for reverse direction</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,378h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> here<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span>&nbsp; &nbsp; &nbsp;key_check<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; f_pressed:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> direction,<span style="color: #7f007f;">'n'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jne</span> check_r<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> direction,<span style="color: #7f007f;">'f'</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fgoes:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">100</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waitf<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">00000010b</span><span style="color: #adadad; font-style: italic;">;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 00000010B for forward direction</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,378h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> here<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span>&nbsp; &nbsp; &nbsp;key_check<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; check_f:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> direction,<span style="color: #7f007f;">'f'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> fgoes<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waitf <span style="color: #ff0000;">1000</span><span style="color: #adadad; font-style: italic;">;to delay when changing direction</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jne</span> rgoes<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;check_r:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> direction,<span style="color: #7f007f;">'r'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> rgoes<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jne</span> fgoes&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; stop:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">00000000b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,378h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">100</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> here<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> key_check<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; down_pressed:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">dec</span> speedCtr<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">inc</span> delayCtr<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> speedCtr,<span style="color: #ff0000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> stop<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> direction,<span style="color: #7f007f;">'f'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> goingforward<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> direction,<span style="color: #7f007f;">'r'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">dec</span> speedCtr<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">inc</span> delayCtr<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> goingbackward<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; goingforward: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">00000010b</span><span style="color: #adadad; font-style: italic;">;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #ff0000;">0378h</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,speedCtr<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waitf<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">00000000b</span><span style="color: #adadad; font-style: italic;">;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,delayCtr<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waitf<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> key_check<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> goingforward<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #adadad; font-style: italic;">;pwm signallerini azaltan fonksiyon</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #adadad; font-style: italic;">;7segment e speedCtr bastiran fonksiyon</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> here<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span>&nbsp; &nbsp; &nbsp;key_check<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; goingbackward:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">00000001b</span> <span style="color: #adadad; font-style: italic;">;PIN NUMARASI</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #ff0000;">0378h</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,speedCtr<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waitf<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">00000000b</span><span style="color: #adadad; font-style: italic;">;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,delayCtr<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waitf<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> key_check<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> goingbackward<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #adadad; font-style: italic;">;pwm signallerini azaltan fonksiyon</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #adadad; font-style: italic;">;7segment e speedCtr bastiran fonksiyon</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> here<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span>&nbsp; &nbsp; &nbsp;key_check<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; up_pressed:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> direction,<span style="color: #7f007f;">'f'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> increase_forward<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> direction,<span style="color: #7f007f;">'b'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> increase_backward<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> key_check<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; increase_forward:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">inc</span> speedCtr<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> speedCtr,<span style="color: #ff0000;">9</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> key_check<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">dec</span> delayCtr<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">00000010b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #ff0000;">0378h</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,speedCtr<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waitf<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">00000000b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,delayCtr<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waitf<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00007f; font-weight:bold;">jmp</span> here<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00007f; font-weight:bold;">jmp</span> key_check<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; increase_backward:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">inc</span> speedCtr<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">cmp</span> speedCtr,<span style="color: #ff0000;">9</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">je</span> key_check<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">dec</span> delayCtr<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">00000001b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #ff0000;">0378h</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,speedCtr<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waitf<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,<span style="color: #ff0000;">00000000b</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">out</span> <span style="color: #46aa03; font-weight:bold;">dx</span>,<span style="color: #46aa03; font-weight:bold;">al</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">al</span>,delayCtr<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waitf<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span> here<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">jmp</span>&nbsp; &nbsp; &nbsp;key_check<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; quit:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">mov</span> <span style="color: #46aa03; font-weight:bold;">ah</span>,4ch<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">int</span> 21h<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">end</span>&nbsp; &nbsp; &nbsp;main<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /><br />&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp;</div></div>]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Thu, 17 Jan 2008 17:23:46 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[Actually in PWM, timers should use interrupts.. wait routine will not work..<br />i hope you have read the concept of PWM. So all we need to do is change the width of high level. if width is 255 then speed will be full and if width is 0 then speed will be low/motor stops.<br /><br />in the PWM code i gave you.. it works like this..<br />R7 contains the value of high level and ranges from 0 to 255 as i explained.<br />for pwm, i used a flag to indicate if high part of the square wave is done or not, coz the values loaded in the timer are different for both high and low level of square wave but the total value of high and low is 255.<br />So lets say if high is 50, i.e. R7 is loaded with 50 and low will be 255-50 = 205.<br />you can see in the code too.. during one part of PWM i am loading Timers with R7 and in other part of square wave i am loading 255-R7 in timer.<br />so total 255 will remain constant only i am changing the value of R7 to control the width. you can possibly make your program to work as i explained.]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Fri, 18 Jan 2008 06:05:37 -0800</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[I want to convert L293D component to library and model file in proteus. But I cant make proper MDF file. Simulation part is starting but motors are not working.]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Thu, 20 Mar 2008 04:29:43 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
						<item>
						<title>Re: RS232 Simulation?</title>
<link>http://www.8051projects.net/forum-t4572.html</link>
<description><![CDATA[to create models you need VSM SDK. All you need to do is use APIs provided... i never tried making one.. but now you have encouraged me to try it out..<br />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Thu, 20 Mar 2008 13:29:10 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t4572.html</guid>
</item>
				</channel>
				</rss>