谁有DSP281x_usDelay.asm 文件啊,发一个给我啊

[复制链接]
1619|12
 楼主| jiangkeqin_sy 发表于 2014-7-10 16:44 | 显示全部楼层 |阅读模式
新手求助。。。。
zhangmangui 发表于 2014-7-10 22:21 | 显示全部楼层
到TI官网上找找sprc097
看看里面应该有
 楼主| jiangkeqin_sy 发表于 2014-7-11 08:28 | 显示全部楼层
你有不发一个啊
 楼主| jiangkeqin_sy 发表于 2014-7-11 08:43 | 显示全部楼层
没有找到啊。能发一个给我不?
大秦正声 发表于 2014-7-11 10:05 | 显示全部楼层
;// TI File $Revision: /main/2 $
;// Checkin $Date: April 29, 2005   11:01:42 $
;//###########################################################################
;//
;// FILE:  DSP281x_usDelay.asm
;//
;// TITLE: Simple delay function
;//
;// DESCRIPTION:
;//  
;// This is a simple delay function that can be used to insert a specified
;// delay into code.  
;//
;// This function is only accurate if executed from internal zero-waitstate
;// SARAM. If it is executed from waitstate memory then the delay will be
;// longer then specified.
;//
;// To use this function:
;//
;//  1 - update the CPU clock speed in the DSP281x_Examples.h
;//    file. For example:
;//    #define CPU_CLOCK_SPEED 6.6667L // for a 150MHz CPU clock speed
;//
;//  2 - Call this function by using the DELAY_US(A) macro
;//    that is defined in the DSP28_Device.h file.  This macro
;//    will convert the number of microseconds specified
;//    into a loop count for use with this function.  
;//    This count will be based on the CPU frequency you specify.
;//
;//  3 - For the most accurate delay
;//    - Execute this function in 0 waitstate RAM.  
;//    - Disable interrupts before calling the function
;//      If you do not disable interrupts, then think of
;//      this as an "at least" delay function as the actual
;//      delay may be longer.
;//
;//  The C assembly call from the DELAY_US(time) macro will
;//  look as follows:
;//
;//  extern void Delay(long LoopCount);               
;//
;//        MOV   AL,#LowLoopCount
;//        MOV   AH,#HighLoopCount
;//        LCR   _Delay
;//
;//  Or as follows (if count is less then 16-bits):
;//
;//        MOV   ACC,#LoopCount
;//        LCR   _Delay
;//
;//
;//###########################################################################
;// $TI Release: DSP281x C/C++ Header Files V1.20 $
;// $Release Date: July 27, 2009 $
;//###########################################################################
       .def _DSP28x_usDelay
       .sect "ramfuncs"

        .global  __DSP28x_usDelay
_DSP28x_usDelay:
        SUB    ACC,#1
        BF     _DSP28x_usDelay,GEQ    ;; Loop if ACC >= 0
        LRETR

;There is a 9/10 cycle overhead and each loop
;takes five cycles. The LoopCount is given by
;the following formula:
;  DELAY_CPU_CYCLES = 9 + 5*LoopCount
; LoopCount = (DELAY_CPU_CYCLES - 9) / 5
; The macro DELAY_US(A) performs this calculation for you
;==================================================
 楼主| jiangkeqin_sy 发表于 2014-7-11 15:24 | 显示全部楼层
给一个具体文件啊
 楼主| jiangkeqin_sy 发表于 2014-7-11 15:25 | 显示全部楼层
各位大神,,能否给一个具体的文件啊,DSP281x_usDelay.asm ,谢谢了
zhangmangui 发表于 2014-7-11 19:06 | 显示全部楼层
jiangkeqin_sy 发表于 2014-7-11 15:25
各位大神,,能否给一个具体的文件啊,DSP281x_usDelay.asm ,谢谢了

晚上帮你找找
wangdezhi 发表于 2014-7-11 23:33 | 显示全部楼层
自己写一个就行的
wangdezhi 发表于 2014-7-11 23:33 | 显示全部楼层
如果不是要去很精确的话
 楼主| jiangkeqin_sy 发表于 2014-7-12 09:44 | 显示全部楼层
zhangmangui
谢谢这个大神了,尽快啊,我要用啊。。谢谢,非常感谢
 楼主| jiangkeqin_sy 发表于 2014-7-12 09:46 | 显示全部楼层
wangdezhi 发表于 2014-7-11 23:33
如果不是要去很精确的话

就是要很精确啊,才要这个啊
liu_yi_xf 发表于 2014-7-12 14:53 | 显示全部楼层
5楼发的代码复制过去,建个记事本粘贴一下,然后把文件名改掉不就是了吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

12

主题

33

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部