1131 views|0 replies

3836

Posts

19

Resources
The OP
 

TMS320C50 Example Programming Sharing [Copy link]

Write a TMS320C50 program with interrupt function in C language and debug it with hardware simulator. /*This program is a serial port input and output program of TMS320C50. TMS320C50 is connected to PCM codec MC14LC5480 through serial port. The interrupt routine reads 8 bits of data from the serial port and writes it back to the serial port*/ #define VEC_ADDR(volatile int * )0x00; /*vector address*/ Fvolatile int * RCV_ADD=(volatile int *)0x20; /*C50 serial port receive register address*/ volatile int * XMT_ADD=(volatile int *)0x21; /*C50 serial port transmit register address*/ int indata; /*define global variables*/ main() { volatile int * INTVEC=VEC_ADDR; /*vector pointer*/ INTVEC[]=(volatile int)c_int5; /*set serial port receive interrupt vector*/ /*initialize serial port*/ asm("SPLK #0CH,SPC "); /*F0=FSM=1,DLB=MCM=TXM=0*/ asm("OPL #0C0H,SPC "); /*XRST=RRST=1*/ for(;;); /*Wait for interrupt*/ } void c_int5() /*Serial port receive interrupt*/ { indata=RCV_ADD[0]; XMT_ADD[0]=indata;

This post is from Microcontroller MCU
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list