⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 example-13.txt

📁 DSP TMS320 LF2407 or 243 经典 例程, from TI
💻 TXT
字号:
Example 13 : ATMEL AT24C32

 

Environment : 

This Example was made for TI's EVM-board TMS320F243. For this partcular exercise we need an additional external I2C-EEPROM (SOIC 8) connected to the GPIO Port D0,D1 and D2.  

Aim:

The program consists of some basic routines to write into / read out of an external serial I2C-EEPROM.  The signal SCL is connected to GPIO-D0, SDA to GPIO-D1 and WP to GPIO-D2. The device address is jumpered to 000. The main routine writes the one byte variable 'data' to the address 'address', both defined inside main. Then it polls the EEPROM during its burn cycle. Finally the function 'read_byte' reads out the content of address 'address' and puts the result into 'result'. Then the program stops in a while(1) - statement.
The functions used in this example could be used to build more advanced EEPROM-routines into a real application. For more information see the EEPROM- datasheet ( http://www.atmel.com ).  

Files: 

The Example should be used as a project in Code-Composer, the Go-DSP-design tool. The project consists of these files : 

 at24c32.c     -- C-source code for this example

 vectors.asm   -- jump table for Interrupt Service Routines

 regs243.h      -- pointer definitions to memory mapped  perihperals

 at24c32.cmd -- memory map definition file for the linker

 init243.gel       -- Code Composer Setup file ( GO-DSP extension language )

 rts2xx.lib          -- runtime library file (part of TI's compiler/assembler) 

 wait.asm     -- small collection of supplemental assembler functions

  

    Download (all files zipped):   Example 13

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -