******************************************************************************* ** Copyright © 2008, Xilinx, Inc. ** This design is confidential and proprietary of Xilinx, Inc. All Rights Reserved. ******************************************************************************* ** ____ ____ ** / /\/ / ** /___/ \ / Vendor: Xilinx ** \ \ \/ Version: 1.0 ** \ \ Filename: iic_eeprom_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: iic_eeprom ----------------------- This IIC example consists of a polled mode design which uses the Xilinx IIC peripheral in dynamic mode along with its low-level driver to access the IIC EEPROM (ST M24C08) on the ML510 board. 64 bytes of EEPROM memory, starting at offset 0x0, are read over the IIC bus. This IIC EEPROM is accessible at address 0x50 on the IIC_SCL_MAIN, IIC_SDA_MAIN IIC chain. Other devices on this IIC bus are the clock generator, the fan controller, and pins on the expansion header. 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/iic_eeprom.elf 8. At XMD% prompt type: con Serial Port Output: ------------------- IIC Dynamic mode EEPROM access example - Calling EEPROM ReadByte Routine BytesRead = 64 ReadBuffer[0] = 48 ReadBuffer[1] = 57 ReadBuffer[2] = 2D ReadBuffer[3] = 56 ReadBuffer[4] = 35 ReadBuffer[5] = 2D ReadBuffer[6] = 4D ReadBuffer[7] = 4C ReadBuffer[8] = 35 ReadBuffer[9] = 30 ReadBuffer[10] = 35 ReadBuffer[11] = 00 ReadBuffer[12] = 0C ReadBuffer[13] = 0D ReadBuffer[14] = 0E ReadBuffer[15] = 0F ReadBuffer[16] = 10 ReadBuffer[17] = 42 ReadBuffer[18] = 00 ReadBuffer[19] = 13 ReadBuffer[20] = 14 ReadBuffer[21] = 15 ReadBuffer[22] = 30 ReadBuffer[23] = 30 ReadBuffer[24] = 31 ReadBuffer[25] = 00 ReadBuffer[26] = 1A ReadBuffer[27] = 58 ReadBuffer[28] = 43 ReadBuffer[29] = 35 ReadBuffer[30] = 56 ReadBuffer[31] = 4C ReadBuffer[32] = 58 ReadBuffer[33] = 35 ReadBuffer[34] = 30 ReadBuffer[35] = 54 ReadBuffer[36] = 46 ReadBuffer[37] = 46 ReadBuffer[38] = 31 ReadBuffer[39] = 31 ReadBuffer[40] = 33 ReadBuffer[41] = 36 ReadBuffer[42] = 00 ReadBuffer[43] = 2B ReadBuffer[44] = 2C ReadBuffer[45] = 2D ReadBuffer[46] = 00 ReadBuffer[47] = 2F ReadBuffer[48] = 30 ReadBuffer[49] = 31 ReadBuffer[50] = 32 ReadBuffer[51] = 33 ReadBuffer[52] = 34 ReadBuffer[53] = 35 ReadBuffer[54] = 36 ReadBuffer[55] = 00 ReadBuffer[56] = 38 ReadBuffer[57] = 39 ReadBuffer[58] = 3A ReadBuffer[59] = 3B ReadBuffer[60] = 3C ReadBuffer[61] = 3D ReadBuffer[62] = 3E ReadBuffer[63] = 3F Test passed