📄 example-4.txt
字号:
TMS320F243 DSP - Laboratory
Example 4 : F243DIL2
Environment :
This Example was made for TI's EVM-board TMS320F243 with additional hardware connected to the external board connectors P1 to P4. In this example we use the GPIO's D0 to D7. Each Pin of Port D 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 (220 Ohm) to Vcc. In addition to examples 1 and 2 we use general purpose port B0..B7 now as digital inputs. There are 8 DIP-switches connected to B0..B7. A closed switch sets the input line to ground, an open switch connects the input port with a pullup resistor (22k) to Vcc (5V).
Aim:
The program reads the status of the 8 DIP-Switches and shows it on the 8 LED's connected to GPIO-D0...D7 . The difference to example 3 is that the time-delay between the steps is now made by general purpose timer GPT1 and its 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 :
F243DIL2.C -- C-source code for this example
vectors.asm -- jump table for Interrupt Service Routines
regs243.h -- pointer definitions to memory mapped perihperals
LED243C.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 4
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -