找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 4308|回复: 1
收起左侧

BASCOM AVR 版 RC5红外发射与接收遥控仿真

[复制链接]
ID:342822 发表于 2019-12-22 16:15 | 显示全部楼层 |阅读模式
仿真原理图如下(proteus仿真工程文件可到本帖附件中下载)
捕获.PNG

单片机源程序如下:
  1. rem Main.bas file generated by New Project wizard
  2. rem  RC5编码发射
  3. rem Created:   周六 12月 21 2019   taotie
  4. rem Processor: ATmega8
  5. rem Compiler:  BASCOM-AVR

  6. rem Write your code here

  7. $regfile ="m8def.dat"
  8. $crystal =8000000

  9. DDRD=&B00000000
  10. PORTD=&B11111111

  11.   main:
  12.   do

  13.   if pind.0=0 then Rc5send  0 , 0,1
  14.   waitms 80
  15. if pind.0=0 then Rc5send  0, 0,1
  16.   waitms 80

  17.   
  18.   if pind.1=0 then Rc5send 0,0,2
  19.   waitms 80
  20. if pind.1=0 then Rc5send 0,0,2
  21.   waitms 80

  22.    
  23.   if pind.2=0 then Rc5send 0,0,3
  24.   waitms 80
  25. if pind.2=0 then Rc5send 0,0,3
  26.   waitms 80

  27.    
  28.   if pind.3=0 then Rc5send 0,0,4
  29.   waitms 80
  30. if pind.3=0 then Rc5send 0,0,4
  31.   waitms 80

  32.    
  33.   if pind.4=0 then Rc5send 0,0,5
  34.   waitms 80
  35.   if pind.4=0 then Rc5send 0,0,5
  36.   waitms 80
  37.   loop
  38.   end
复制代码

所有资料51hei提供下载:
rc5.zip (363.09 KB, 下载次数: 46)

评分

参与人数 1黑币 +50 收起 理由
admin + 50 共享资料的黑币奖励!

查看全部评分

回复

使用道具 举报

ID:342822 发表于 2020-1-17 14:50 | 显示全部楼层
屏幕截图(3).png
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

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