<?xml version="1.0" encoding="utf-8" ?>
				<!-- generator="e107" -->
				<!-- content type="Forum / topic" -->
				<rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
				<channel rdf:about="http://www.8051projects.net/">
				<title>8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes : Forum / topic</title>
				<link>http://www.8051projects.net/</link>
				<description>Learn to make simple microcontroller projects, pic, 8051, avr and arm projects. download 8051 projects, tutorials, libraries, sample codes. join the microcontroller discussion forum and ask doubts regarding electronics. the best source for 8051 over internet.</description>
				<dc:language>en-gb</dc:language>
				<dc:date>2009-01-07T18:28:11-08:00</dc:date>
				<dc:creator>contact@nospam.com</dc:creator>
				<admin:generatorAgent rdf:resource="http://e107.org" />
				<admin:errorReportsTo rdf:resource="mailto:contact@nospam.com" />
				<sy:updatePeriod>hourly</sy:updatePeriod>
				<sy:updateFrequency>1</sy:updateFrequency>
				<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
				<items>
				<rdf:Seq>
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10135.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10135.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10135.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10135.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10135.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10135.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10135.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10135.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10135.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10135.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10135.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t10135.html" />
				</rdf:Seq>
				</items>
				</channel>
						<item rdf:about="http://www.8051projects.net/forum-t10135.html">
						<title>AT89C51 using proteus ISIS</title>
						<link>http://www.8051projects.net/forum-t10135.html</link>
						<dc:date>2009-01-07T18:28:11-08:00</dc:date>
						<dc:creator></dc:creator>
						<dc:subject></dc:subject>
						<description>4 years back I did a project Home Automations using AT89C51, I need to do something similar to it. But I am facing a very strange problem this time.I am reffering Embedded C book by Michael Pont, I used a very basic program (provided with the book) as under and compiled it using Keil compiler. CODE:<br />/*------------------------------------------------------------*-<br />Hello.C (v1.00)<br />-------------------------------------------------------------<br />A "Hello Embedded World" test program for 8051.<br />-*------------------------------------------------------------*/<br /><br />#include &lt;reg52.h><br /><br />// LED is to be connected to this pin<br />sbit LED_pin = P1^5;<br /><br />// Stores the LED state<br />bit LED_state_G;<br /><br />// Function prototypes<br />void LED_FLASH_Init&#40;void&#41;;<br />void LED_FLASH_Change_State&#40;void&#41;;<br />void DELAY_LOOP_Wait&#40;const unsigned int&#41;;<br /><br />/*............................................................*/<br /><br />void main&#40;void&#41;<br />&#123;<br />&nbsp; &nbsp; &nbsp; &nbsp; LED_FLASH_Init&#40;&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; while&#40;1&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &#123;<br />&nbsp; &nbsp; &nbsp; &nbsp; // Change the LED state (OFF to ON, or vice versa)<br />&nbsp; &nbsp; &nbsp; &nbsp; LED_FLASH_Change_State&#40;&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; // Delay for *approx* 1000 ms<br />&nbsp; &nbsp; &nbsp; &nbsp; DELAY_LOOP_Wait&#40;1000&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &#125;<br />&#125;<br /><br />/*------------------------------------------------------------*-<br />LED_FLASH_Init()<br />Prepare for LED_Change_State() function – see below.<br />-*------------------------------------------------------------*/<br /><br />void LED_FLASH_Init&#40;void&#41;<br />&#123;<br />&nbsp; &nbsp; &nbsp; &nbsp; LED_state_G = 0;<br />&#125;<br /><br />/*------------------------------------------------------------*-<br />LED_FLASH_Change_State()<br />Changes the state of an LED (or pulses a buzzer, etc) on a<br />specified port pin.<br />Must call at twice the required flash rate: thus, for 1 Hz<br />flash (on for 0.5 seconds, off for 0.5 seconds),<br />this function must be called twice a second.<br />-*------------------------------------------------------------*/<br /><br />void LED_FLASH_Change_State&#40;void&#41;<br />&#123;<br />&nbsp; &nbsp; &nbsp; &nbsp; // Change the LED from OFF to ON (or vice versa)<br />&nbsp; &nbsp; &nbsp; &nbsp; if &#40;LED_state_G == 1&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &#123;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LED_state_G = 0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LED_pin = 0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &#125;<br />&nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &#123;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LED_state_G = 1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LED_pin = 1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &#125;<br />&#125;<br /><br />/*------------------------------------------------------------*-<br />DELAY_LOOP_Wait()<br />Delay duration varies with parameter.<br />Parameter is, *ROUGHLY*, the delay, in milliseconds,<br />on 12MHz 8051 (12 osc cycles).<br />You need to adjust the timing for your application!<br />-*------------------------------------------------------------*/<br /><br />void DELAY_LOOP_Wait&#40;const unsigned int DELAY&#41;<br />&#123;<br />&nbsp; &nbsp; &nbsp; &nbsp; unsigned int x, y;<br />&nbsp; &nbsp; &nbsp; &nbsp; for &#40;x = 0; x &lt;= DELAY; x++&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &#123;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for &#40;y = 0; y &lt;= 120; y++&#41;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &#125;<br />&#125;<br /><br />/*------------------------------------------------------------*-<br />---- END OF FILE --------------------------------------------<br />-*------------------------------------------------------------*/<br />&nbsp; The code compiled successfully without any errors and without any warning. Then I used BIN2HEX by Keil to convert the object (compiled) file to the HEX code.Then I added the HEX file to the microcontroller in ISIS. Find below the image of the design.I checked the code in the Keil simulator and it is working. I don't know why it is NOT working in ISIS. Please help me. Let me know where I am going wrong!</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10135.html">
						<title>Re: AT89C51 using proteus ISIS</title>
						<link>http://www.8051projects.net/forum-t10135.html</link>
						<dc:date>2009-01-07T18:28:11-08:00</dc:date>
						<dc:creator>say2paul</dc:creator>
						<dc:subject></dc:subject>
						<description>Colin Mac wrote ...The crystal and supply isn't necessary in Isis and neither is the reset pin. Remove everything. Get a dc supply, resistor and use a red led instead of that led so onlyP1.5 is being used. Dear Colin,I did as you said and the result is same. Please see the below image.</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10135.html">
						<title>Re: AT89C51 using proteus ISIS</title>
						<link>http://www.8051projects.net/forum-t10135.html</link>
						<dc:date>2009-01-07T18:28:11-08:00</dc:date>
						<dc:creator>Colin Mac</dc:creator>
						<dc:subject></dc:subject>
						<description>The crystal and supply isn't necessary in Isis and neither is the reset pin. Remove everything. Get a dc supply, resistor and use a red led instead of that led so onlyP1.5 is being used.</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10135.html">
						<title>Re: AT89C51 using proteus ISIS</title>
						<link>http://www.8051projects.net/forum-t10135.html</link>
						<dc:date>2009-01-07T18:28:11-08:00</dc:date>
						<dc:creator>say2paul</dc:creator>
						<dc:subject></dc:subject>
						<description>Dear pdi33,I am trying as Arun said,  but still unable to get the desired results.Can you please do it for me, find attached the required DSN files.http://www.8051projects.net/e107_files/public/1213937567_8461_FT10135_8051.zip</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10135.html">
						<title>Re: AT89C51 using proteus ISIS</title>
						<link>http://www.8051projects.net/forum-t10135.html</link>
						<dc:date>2009-01-07T18:28:11-08:00</dc:date>
						<dc:creator>Arun Kumar V</dc:creator>
						<dc:subject></dc:subject>
						<description>Hello say2paulin the above layout you have 3 errors:1) LED should be connected other way round  i,e cathode to pin p1.5, bcoz  micros  like 8051 can sink current better than source2) change resistor value to 100ohms3) connect the other end of  resistor to  5+ VCC not -5Veven if it doesn't work, then check the following :1) double click on the red LED and its properties box will pop up, there find  minimum trigger current field and change it to 2mA , by default it will be 10mA2) since you are using external complier to produce hex file, are you loading it correctly into micro, double click the micro component and a see its properties box, there you'll find path of the hex file to loaded  on the micro, browse for the correct hex file and update.3) check if the port pin you have declared in the code is the same  you have used in the schematic, save your design file and run the simulator, if every thing is right  it should work.all the bestArun</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10135.html">
						<title>Re: AT89C51 using proteus ISIS</title>
						<link>http://www.8051projects.net/forum-t10135.html</link>
						<dc:date>2009-01-07T18:28:11-08:00</dc:date>
						<dc:creator>pdi33</dc:creator>
						<dc:subject></dc:subject>
						<description>hi paul,do as arun says and if u still do not get it, attach the DSN file and let me simulate the same on my PC and find the error for u.Hope it works at ur place.   Good luck</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10135.html">
						<title>Re: AT89C51 using proteus ISIS</title>
						<link>http://www.8051projects.net/forum-t10135.html</link>
						<dc:date>2009-01-07T18:28:11-08:00</dc:date>
						<dc:creator>say2paul</dc:creator>
						<dc:subject></dc:subject>
						<description>say2paul wrote ...Dear pdi33,I am trying as Arun said,  but still unable to get the desired results.Can you please do it for me, find attached the required DSN files. 8051.zip</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10135.html">
						<title>Re: AT89C51 using proteus ISIS</title>
						<link>http://www.8051projects.net/forum-t10135.html</link>
						<dc:date>2009-01-07T18:28:11-08:00</dc:date>
						<dc:creator>Arun Kumar V</dc:creator>
						<dc:subject></dc:subject>
						<description>hello Say2paulin your zip file there is no hex file that is to be loaded into the micro, but any way i made a simple blink program and could run it on the your Design, and  here is the error you made DIRECT SHORT to the port pin , try dragging the resistor in your DSN file and you'll see the blunder.Now its Working !there's a thanks button you could use Arun</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10135.html">
						<title>Re: AT89C51 using proteus ISIS</title>
						<link>http://www.8051projects.net/forum-t10135.html</link>
						<dc:date>2009-01-07T18:28:11-08:00</dc:date>
						<dc:creator>pdi33</dc:creator>
						<dc:subject></dc:subject>
						<description>hi paul,Arun is right. just connect the LED correctly and ur code will work just fine . I have compiled ur code posted previously and tested it in ur ciruit after correcting the LED connections and it worked just as fine.</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10135.html">
						<title>Re: AT89C51 using proteus ISIS</title>
						<link>http://www.8051projects.net/forum-t10135.html</link>
						<dc:date>2009-01-07T18:28:11-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>I hope you have loaded the code in controller before running on proteus</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10135.html">
						<title>Re: AT89C51 using proteus ISIS</title>
						<link>http://www.8051projects.net/forum-t10135.html</link>
						<dc:date>2009-01-07T18:28:11-08:00</dc:date>
						<dc:creator>say2paul</dc:creator>
						<dc:subject></dc:subject>
						<description>Well.. all of you guys were really helpful. It was a mistake, I didn't know that Keil compiler can directly generate the HEX code by compiling the C file. What I was doing is generating a HEX file from the compiled Object file using BIN2HEX.Ajay guided me a way to directly generate HEX file from Keil compiler and now everything is working so smooth.Thanks every one!Now my next challenge is to make Infrared as an interface to the AT89C51 so that if I send some data to the Infrared sensor, the AT89C51 should process it accordingly.I don't have any idea how to start. If some one from you guide me through it!</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t10135.html">
						<title>Re: AT89C51 using proteus ISIS</title>
						<link>http://www.8051projects.net/forum-t10135.html</link>
						<dc:date>2009-01-07T18:28:11-08:00</dc:date>
						<dc:creator>say2paul</dc:creator>
						<dc:subject></dc:subject>
						<description>Thanks!</description>
						</item>
				</rdf:RDF>