极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9397|回复: 3

IRremote库如何在Atmega16上使用?

[复制链接]
发表于 2013-7-28 03:52:42 | 显示全部楼层 |阅读模式
我选择了个atmega16的板子。
然后用最简单的IRsendDemo进行测试。然后编译出错。

  1. D:\arduino-1.0.5\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::mark(int)':
  2. D:\arduino-1.0.5\libraries\IRremote\IRremote.cpp:227: error: 'TCCR2A' was not declared in this scope
  3. D:\arduino-1.0.5\libraries\IRremote\IRremote.cpp:227: error: 'COM2B1' was not declared in this scope
  4. D:\arduino-1.0.5\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::space(int)':
  5. D:\arduino-1.0.5\libraries\IRremote\IRremote.cpp:235: error: 'TCCR2A' was not declared in this scope
  6. D:\arduino-1.0.5\libraries\IRremote\IRremote.cpp:235: error: 'COM2B1' was not declared in this scope
  7. D:\arduino-1.0.5\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::enableIROut(int)':
  8. D:\arduino-1.0.5\libraries\IRremote\IRremote.cpp:253: error: 'TIMSK2' was not declared in this scope
  9. D:\arduino-1.0.5\libraries\IRremote\IRremote.cpp:263: error: 'TCCR2A' was not declared in this scope
  10. D:\arduino-1.0.5\libraries\IRremote\IRremote.cpp:263: error: 'TCCR2B' was not declared in this scope
  11. D:\arduino-1.0.5\libraries\IRremote\IRremote.cpp:263: error: 'WGM22' was not declared in this scope
  12. D:\arduino-1.0.5\libraries\IRremote\IRremote.cpp:263: error: 'OCR2A' was not declared in this scope
  13. D:\arduino-1.0.5\libraries\IRremote\IRremote.cpp:263: error: 'OCR2B' was not declared in this scope
  14. D:\arduino-1.0.5\libraries\IRremote\IRremote.cpp: In member function 'void IRrecv::enableIRIn()':
  15. D:\arduino-1.0.5\libraries\IRremote\IRremote.cpp:279: error: 'TCCR2A' was not declared in this scope
  16. D:\arduino-1.0.5\libraries\IRremote\IRremote.cpp:279: error: 'TCCR2B' was not declared in this scope
  17. D:\arduino-1.0.5\libraries\IRremote\IRremote.cpp:279: error: 'OCR2A' was not declared in this scope
  18. D:\arduino-1.0.5\libraries\IRremote\IRremote.cpp:282: error: 'TIMSK2' was not declared in this scope
  19. D:\arduino-1.0.5\libraries\IRremote\IRremote.cpp:282: error: 'OCIE2A' was not declared in this scope
复制代码


哪位朋友知道怎么修改下让atmega16的片子能用吗?
回复

使用道具 举报

 楼主| 发表于 2013-7-28 03:53:46 | 显示全部楼层
是因为mega16不能完成328的功能吗?
回复 支持 反对

使用道具 举报

发表于 2013-7-28 09:57:04 | 显示全部楼层
貌似支持ATmega8的Pin9,但没听说支持mega16
回复 支持 反对

使用道具 举报

发表于 2013-7-28 09:57:35 | 显示全部楼层
你可以研究下库文件中的定时器设定部分
回复 支持 反对

使用道具 举报

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

本版积分规则

Archiver|联系我们|极客工坊

GMT+8, 2026-6-8 00:58 , Processed in 0.037261 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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