我没法看出程序出了什么问题,像仿真器的问题,大家帮忙瞧瞧怎么解决?先替那兄弟谢过大家,附件中有显示的错误信息图片
下面贴下主要程序:
这个是主程序:
;-----------------------------------------------------------------------------
; 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 |