*** error 65: access violation at C:0x001B : no 'execute/read' permission
来源:互联网 发布:淘宝成交价 编辑:程序博客网 时间:2024/05/16 06:57
很多人在进行串口调试的时候会遇到这个问题,请大家略看我的代码,解决方法在其中
//实验目的:串口调试助手上输入数据0-9,然后再数码管显示
org 00H
ljmp start
org 23H //中断入口地址
ljmp uart_interrupt
org 30H
start:
mov P0,#0xff//设置初始值
mov dptr,#numb
lcall en
lcall UART_init
here: sjmp here //好比是一个while(1)循环
;首先3/8译码器使能 并且选中第一个数码管用于显示
en:
clr P1.4
setb P1.3
clr P1.0
clr P1.1
clr P1.2
ret
//uart初始化
UART_init:
mov TMOD,#0x20 //0010 0000 说明在定时器1的工作方式2下工作
mov TH1,#0xFD
mov TL1,#0xFD
setb TR1 //定时器1运行控制位=1,说明开始计时
mov SCON,#0x50 //0101 0000 前两位说明在串口工作方式1 第三位SM2在方式1设置为0 第四位REN=1允许串口接收
setb EA
setb ES
//setb ET1 //错误:*** error 65: access violation at C:0x001B : no 'execute/read' permission
//解决办法:timer1是做为串行通信的波特率发生器,设置为方式2(自动填充)为ET1被置位,而timer1没有跳转函数(因为是自动填充)
//所以timer1 会执行中断,跳转到中断入口0x1B,使程序跑飞了。不置位ET1就可以了
ret
//中断服务程序
uart_interrupt:
send:
mov A,#0x02
anl A,SCON
cjne A,#2, receive
clr TI
setb REN
receive:
mov A,#0x01
anl A,SCON
cjne A,#1,quit
clr RI
mov R4,SBUF
mov R3,SBUF
mov A,R4
subb A,#0x30
movc A,@A+dptr
mov P0,A
addc A,#0x30
mov SBUF,R3
clr REN
quit:
reti
//0-9
numb:
DB 0C0H,0F9H,0A4H,0B0H,99H,92H,82H,0F8H,80H,90H
end
大家注意看ET1=1这一段,注释就是解决方法
- *** error 65: access violation at C:0x001B : no 'execute/read' permission
- error 65: access violation at 0x40021000 : no 'read' permission
- error 65: access violation at 0x40021000 : no 'read' permission
- *** error 65: access violation at 0x40021000 : no 'read' permission
- *** error 65: access violation at 0x40021000 : no 'read' permission
- MDK5.00中*** error 65: access violation at 0x40021000 : no 'read' permission的一种解决方法
- 解决 *** error 65: access violation at 0x0000000C : no 'read' permission
- keil软件仿真*** error 65: access violation at 0x0000000C : no 'read' permission
- STM32 软件仿真失败 ***** error 65: access violation at 0x40021000 : no ****'read' permission******
- “*** error 65: access violation at 0x0000000C : no 'read' permission”错误的解决
- “*** error 65: access violation at 0x40021000 : no 'read' permission”错误的解决
- *** Error 65: Access violation at 0x00000004 : No 'write' permission
- *** error 65: access violation at 0x68014802 : no 'write' permission
- error 65: access violation at 0x40021000 : no 'read
- JUMNE: error 66: access violation at 0x40021000 : no 'read' permission
- STM32 KEIL不能输入仿真引脚端口error 65: access violation at 0x40021000 : no 'read' permission
- 在keil 5的软件仿真中避免error 65: access violation at 0x40021000 : no 'read' permission
- Error 65:access violation at 0xFFFFFFFC: no “write” permission 类似问题的解决方法
- WDS连接路由网络
- Java程序员从笨鸟到菜鸟之(序言)+全部链接
- 闲话企业架构(一)
- 桥接Bridging
- power law
- *** error 65: access violation at C:0x001B : no 'execute/read' permission
- 《编程之美》读书笔记
- Linux下nfs配置方法
- android 笔记
- Google Maps Javascript API V3 Reference页面上调用谷歌地图
- 中继模式比较Repeating Mode Comparisons
- 闲话企业架构(二)
- http://acm.hdu.edu.cn/showproblem.php?pid=4337&&dfs
- 【Android】桌面Widget动态刷新