microcontroller - proteus 错误:PC=0x0118 处的操作码 0x000D 无效
问题描述
我写了这段代码,Bascom
但是当我运行并单击键盘时,Proteus
我看到了这个错误:
Invalid opcode 0x000D at PC=0x0118
这是我的代码Bascom
$regfile = "m16def.dat"
$crystal = 1000000
Config Kbd = Portd , Debounce = 30
Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = Portb.4 , Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7 , Rs = Portb.3 , E = Portb.2
Dim Adad As Byte
Dim Andis As Byte
Dim Lable As Byte
Scan1:
Waitms 200
Adad = 0
Andis = Getkbd()
If Andis > 15 Then Goto Scan1
Lable = Lookup(andis , Dta)
If Lable < 10 Then
Adad = Adad * 10
Adad = Adad + Lable
Lcd Adad
End If
Dta:
Data 7 , 8 , 9 , 10 , 4 , 5 , 6 , 11 , 1 , 2 , 3 , 12 , 13 , 0 , 14 , 15
这是我的proteus
模拟simple calculation
:
我不知道那里发生了什么。任何帮助,将不胜感激。
解决方案
可能是 .include 一开始我在使用 atmega328p 在同一程序(proteus)上进行汇编 avr 编程时遇到了这个问题。我忘了把 inculde 放在第一个,我有一个 proteus 的演示版本(每次你再次启动应用程序时都需要以管理员身份运行)。试试这个,让我知道它有效。
推荐阅读
- azure - 在 Azure 中安全地存储 oAuth 令牌
- ios - Iphone 我们可以将耳机静音并仅从底部扬声器播放吗?
- postgresql - 一次将值插入 2 个表 - postgres
- python - VS Code Remote 不会在 ssh 中获取 .bash_profile
- python - 使用循环来保持多个用户输入
- android - View.setVisibility(View.VISIBLE) 在启动另一个活动后停止工作,前提是该视图之前在 Android API <28 上不可见
- javascript - 我如何将字体从谷歌字体导入 javascript,以便我可以将它用于我的画布?
- node.js - 如何将上下文传递到自定义对话框中?
- python - python matplotlib中的时间序列奇怪的插值
- multithreading - 有没有办法让 Rust 闭包只将一些变量移入其中?