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

📄 example-22.txt

📁 DSP TMS320 LF2407 or 243 经典 例程, from TI
💻 TXT
字号:
Example 22 : LED2

 

Environment : 

This Example was made for TI's EVM-board TMS320LF2407 with additional hardware connected to the external board connectors P1 to P4.

CAUTION !!!  DO NOT wire any of the DSP I/O-pins, available through P1 to P4, directly to +5V ! This will damage the DSP definitely because this DSP is a low-voltage type (3.3V). Pin 1 and 2 of the connectors P1 to P4 carry +5V !!!. 

In this example we use the GPIO's E0 to E7. Each Pin of Port E is used as output, connected with a resistor R1 (1,5k) to the basis of an npn-general purpose transistor. The emitter of this npn is connected to ground, the collector to the cathode of a LED. The anode of the LED is connected with an resistor R2 (150 Ohm) to +3.3V.

 

Aim:

The program generates a 'running light' on the 8 LED's connected to GPIO-E0...E7. The difference to example 21 is that the time-delay between the steps is now made by general purpose timer GPT2 and it's Interrupt Service Routine. 

 

Files: 

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

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

 vectors.asm   -- jump table for Interrupt Service Routines

 regs2407.h      -- pointer definitions to memory mapped  perihperals

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

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

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

    Download :    Example 22

⌨️ 快捷键说明

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