Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

EXP-11 STUDY OF LED BLINKING IN TMS 320F2812 KIT

AIM :
To study the time delay program code, basic of DSP kit.

APPARATUS REQUIRED:
TMS320F2812 Evaluation Kit

SOFTWARES:
• Install CCS 4 setup.
• Install TI Header file set up.
• TI API Flash programmer setup

THEORY:
 DSP processor TMS320F2812 32-bit fixed-point high-speed digital processor, the maximum
operating frequency 150M;
 On-chip built-in 128K * 16-bit FLASH, take advantage of the programming plug-ins can
facilitate the curing of the user program, FLASH can be encrypted;
 Chip built-in 18K * 16-bit SRAM
 Chip built-in the BOOT ROM 4K * 16-bit
 Chip built-in the OTP ROM 1K * 16-bit;
 Expansion 256K * 16- bit SRAM, IS61LV25616;
 Expansion 512K * 16- bit FLASH the SST39VF800, user-friendly programming of a larger
program;
 Provide an 8-segment digital tube;
 8 LED light tube, convenient status indication;
 9 independent keys;
 Provide a buzzer;
 Special reset chip MAX706R, ensure reliable reset, the independent reset button, can be
manually reset;
 2-way RS-232 interface can be connected to a PC experiments;
 6-channel PWM wave output interface, the anti-anti-plug design;
 Expanding outside the 2-way non-maskable interrupt source input interface;
 External expansion up to 5-way maskable interrupt source input interface, one of the road
by the key trigger;
 Provide four mounting holes, user-friendly mounting;
 To Laminates process design to ensure reliable, stable, high-speed, full-the machine chip
technology welding,;
 Expansion leads USB HOST interface (USB-NET Optional expansion board);
 On board IEEE 1149.1 JTAG emulation connector

General Procedure to work C28xx:

1. Open Code Composer Studio v4 .


2. In WorkSpace Launcher.
a. BROWSE  Select the project location and make one new folder, MAKE
NEW FOLDER Type the Workspace name, OK  OK.
3. FILE  NEW  CCS PROJECT
a. Project name: Type your project name.
b. Tick use default location. NEXT
c. Project type: C2000.
d. Tick Debug And Release. NEXT  NEXT.
e. Output type: Executable.
f. Device Variant : generic C28xx Device.
g. Device Endianness : little
h. Code Generation Tools: TI v5.2.3.
i. Run time support library: automatic.
j. Target content: none. FINISH
4. FILE  NEW  SOURCE FILE
a. Source file: Type your projectname.c( .c extension is must ).
b. Type the program.
c. FILE  SAVE.
5.PROJECT  PROPERTIES  C/C++ BUILD  BASIC OPTION
d. Target processor version(--silicon version, -mv) : 28
 OK.
e. IN C/C++ BUILD,  INCLUDE OPTIONS (Add dir to #include search
path(--include_path,-I)) select this add icon and add the following three path by
indivdually.
f. "${XDAIS_CG_ROOT}/packages/ti/xdais"
"C:/tidcs/c28/DSP281x/v120/DSP281x_headers/include
6.a.IN C/C++ BUILD, c2000 linker ->file search path (Add dir to #include search
path(--include_path,-I)) select this add icon and add the following three path by
indivdually.
"rts2800_ml.lib"
"${PROJECT_ROOT}"
"C:\Program Files\Texas Instruments\ccsv4\tools\compiler\c2000\lib"
6.b. IN C/C++ BUILD, c2000 linker->basic option->stack size->0x400

7. FILE  NEW  TARGET CONFIGURATION FILE

g. file name: projectname. ccxml (.ccxml extension is must)


h. Connection: Texas Instrument XDS100 v1 USB Emulator.
i. Device: TMS320C2812.  SAVE  TARTGET CONFIGURATION
C2812 BROWSE, browse the workspace location, open the gel folder and
select the GEL file.  OPEN SAVE.

5. In C/C++ Project window, Right click the project REBUILD PROJECT.


6.Connections :
j. Connect the usb cable, PC to KIT.
k. Connect the 5v adapter and Power on the kit.

7. TARGET  DEBUG ACTIVE PROJECT.(Then see out at corresponding place after run)

Hardware details:
JUMPER SETTINGS

Jumper Description

J4 PLL Enable or Disable

J3 Selecting Microprocessor or Microcontroller Mode

J6 Selecting Booting Mode Option

J10 Selecting input switches

J11 Selecting output leds

BOARD CONNECTIONS
 Connect usb cable to XDS100 USB Emulator.
•Connect 14 core cable from XDS100 USB Emulator to JTAG port in TMS320F2812 Kit.
•Connect the 5v Adapter to TMS320F2812 Kit.
•Before power on, Follow the next four slide for jumper settings.
ADC

HARDWARE PIN OUT CONNECTIONS OUTPUT

1k POT Keep jumper j11 on high Digital Values of all the CH0 will
position to be
enable LED. displayed in LEDl
Adjust thE corresponding POT
meter to
change the input values

LED

HARDWARE PIN OUT CONNECTIONS OUTPUT


LED.0 PORTB.0
LED.1 PORTB.1
LED.2 PORTB.2
LED.3 PORTB.3
LED.4 PORTB.4
LED.5 PORTB.5 LED will be Turned
Select j11 as high
ON and OFF at
LED.6 PORTB.6 regular interval
LED.7 PORTB.7

Program code:

#include "DSP281x_Device.h"
#include <stdio.h>
void Delay_1ms(long);
void main(void)
{
EALLOW;
SysCtrlRegs.WDCR= 0x0068; // Setup the watchdog
// 0x00E8 to disable the Watchdog , Prescaler = 1
// 0x00AF to NOT disable the Watchdog, Prescaler = 64
SysCtrlRegs.SCSR = 0; // Watchdog generates a RESET
SysCtrlRegs.PLLCR.bit.DIV = 10; // Setup the Clock PLL to multiply by 5
SysCtrlRegs.HISPCP.all = 0x1; // Setup Highspeed Clock Prescaler to divide by 2
SysCtrlRegs.LOSPCP.all = 0x2; // Setup Lowspeed CLock Prescaler to divide by 4
GpioMuxRegs.GPAMUX.all = 0x0; // all GPIO port Pin's to I/O
GpioMuxRegs.GPBMUX.all = 0x0;
GpioMuxRegs.GPADIR.all = 0x0; // GPIO PORT as input
GpioMuxRegs.GPBDIR.all = 0x00FF; // GPIO Port B15-B8 input , B7-B0 output
EDIS;
while(1)
{
GpioDataRegs.GPBDAT.all = 0xbc;
Delay_1ms(500); //value 1000 for one second delay
GpioDataRegs.GPBDAT.all = 0x0b;
Delay_1ms(500); //value 1000 for one second delay
}
}

void Delay_1ms(long end)


{ long i;
for (i = 0; i <(9000 * end); i++); }

You might also like