<?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 20:22:50 -0800</pubDate>
				<lastBuildDate>Thu, 08 Jan 2009 20:22:50 -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>AT89S51 + AT24C01A</title>
<link>http://www.8051projects.net/forum-t623.html</link>
<description><![CDATA[Hi all, I'm trying to write a code so I can store some data to AT24C01A. <br /><br />What is the write and read address for AT24C01A ?. For example, DS1307 write = 0D0H and read = 0D1H. <br /><br />1). I have read the datasheet, but could figure out what is the address. <br /><br />2). To Rickey : I have downloaded your I2C routine from 8052.cm. Can I use this routine to write and read AT24C01A ?. What modifications to be made ?. <br /><br />3). If I want to store (write) data to AT24C01A, how to define the address register in AT24C01A ?. I couldn't find it in the datasheet. For example, in DS1307, I saw code  defining alarm equ 08H (08H = first register address in DS1307 RAM). <br /><br />Thanks all.<br />SGH]]></description>
<pubDate>Wed, 28 Mar 2007 22:19:26 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t623.html</guid>
</item>
						<item>
						<title>Re: AT89S51 + AT24C01A</title>
<link>http://www.8051projects.net/forum-t623.html</link>
<description><![CDATA[well.. i hope you've seen the datasheet carefully <img src='http://www.8051projects.net/e107_images/emotes/yahoo/1.gif' alt='' style='vertical-align:middle; border:0' /> <br />http://www.selectronic.fr/includes_selectronic/pdf/ATMEL/24C16.pdf<br />on page 8 you can find the address for the EEPROM.<br />on page 7 you will information regarding how to write program.<br /><br />yes you can use my I2C program, those are the basic things required for I2C communication. rest of the program you can write yourself as i mentioned see page 7 for more details about how to read, write and poll for acknowledgment. poll for ack coz its EEPROM so when you write something it will take time to store it, and you wont get ack unless its written. I hope you understood. please see page 7 carefully <img src='http://www.8051projects.net/e107_images/emotes/yahoo/1.gif' alt='' style='vertical-align:middle; border:0' /> <br />and page 8,9 for reading and writing to particular address. as its 1K (AT24C01) EEPROM, so address will be from 0000 to 03FF so that can be anywhere u want.. see page 8,9 for sequential write and random write <img src='http://www.8051projects.net/e107_images/emotes/yahoo/3.gif' alt='' style='vertical-align:middle; border:0' /> <br />enjoy programming!]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Thu, 29 Mar 2007 05:41:15 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t623.html</guid>
</item>
						<item>
						<title>Re: AT89S51 + AT24C01A</title>
<link>http://www.8051projects.net/forum-t623.html</link>
<description><![CDATA[Hi Rickey,<br /><br />Thanks for the info. I'll read the datasheet again.]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Thu, 29 Mar 2007 19:00:42 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t623.html</guid>
</item>
						<item>
						<title>Re: AT89S51 + AT24C01A</title>
<link>http://www.8051projects.net/forum-t623.html</link>
<description><![CDATA[Yes If anymore problem you may ask anytime <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>Fri, 30 Mar 2007 11:28:18 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t623.html</guid>
</item>
						<item>
						<title>Re: AT89S51 + AT24C01A</title>
<link>http://www.8051projects.net/forum-t623.html</link>
<description><![CDATA[1). Referring to AT24C01A, I'm confused (as I'm newbie in microcontroller), is it 128 bytes or 1 K bytes ?. If 128 bytes, then last address is 7FH, and if 1024 bytes, then last address is 3FF ?.<br /><br />2). Below is the quote you posted in other thread for DS1307. <br /><br />You wrote : <br />i am writing some steps how to read from DS1307<br />Start<br />Send slave address with write bit<br />send the subaddress from where you want to read<br />start condition again [NOTE:dont send stop before this]<br />send slave address with read bit<br />start reading.<br />So the above steps are applied in the code as..<br /><br />run1: acall startc<br />mov a,#0d0h<br />acall send<br />mov a,#00h<br />acall send<br />mov r6,#3fh<br />acall startc<br />mov a,#0d1h<br />acall send<br />mov r0,#40h<br />here: acall recv<br />djnz r6,here<br />acall stop<br /><br />If I understand it correctly, 3FH = last address in DS1307 and we inserted 40H into R0 simply to tell the microcontroller it is the last data to be read ?. <br /><br />In DS1307, normally only two data were stored inside, that is hour and minute (alarm) time. Even only two data were stored into the DS1307, the microcontroller will read the entire memory from 00H to 3FH and end the process if reach 40H ?. <br /><br />Can this procedures (read the entire address) applied to AT24C01A ?. What about when writing to AT24C01A ?.<br /><br />3). If I have 10 data to be stored into the AT24C01A, for example : Data_1,............, Data_10, do I need to make a descriptions like this : Data_1 equ 00H, Data_2 equ 1H,..........Data_10 equ 9H (to specify each data address in AT24C01A RAM) ?.<br /><br />Sorry for the long post.<br /><br />Thanks,<br />SGH<br />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Sun, 01 Apr 2007 20:12:14 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t623.html</guid>
</item>
						<item>
						<title>Re: AT89S51 + AT24C01A</title>
<link>http://www.8051projects.net/forum-t623.html</link>
<description><![CDATA[<div class='quote_top'>SGH wrote ...</div><div class='quote'><br />1). Referring to AT24C01A, I'm confused (as I'm newbie in microcontroller), is it 128 bytes or 1 K bytes ?. If 128 bytes, then last address is 7FH, and if 1024 bytes, then last address is 3FF ?.<br /></div><br />AT24C01 is 1Kbytes see in the datasheet the first page its mentioned there.<br /><div class='quote_top'>SGH wrote ...</div><div class='quote'><br />2). Below is the quote you posted in other thread for DS1307. <br /><br />You wrote : <br />i am writing some steps how to read from DS1307<br />Start<br />Send slave address with write bit<br />send the subaddress from where you want to read<br />start condition again [NOTE:dont send stop before this]<br />send slave address with read bit<br />start reading.<br />So the above steps are applied in the code as..<br /><br />run1: acall startc<br />mov a,#0d0h<br />acall send<br />mov a,#00h<br />acall send<br />mov r6,#3fh<br />acall startc<br />mov a,#0d1h<br />acall send<br />mov r0,#40h<br />here: acall recv<br />djnz r6,here<br />acall stop<br /><br />If I understand it correctly, 3FH = last address in DS1307 and we inserted 40H into R0 simply to tell the microcontroller it is the last data to be read ?. <br /><br />In DS1307, normally only two data were stored inside, that is hour and minute (alarm) time. Even only two data were stored into the DS1307, the microcontroller will read the entire memory from 00H to 3FH and end the process if reach 40H ?. <br /><br />Can this procedures (read the entire address) applied to AT24C01A ?. What about when writing to AT24C01A ?.<br /></div><br />you are not reading in a correct way, there is only 40 bytes of ram in the DS1307 so the subaddress will be only 1 byte e.g. you want to read from 3F location then <br />run1: acall startc ;this example is for DS1307<br />mov a,#0d0h<br />acall send<br />mov r6,#3fh<br />acall startc<br />mov a,#0d1h<br />acall send<br />acall recv<br />;after the above instruction the data will be in ACC<br />;so can be stored anywhere you want<br />mov r4,a ;i am storing in r4<br />acall stop<br /><br />but in case of EEPROM, your subaddress is 2 bytes so, while sending subaddress you will first send high of subaddress and then lower byte of subaddress. This way you can read it.<br />and for sequential read, keep on recieving the data until you want to stop.<br />and as you said. that data space in DS1307 is only 40bytes, so when you reach 3F while reading, it will roll back to 00H and starts again. so its continuous process until you stop.<br /><div class='quote_top'>SGH wrote ...</div><div class='quote'><br />3). If I have 10 data to be stored into the AT24C01A, for example : Data_1,............, Data_10, do I need to make a descriptions like this : Data_1 equ 00H, Data_2 equ 1H,..........Data_10 equ 9H (to specify each data address in AT24C01A RAM) ?.<br /></div><br />you can also define e.g. <br />DB 03H,04H,05H,00H<br />so this will store bytes on your desired location in 8051 ROM and when you want to write this data, then simply make a routine like...<br />send start<br />send slave add with write bit<br />send subadd<br />send data<br />send data ; if multiple data, you can also use a loop<br />send stop ; when all data is sent<br /><br />loop e.g.<br />send start<br />send slave add with write bit<br />send subadd<br />load counter ; load how many bytes to send<br />load data from location is controller's ROM<br />dec counter and check for zero<br />if not zero go back else stop<br />send stop<br /><br />so this way you can do sequential write.  <strong class='bbcode bold'>But one thing is important in case of AT24C01 or any other I2C EEPROM, that you have to wait until u get acknowledgment from EEPROM.</strong>  I hope you have seen in datasheet of memory for ack polling. this is only done during writing..<br />but the above is not applicable in case of DS1307 coz it has RAM not ROM.<br /><div class='quote_top'>SGH wrote ...</div><div class='quote'><br />Sorry for the long post.<br /><br />Thanks,<br />SGH<br /></div><br />don't worry about long posts, <img src='http://www.8051projects.net/e107_images/emotes/yahoo/1.gif' alt='' style='vertical-align:middle; border:0' />  doubts can be big or small <img src='http://www.8051projects.net/e107_images/emotes/yahoo/1.gif' alt='' style='vertical-align:middle; border:0' />  just ask.]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 02 Apr 2007 02:43:15 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t623.html</guid>
</item>
						<item>
						<title>Re: AT89S51 + AT24C01A</title>
<link>http://www.8051projects.net/forum-t623.html</link>
<description><![CDATA[Rickey, you published I2C code in 8052 forum. <br /><br />Which line in your send and receive routine for acknowledge ?. <br /><br />I read in a routine published by Rentron Electronics for AT89C2051 + DS1307, for example in their send_byte routine, it used JNB SDA to check for acknowledge.  <br /><br />What is the function of rlc c in your routine ?.<br /><br /><br />Thanks,<br />SGH<br />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Sat, 21 Apr 2007 08:46:49 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t623.html</guid>
</item>
						<item>
						<title>Re: AT89S51 + AT24C01A</title>
<link>http://www.8051projects.net/forum-t623.html</link>
<description><![CDATA[In my routines, i am not checking for ack! i am assuming that the data transfer is perfect and ack is received. thats the reason, it cannot be used for EEPROM.<br />but my C routines can be used for EEPROM and any I2C device.<br /><br />RLC A instruction means <em class='bbcode italic'>"rotate left through carry"</em><br />whatever is there in A is rotated left and the MSB is copied back to the place of LSB and all bits are shifted by 1 toward left. and the MSB is also copied to the Carry flag.<br />e.g.<br />A is 0x10110100 and carry is 0<br />after RLC A<br />A is 0x01101001 and carry is 1]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Sat, 21 Apr 2007 10:54:08 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t623.html</guid>
</item>
						<item>
						<title>Re: AT89S51 + AT24C01A</title>
<link>http://www.8051projects.net/forum-t623.html</link>
<description><![CDATA[Do you have I2C code in assembly language as I don't understand C language ?.]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Wed, 12 Mar 2008 19:44:35 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t623.html</guid>
</item>
						<item>
						<title>Re: AT89S51 + AT24C01A</title>
<link>http://www.8051projects.net/forum-t623.html</link>
<description><![CDATA[my old I2C code wont work with EEPROM. check I2C library section in download area.]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Wed, 12 Mar 2008 11:05:13 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t623.html</guid>
</item>
						<item>
						<title>Re: AT89S51 + AT24C01A</title>
<link>http://www.8051projects.net/forum-t623.html</link>
<description><![CDATA[After a while, I still unable to write a correct code to write and read from EEPROM (AT24C01A). I have read the datasheet many times and still could not figure out the way to write the proper code.<br /><br />Would you please help me or let me know where I can download the routine (in assembly). I'm using AT24C01A with AT89S51.<br /><br />Thanks,<br />SGH]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Tue, 11 Mar 2008 19:34:10 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t623.html</guid>
</item>
						<item>
						<title>Re: AT89S51 + AT24C01A</title>
<link>http://www.8051projects.net/forum-t623.html</link>
<description><![CDATA[I think you will find asm codes in download section. check carefully.]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Thu, 13 Mar 2008 01:37:47 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t623.html</guid>
</item>
						<item>
						<title>Re: AT89S51 + AT24C01A</title>
<link>http://www.8051projects.net/forum-t623.html</link>
<description><![CDATA[Sorry Rickey, would you please guide me to specific title of this routine in "Download - Libraries" section.<br /><br />Thanks.]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Thu, 13 Mar 2008 19:14:32 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t623.html</guid>
</item>
						<item>
						<title>Re: AT89S51 + AT24C01A</title>
<link>http://www.8051projects.net/forum-t623.html</link>
<description><![CDATA[<a class='bbcode' href='http://www.8051projects.net/downloads6.html' rel='external'  target='_blank'>http://www.8051projects.net/downloads6.html</a>]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Fri, 14 Mar 2008 10:46:18 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t623.html</guid>
</item>
						<item>
						<title>Re: AT89S51 + AT24C01A</title>
<link>http://www.8051projects.net/forum-t623.html</link>
<description><![CDATA[well i think you did not check the download section carefully..<br />here are few i was talkin about..<br /><br /><a class='bbcode' href='http://www.8051projects.net/downloads94.html' rel='external'  target='_blank'>Serial EEPROM Library</a><br /><a class='bbcode' href='http://www.8051projects.net/downloads89.html' rel='external'  target='_blank'>AT24C256 Library</a><br /><a class='bbcode' href='http://www.8051projects.net/downloads51.html' rel='external'  target='_blank'>Serial EEPROM Driver</a><br /><a class='bbcode' href='http://www.8051projects.net/downloads22.html' rel='external'  target='_blank'>24C16 Routines</a><br /><br />Check all of them.. I think the last one will suit you..]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 17 Mar 2008 12:42:35 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t623.html</guid>
</item>
						<item>
						<title>Re: AT89S51 + AT24C01A</title>
<link>http://www.8051projects.net/forum-t623.html</link>
<description><![CDATA[Thanks sashijoseph. <br /><br />I think this routine is an old routine which Rickey said it doesn't work for SEEPROM and only work for DS1307. Is this correct ?.<br /><br /><br /><br />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Sun, 16 Mar 2008 18:58:52 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t623.html</guid>
</item>
				</channel>
				</rss>