打印

一个网友发给俺的信,用仿真器老弹出窗口

[复制链接]
1798|5
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
ni_labview|  楼主 | 2008-5-7 22:57 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

我没法看出程序出了什么问题,像仿真器的问题,大家帮忙瞧瞧怎么解决?先替那兄弟谢过大家,附件中有显示的错误信息图片



下面贴下主要程序:

这个是主程序:

;-----------------------------------------------------------------------------

; Assembly main line

;-----------------------------------------------------------------------------

 

include "m8c.inc"       ; part specific constants and macros

include "memory.inc"    ; Constants & macros for SMM/LMM and Compiler

include "PSoCAPI.inc"   ; PSoC API definitions for all User Modules

 

export _main

export outputV

export timernum

area   bss(RAM)

outputV : blk 1

timernum : blk 6

area   text(ROM,REL)

_main:

   M8C_EnableGInt

   call PWM8_1_Start

   call Timer8_1_EnableInt

   call Timer8_1_Start

   call LCD_1_Start

   mov  [timernum],ffffffh

   mov  [outputV],02h

   mov  A,00h

   mov  X,[outputV]

   call LCD_1_Position

   mov  A,>THE_STR

   mov  X,<THE_STR

   

   call LCD_1_PrCString

 

 

 

.terminate:   

 

      jmp .terminate 

  .LITERAL 

 THE_STR:

   DS  " HUI GE SHIT!"   

   DB  00h

   .ENDLITERAL      

      



这个是定时器中断里的程序:


_Timer8_1_ISR:

 

   ;@PSoC_UserCode_BODY@ (Do not change this line.)

   ;---------------------------------------------------

   ; Insert your custom code below this banner

   ;---------------------------------------------------

   ;   NOTE: interrupt service routines must preserve

   ;   the values of the A and X CPU registers.

   

   push  A

   

   dec  [timernum]

   mov  A,[timernum]

   jnz  branch1

   mov  [timernum],ffffffh

   mov  A,00h

   mov  X,[outputV]

   call LCD_1_Position 

   mov  A,>THE_STR1

   mov  X,<THE_STR1  

   

   call LCD_1_PrCString

  

  .LITERAL 

 THE_STR1:

   DS  " HUI GE SHIT!"   

   DB  00h

   .ENDLITERAL      

   dec  [outputV]

   mov   A,[outputV]

   jnz   branch1

   mov   [outputV],0eh

 

 branch1:

   pop   A  

 

      

    ; Insert your main assembly code here. 

   

   

 

 

 

 

 

   ;---------------------------------------------------

   ; Insert your custom code above this banner

   ;---------------------------------------------------

   ;@PSoC_UserCode_END@ (Do not change this line.)

 

   reti


相关链接:https://bbs.21ic.com/upfiles/img/20076/200762223129345.rar
沙发
hotpower| | 2008-5-9 22:16 | 只看该作者

哈哈~~~搞不明白楼上的连接没出来~~~

使用特权

评论回复
板凳
shilei1014| | 2008-5-9 22:27 | 只看该作者

请问

使用特权

评论回复
地板
shilei1014| | 2008-5-9 22:29 | 只看该作者

请问

NI大哥,上面的程序有几个CALL的函数调用指令,这几条指令都是PSOC designer产生的API么?还是自己定义编写的?

使用特权

评论回复
5
ni_labview|  楼主 | 2008-5-10 13:31 | 只看该作者

PSOC designer自己产生的API

使用特权

评论回复
6
qiuming| | 2008-5-11 23:31 | 只看该作者

解决了吗

我也想知道答案.

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

178

主题

624

帖子

2

粉丝