搜索
bottom↓
回复: 5

刚开始用, 遇到一个问题, 哪位帮忙...

[复制链接]

出0入0汤圆

发表于 2006-2-27 16:05:23 | 显示全部楼层 |阅读模式
仿真Atmega16,

...

DDRC=0xFF;

...

PORTC |= _BV(PC5);

PORTC |= _BV(PC6);

...

仿真时, PC5出现高电位, PC6一直是低电位, 请问是用AVR不当还是Proteus问题?

出0入0汤圆

 楼主| 发表于 2006-2-27 18:05:37 | 显示全部楼层
发现现象出现的条件



把 PORTB 也设置为输出, 则 PB6 决定 PC6 的状态, 也就是 PB6 为 0/1  PC6也会为0/1,

不能改变PC6, 除非你改变PB6, PB7和PC7也是这样对应的, 怎么回事啊!!!!!?????

出0入0汤圆

发表于 2006-2-27 20:38:08 | 显示全部楼层
PC口是有问题的,这很可能是Proteus的bug

出0入0汤圆

发表于 2006-3-1 15:00:31 | 显示全部楼层
_BV是什么?



PC6是mega16的一个震荡输入,仿真不了。

出0入0汤圆

发表于 2006-3-2 17:05:07 | 显示全部楼层
你 用Proteus8仿真就可以解决的,上次听谁说过,6。7有问题。

出0入0汤圆

发表于 2006-3-8 11:57:38 | 显示全部楼层
In the current release of the Mega 8/16/32 model, the following elements of the device functionality are not modelled:



?The USART is modelled as a UART only. Also the additional UART features such as parity and double rate clocking are not modelled.



?The OSCCAL register has no effect; the clock speed is set by the CLOCK property only.



?The XDIV  register has no effect; the clock speed is set by the CLOCK property only.



?The effect of the boot lock bits is not modelled.



?The JTAG interface is not modelled.



We plan to complete modelling of the USART in a future release.
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-5-1 22:35

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表