资源简介
用28335实现SCI通信,用485传输,使用了max485芯片,这个程序是最简单的参考程序。
代码片段和文件信息
// TI File $Revision: /main/3 $
// Checkin $Date: March 16 2007 08:37:30 $
//###########################################################################
//
// FILE: DSP2833x_CpuTimers.c
//
// title: CPU 32-bit Timers Initialization & Support Functions.
//
// NOTES: CpuTimer1 and CpuTimer2 are reserved for use with DSP BIOS and
// other realtime operating systems.
//
// Do not use these two timers in your application if you ever plan
// on integrating DSP-BIOS or another realtime OS.
//
//
//###########################################################################
// $TI Release: DSP2833x Header Files V1.01 $
// $Release Date: September 26 2007 $
//###########################################################################
#include “DSP2833x_Device.h“ // Headerfile Include File
#include “DSP2833x_Examples.h“ // Examples Include File
struct CPUTIMER_VARS CpuTimer0;
// CpuTimer 1 and CpuTimer2 are used by DSP BIOS & other RTOS. Comment out if using DSP BIOS or other RTOS.
struct CPUTIMER_VARS CpuTimer1;
struct CPUTIMER_VARS CpuTimer2;
//---------------------------------------------------------------------------
// InitCpuTimers:
//---------------------------------------------------------------------------
// This function initializes all three CPU timers to a known state.
//
void InitCpuTimers(void)
{
// CPU Timer 0
// Initialize address pointers to respective timer registers:
CpuTimer0.RegsAddr = &CpuTimer0Regs;
// Initialize timer period to maximum:
CpuTimer0Regs.PRD.all = 0xFFFFFFFF;
// Initialize pre-scale counter to divide by 1 (SYSCLKOUT):
CpuTimer0Regs.TPR.all = 0;
CpuTimer0Regs.TPRH.all = 0;
// Make sure timer is stopped:
CpuTimer0Regs.TCR.bit.TSS = 1;
// Reload all counter register with period value:
CpuTimer0Regs.TCR.bit.TRB = 1;
// Reset interrupt counters:
CpuTimer0.InterruptCount = 0;
// CpuTimer 1 and CpuTimer2 are reserved for DSP BIOS & other RTOS
// Do not use these two timers if you ever plan on integrating
// DSP-BIOS or another realtime OS.
//
// Initialize address pointers to respective timer registers:
CpuTimer1.RegsAddr = &CpuTimer1Regs;
CpuTimer2.RegsAddr = &CpuTimer2Regs;
// Initialize timer period to maximum:
CpuTimer1Regs.PRD.all = 0xFFFFFFFF;
CpuTimer2Regs.PRD.all = 0xFFFFFFFF;
// Initialize pre-scale counter to divide by 1 (SYSCLKOUT):
CpuTimer1Regs.TPR.all = 0;
CpuTimer1Regs.TPRH.all = 0;
CpuTimer2Regs.TPR.all = 0;
CpuTimer2Regs.TPRH.all = 0;
// Make sure timers are stopped:
CpuTimer1Regs.TCR.bit.TSS = 1;
CpuTimer2Regs.TCR.bit.TSS = 1;
// Reload all counter register with period value:
CpuTimer1Regs.TCR.bit.TRB = 1;
CpuTimer2Regs.TCR.bit.TRB = 1;
// Reset interrupt counters:
CpuTimer1.InterruptCount = 0;
CpuTimer2.InterruptCount = 0;
}
//---------------------------------------------------------------------------
// ConfigCpuTimer:
//-------------
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 329 2019-05-27 20:45 SCI\.ccsproject
文件 16289 2014-07-11 17:09 SCI\.cdtbuild
文件 16289 2019-05-27 20:45 SCI\.cdtbuild_initial
文件 553 2014-07-11 16:10 SCI\.cdtproject
文件 28283 2019-05-27 20:45 SCI\.cproject
文件 4476 2019-05-29 16:45 SCI\.launches\SCI.launch
文件 833 2019-05-27 20:45 SCI\.project
文件 583 2019-05-27 20:45 SCI\.project_initial
文件 62 2019-05-27 20:45 SCI\.settings\org.eclipse.cdt.codan.core.prefs
文件 123 2019-05-27 20:45 SCI\.settings\org.eclipse.cdt.debug.core.prefs
文件 607 2019-05-27 20:45 SCI\.settings\org.eclipse.cdt.managedbuilder.core.prefs
文件 301 2019-05-27 20:45 SCI\.settings\org.eclipse.core.resources.prefs
文件 512 2011-01-11 17:38 SCI\cc_build_Debug.log
文件 3941 2007-12-31 15:02 SCI\CMD\28335_RAM_lnk.cmd
文件 8438 2007-09-21 11:09 SCI\CMD\DSP2833x_Headers_nonBIOS.cmd
文件 413 2019-05-29 16:45 SCI\Debug\ccsObjs.opt
文件 0 2014-07-11 17:09 SCI\Debug\CMD\ccsSrcs.opt
文件 1824 2014-07-11 17:09 SCI\Debug\CMD\subdir.mk
文件 1587 2019-05-29 15:56 SCI\Debug\CMD\subdir_rules.mk
文件 373 2019-05-29 15:56 SCI\Debug\CMD\subdir_vars.mk
文件 1267 2019-05-27 20:45 SCI\Debug\DSP2833x_ADC_cal.obj
文件 1551 2019-05-27 20:45 SCI\Debug\DSP2833x_CodeStartBranch.obj
文件 5856 2019-05-27 20:45 SCI\Debug\DSP2833x_CpuTimers.obj
文件 29427 2019-05-27 20:45 SCI\Debug\DSP2833x_DefaultIsr.obj
文件 121429 2019-05-27 20:46 SCI\Debug\DSP2833x_GlobalVariableDefs.obj
文件 5811 2019-05-27 20:46 SCI\Debug\DSP2833x_PieCtrl.obj
文件 17757 2019-05-27 20:46 SCI\Debug\DSP2833x_PieVect.obj
文件 12996 2019-05-27 22:03 SCI\Debug\DSP2833x_Sci.obj
文件 12242 2019-05-27 20:46 SCI\Debug\DSP2833x_Spi.obj
文件 15985 2019-05-27 20:46 SCI\Debug\DSP2833x_SysCtrl.obj
............此处省略89个文件信息
相关资源
- SPM93MODBUS串行通信协议V1.0
- Logic in Computer Science英文原版课后习题
- 中科院分区表.xlsx
- SP3485E\\RS485使用手册与指南
- ASCII码表ASCII码表
- DSP28335 中pwm 定时器中断设置
- 基于stm8的RS485通信程序
- 16进制数 ASCII转换工具
- 有一个共N个字符的字符串,存放在
- 怎样当一名科学家英文版on being a sc
- 基于80C51的RS485双机通信程序_01
- RS232-TTl-RS485转接口电路
- ASCII码与16进制之间的转化工具
- ASCIIjzzh ASCII码和十六进制相互转换
- 实现对占空比的随时可调代码
- 2018SCI期刊列表影响因子列表
- CCS6.2版本Dsp28335工程(包含基本模块的
- 基于pic16f1947 和ADM2483、rs485电路发送接
- DSP28335 SCI中用FIFO完成485收发通信
- RS485一对四双向通信Proteus仿真+Keil收发
- DSP28335 三相SVPWM程序
- DSP28335控制DHT11温湿度传感器
- 一个自动收发的RS485电路图
- Ascgen2-2.0.0汉化版(图像ASCII生成器.
- 三电平SVPWM.rar
- F28335最小系统原理图.PDF
- 字库文件HZK12 HZK16 ASC II
- LNCS格式模板-Springer Computer Science Pro
- TI-DSP28335-CAN中文使用手册
- 基于DSP 28M35的串口SCI软件在线升级I
评论
共有 条评论