资源简介
DSP 28335 CAN通信 可用 已配置好

代码片段和文件信息
#include “DSP2833x_Device.h“ // DSP2833x Headerfile Include File
#include “DSP2833x_Examples.h“ // DSP2833x Examples Include File
// Prototype statements for functions found within this file.
void scib_echoback_init(void);
void scib_fifo_init(void);
void scib_xmit(int a);
void scib_msg(char *msg);
// Global counts used in this example
Uint16 LoopCount;
Uint16 ErrorCount;
void main(void)
{
Uint16 ReceivedChar;
char *msg;
// Step 1. Initialize System Control:
// PLL WatchDog enable Peripheral Clocks
// This example function is found in the DSP2833x_SysCtrl.c file.
InitSysCtrl();
// Step 2. Initalize GPIO:
// This example function is found in the DSP2833x_Gpio.c file and
// illustrates how to set the GPIO to it‘s default state.
// InitGpio(); Skipped for this example
// For this example only init the pins for the SCI-A port.
// This function is found in the DSP2833x_Sci.c file.
InitScibGpio();
InitXintf16Gpio();
// Step 3. Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
DINT;
// Initialize PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.
// This function is found in the DSP2833x_PieCtrl.c file.
InitPieCtrl();
// Disable CPU interrupts and clear all CPU interrupt flags:
IER = 0x0000;
IFR = 0x0000;
// Initialize the PIE vector table with pointers to the shell Interrupt
// Service Routines (ISR).
// This will populate the entire table even if the interrupt
// is not used in this example. This is useful for debug purposes.
// The shell ISR routines are found in DSP2833x_DefaultIsr.c.
// This function is found in DSP2833x_PieVect.c.
InitPieVectTable();
// Step 4. Initialize all the Device Peripherals:
// This function is found in DSP2833x_InitPeripherals.c
// InitPeripherals(); // Not required for this example
// Step 5. User specific code:
LoopCount = 0;
ErrorCount = 0;
scib_fifo_init(); // Initialize the SCI FIFO
scib_echoback_init(); // Initalize SCI for echoback
msg = “\r\n\n\nHello World!\0“;
scib_msg(msg);
msg = “\r\nYou will enter a character and the DSP will echo it back! \n\0“;
scib_msg(msg);
for(;;)
{
msg = “\r\nEnter a character: \0“;
scib_msg(msg);
// Wait for inc character
while(ScibRegs.SCIFFRX.bit.RXFFST !=1) { } // wait for XRDY =1 for empty state
// Get character
ReceivedChar = ScibRegs.SCIRXBUF.all;
// Echo character back
msg = “ You sent: \0“;
scib_msg(msg);
scib_xmit(ReceivedChar);
LoopCount++;
}
}
// Test 1SCIA DLB 8-bit word baud rate 0x000F default 1 STOP bit no parity
void scib_echoback_init()
{
// Note: Clocks were turned on to the SCIA peripheral
// in the InitSysCtrl() function
ScibRegs.SCICCR.all =0x0007; // 1
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 11052 2012-01-07 11:59 lab14-CAN\CAN.paf2
文件 1634 2008-01-08 10:40 lab14-CAN\CAN.pjt
文件 6553 2012-01-07 11:59 lab14-CAN\CAN.sbl
文件 1126 2012-01-06 18:34 lab14-CAN\Debug.lkf
文件 134 2012-01-06 18:48 lab14-CAN\cc_build_Debug.log
文件 1568 2012-01-06 18:48 lab14-CAN\CAN.CS_\FILE.DBF
文件 2281 2012-01-06 18:48 lab14-CAN\CAN.CS_\FILE.FPT
文件 3072 2012-01-06 18:48 lab14-CAN\CAN.CS_\FILE.CDX
文件 237647 2012-01-06 18:48 lab14-CAN\CAN.CS_\SYMBOL.DBF
文件 408762 2012-01-06 18:48 lab14-CAN\CAN.CS_\SYMBOL.FPT
文件 320512 2012-01-06 18:48 lab14-CAN\CAN.CS_\SYMBOL.CDX
文件 3941 2007-12-31 15:02 lab14-CAN\CMD\28335_RAM_lnk.cmd
文件 8438 2007-09-21 11:09 lab14-CAN\CMD\DSP2833x_Headers_nonBIOS.cmd
文件 27441 2012-01-06 18:34 lab14-CAN\Debug\CAN.map
文件 1112 2008-11-11 11:24 lab14-CAN\Debug\DSP2833x_ADC_cal.obj
文件 1391 2008-11-11 11:24 lab14-CAN\Debug\DSP2833x_CodeStartBranch.obj
文件 113759 2008-11-11 11:24 lab14-CAN\Debug\DSP2833x_CpuTimers.obj
文件 154305 2008-11-11 11:24 lab14-CAN\Debug\DSP2833x_DefaultIsr.obj
文件 117229 2008-11-11 11:24 lab14-CAN\Debug\DSP2833x_ECan.obj
文件 121824 2008-11-11 11:24 lab14-CAN\Debug\DSP2833x_GlobalVariableDefs.obj
文件 112547 2008-11-11 11:25 lab14-CAN\Debug\DSP2833x_PieCtrl.obj
文件 119445 2008-11-11 11:25 lab14-CAN\Debug\DSP2833x_PieVect.obj
文件 113409 2008-11-11 11:25 lab14-CAN\Debug\DSP2833x_Sci.obj
文件 112718 2008-11-11 11:25 lab14-CAN\Debug\DSP2833x_Spi.obj
文件 117527 2008-11-11 11:25 lab14-CAN\Debug\DSP2833x_SysCtrl.obj
文件 1123 2008-11-11 11:25 lab14-CAN\Debug\DSP2833x_usDelay.obj
文件 118965 2012-01-06 18:34 lab14-CAN\Debug\ECanBack2Back.obj
文件 114537 2012-01-06 15:21 lab14-CAN\Debug\DSP2833x_Xintf.obj
文件 165004 2012-01-06 18:34 lab14-CAN\Debug\CAN.out
文件 10465 2007-09-26 10:23 lab14-CAN\INCLUDE\DSP2833x_Adc.h
............此处省略53个文件信息
相关资源
- stm32f407上的两个can发送和接收例程
- CANopen使用手册_埃斯顿
- CanuMobiSim
- F28335无刷直流电机开闭环控制
- 28335CAN调试程序
- DSP28335程序片内FLASH搬运至RAM运行的
- UART转CAN或LIN的工具(Uart2any)和文档
- 28335写的用spi读取传感器数据并用CA
- wwwscan-很强大的后台扫描工具
- CAN Linux驱动代码
- 矿用多功能网关通信接口设计
- pb9调用良田高拍仪例程scanctrl1.0
- 周立功PCI CAN卡LINUX驱动ubuntu16.04内核
- 基于S32K144的CANbootloader
- 基于ARM7处理器的CAN总线网络设计
- Can EC-MPS reduce gastrointestinal side effect
- 佳能时尚扫描仪CanoScan LiDE 500F
- CanoScan佳能4200f扫描仪驱动 v8.6.1.1a 官
- 佳能CanoScan 9000F扫描仪驱动 官方版
- 佳能canon lbp3000激光打印机驱动 for w
- STM32F103VCT6TR - High-density performance lin
- 基于MC68HC908GZ32的CAN-LIN网关设计
- 如何在CANVAS中使用D3.JS
- 基于CAN总线与ZigBee的瓦斯实时监测及
- Delphi XE10 Seattle移动开发指南完整版
- CiA-402-2-version-3.0.0
- ISO14229协议
- CAN和1939全套资料
- 亚信防毒墙Officescan卸载工具DelTrendR
- 新能源电动车快充2015年国标充电完整
评论
共有 条评论