CW3.1中,用的芯片是MC68HC908JK3,程序代码在普通51单片机上测试通过,现在往MC68HC908JK3上移植,移植过程中出现if语句缺少“}”以及“)”的错误,请问这是怎么回事?
还有,我想定义一个标志位,比如用来检测中断或者计数,请问怎么定义,谢谢了!
程序源码已做附件cw.txt上传
Original Attachment has been moved to: cw.txt.zip
HI,
regarding to your first question "移植过程中出现if语句缺少“}”以及“)”的错误", please upload your entire project in zip format instead of the separate files. I will check it directly from my side.
for your second question "我想定义一个标志位,比如用来检测中断或者计数,请问怎么定义,", you can define a static type global variable/counter in the interrupt file, increase the counter for each interrupt comes.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------