?? basic-twi-eeprom-project.html
字號:
?<!DOCTYPE PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Atmel Corporation - Basic TWI EEPROM 1.4</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<h1>Basic TWI EEPROM Project 1.4</h1>
<div id="breadcrumb">
<a href="../index.html">Main</a> >
<a href="examples.html">Examples</a> >
TWI EEPROM
</div>
<h2>Purpose</h2>
<p>
This example program demonstrates how to use the TWI peripheral of an AT91 microcontroller to
access an external serial EEPROM chip.
</p>
<h2>Hardware Requirements</h2>
<p class="requirements">
This package can be used with any of the AT91 Evaluation Kits except the AT91CAP9-STK.
</p>
<p>
An external serial EEPROM must be connected to the TWI bus of the microcontroller.
For further information on this topic, please refer to the following application note:
<a href="http://www.atmel.com/dyn/resources/prod_documents/doc6327.pdf">
Using the Two-wire interface (TWI) in Master Mode on AT91 Microcontrollers</a>.
</p>
<p>
Pay particular attention to the fact that on some boards, such as the AT91SAM7S-EK, there is
no pull-up on the TWI bus: they must be added externally.
</p>
<h2>Description</h2>
<p>
This software performs simple tests on the first and second page of the EEPROM:
<ul>
<li>Sets both pages to all zeroes</li>
<li>Writes pattern in page #0 (polling)</li>
<li>Reads back data in page #0 and compare with original pattern (polling)</li>
<li>Writes pattern in page #1 (interrupts)</li>
<li>Reads back data in page #1 and compare with original pattern (interrupts)</li>
</ul>
</p>
<h2>Usage</h2>
<ol>
<li>
Compile the application.
</li>
<li>
Connect the DBGU port of the evaluation board to the computer
and open it in a terminal.
</li>
<ul>
<li>Settings: 115200 bauds, 8 bits, 1 stop bit, no parity, no flow control.</li>
</ul>
<li>
Download the program inside the evaluation board and run it. Please refer
to the <a href="http://www.atmel.com/dyn/resources/prod_documents/doc6132.pdf">SAM-BA User Guide</a>,
the <a href="http://www.atmel.com/dyn/resources/prod_documents/doc6310.pdf">GNU-Based Software Development</a>
application note or to the <a href="http://www.iar.se/website1/1.0.1.0/78/1/index.php?">IAR EWARM User Guide</a>,
depending on your chosen solution.
</li>
<li>
Upon startup, the application will output the following line on the DBGU:
<blockquote>
<code>
-- Basic TWI EEPROM Project 1.4 --<br />
</code>
</blockquote>
</li>
<li>
The following traces detail operations on the EEPROM, displaying success or error messages
depending on the results of the commands.
</li>
</ol>
<h6>Atmel Corporation ?2008</h6>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -