导航: 老古网老古论坛XMOS公共讨论区XMOS开源项目区单片机程序设计嵌入式系统广告区域
→发表看法:[nust10]80c196kb 的奇怪现象,谢谢 !



No.34630
作者:nust10
邮件:
ID:2056
登陆:2次
文章数:2篇
最后登陆IP:218.2.137.59
最后登陆:2003/6/20 9:12:18
注册:2002/5/9 10:36:00
财富:12
发帖时间:2003/6/16 22:18:18
发贴者IP:218.2.137.41
标题:nust10:80c196kb 的奇怪现象,谢谢 !
摘要:No.3463080c196kb 的奇怪现象,谢谢 ! he CPU I use is 80c196KB 16, 8 bit data bus.
My problem is about writing an value to a memory-mapped I/O.  I define as the following:
#define  SBAUD  0xc0a
  
1. I write this code:
      *(unsigned char *)SBAUD=0x08;  
   It does'twork.  The value in I/O 0xc0a is 0x00,not 0x08.       

2. I write this code two times:
      *(unsigned char *)SBAUD=0x08;
      *(unsigned char *)SBAUD=0x08;
   It can work.  The value in I/O 0xc0a is 0x08.

3. If I write this code:
      *(unsigned char *)SBAUD=0x08;
      *(unsigned char *)SBAUD=0x08;
      *(unsigned char *)SBAUD=0x09;
   It works wrong. The value in I/O 0xc0a is 0x08,not 0x09.

4. If I write this code:
      *(unsigned char *)SBAUD=0x08;
      *(unsigned char *)SBAUD=0x08;
      *(unsigned char *)SBAUD=0x09;
      *(unsigned char *)SBAUD=0x09;
   It works well. The  ......

>>返回讨论的主题



  发表回复
用户名   *您没有注册?
密码   *
验证码   * .
标题   *
心情
随便说说    我回答你    最新发现    得意的笑   
气死我了    真是没劲    坚决同意    表示反对   
大家过来    好奇怪哟    懒得理它    大家小心   
文件上传
内容


字体:      字体大小:    颜色:
粗体 斜体 下划线 居中 超级连接 Email连接 图片 Flash图片 Shockwave文件 realplay视频文件 Media Player视频文件 QuickTime视频文件 引用 飞行字 移动字 发光字 阴影字 查看更多的心情图标 背景音乐
点击加入表情
                         
选项
有回复时用短消息通知您?

   




老古网执行:15毫秒 最大:78531毫秒 查询6次