******************************************************************************* ** Copyright © 2008, Xilinx, Inc. ** This design is confidential and proprietary of Xilinx, Inc. All Rights Reserved. ******************************************************************************* ** ____ ____ ** / /\/ / ** /___/ \ / Vendor: Xilinx ** \ \ \/ Version: 1.0 ** \ \ Filename: real_time_clock_readme.txt ** / / ** /___/ /\ ** \ \ / \ ** \___\/\___\ ** **Device: **Purpose: **Reference: ** ******************************************************************************* ** ** Disclaimer: LIMITED WARRANTY AND DISCLAIMER. These designs are ** provided to you "as is." Xilinx and its licensors make and you ** receive no warranties or conditions, express, implied, ** statutory or otherwise, and Xilinx specifically disclaims any ** implied warranties of merchantability, noninfringement, or ** fitness for a particular purpose. Xilinx does not warrant that ** the functions contained in these designs will meet your ** requirements, or that the operation of these designs will be ** uninterrupted or error free, or that defects in the Designs ** will be corrected. Furthermore, Xilinx does not warrant or ** make any representations regarding use or the results of the ** use of the designs in terms of correctness, accuracy, ** reliability, or otherwise. ** ** LIMITATION OF LIABILITY. In no event will Xilinx or its ** licensors be liable for any loss of data, lost profits, cost ** or procurement of substitute goods or services, or for any ** special, incidental, consequential, or indirect damages ** arising from the use or operation of the designs or ** accompanying documentation, however caused and on any theory ** of liability. This limitation will apply even if Xilinx ** has been advised of the possibility of such damage. This ** limitation shall apply notwithstanding the failure of the ** essential purpose of any limited remedies herein. ** ******************************************************************************* Application: real_time_clock ---------------------------- This IIC example reads the real time clock chip and tests the alarm. CONFIG Switch Settings: 00010101 1. Connect the Host PC to the ML510 (J9 header) using a PC-IV or Platform USB JTAG cable 2. Connect the Host PC serial port to the ML510 serial port using a null modem cable and launch a terminal program on the Host (eg. TeraTerm) with the settings: 9600 baud, 8-N-1, No flow control 3. Launch XPS and open the ML510 EDK project (ml510_bsb_system.xmp) 4. Launch a Shell window using XPS menu selection: Project > Launch EDK Shell 5. Download bitstream in shell window by typing: impact -batch etc/download.cmd 6. XPS menu selection: Debug > Launch XMD 7. At XMD% prompt type: dow microblaze_0/code/real_time_clock.elf 8. At XMD% prompt type: con Serial Port Output: ------------------- IIC Dynamic mode RTC8566 Real Time Clock access example - Writing Nov Mon 5 14:50:30 2007 to the Real Time Clock Reading all registers from the RTC8564 Real Time Clock device Register 0x00 = 0x00 (0) Register 0x01 = 0x04 (4) Register 0x02 = 0x30 (48) Register 0x03 = 0x50 (80) Register 0x04 = 0x14 (20) Register 0x05 = 0x05 (5) Register 0x06 = 0x31 (49) Register 0x07 = 0xAB (171) Register 0x08 = 0x07 (7) Register 0x09 = 0x51 (81) Register 0x0A = 0x54 (84) Register 0x0B = 0x45 (69) Register 0x0C = 0x41 (65) Register 0x0D = 0xB0 (176) Register 0x0E = 0xB2 (178) Register 0x0F = 0x02 (2) RTC is currently set to: Nov Mon 5 14:50:31 2007 Real Time time/date set PASS Please wait until 14:51... Real Time alarm test PASS Test passed