极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 11764|回复: 4

atmega128 for arduino 不能用 Irremote 库

[复制链接]
发表于 2015-1-3 08:55:33 | 显示全部楼层 |阅读模式
把一块atmega128烧好arduino的bootloader后,不能用IRremote库提示如下(atmega128好像没有timer2,只有0,1,3),但是不知道怎么改timer,可有高手指点一二。
(atmega128 for arduino 用的bootloaderd是以下这个网址提供的:http://www.chip45.com/products/c ... modul_board_usb.php)
——————————————————

F:\tools\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::mark(int)':
F:\tools\arduino-1.0\libraries\IRremote\IRremote.cpp:227: error: 'TCCR2A' was not declared in this scope
F:\tools\arduino-1.0\libraries\IRremote\IRremote.cpp:227: error: 'COM2B1' was not declared in this scope
F:\tools\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::space(int)':
F:\tools\arduino-1.0\libraries\IRremote\IRremote.cpp:235: error: 'TCCR2A' was not declared in this scope
F:\tools\arduino-1.0\libraries\IRremote\IRremote.cpp:235: error: 'COM2B1' was not declared in this scope
F:\tools\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::enableIROut(int)':
F:\tools\arduino-1.0\libraries\IRremote\IRremote.cpp:253: error: 'TIMSK2' was not declared in this scope
F:\tools\arduino-1.0\libraries\IRremote\IRremote.cpp:263: error: 'TCCR2A' was not declared in this scope
F:\tools\arduino-1.0\libraries\IRremote\IRremote.cpp:263: error: 'TCCR2B' was not declared in this scope
F:\tools\arduino-1.0\libraries\IRremote\IRremote.cpp:263: error: 'WGM22' was not declared in this scope
F:\tools\arduino-1.0\libraries\IRremote\IRremote.cpp:263: error: 'OCR2A' was not declared in this scope
F:\tools\arduino-1.0\libraries\IRremote\IRremote.cpp:263: error: 'OCR2B' was not declared in this scope
F:\tools\arduino-1.0\libraries\IRremote\IRremote.cpp: In member function 'void IRrecv::enableIRIn()':
F:\tools\arduino-1.0\libraries\IRremote\IRremote.cpp:279: error: 'TCCR2A' was not declared in this scope
F:\tools\arduino-1.0\libraries\IRremote\IRremote.cpp:279: error: 'TCCR2B' was not declared in this scope
F:\tools\arduino-1.0\libraries\IRremote\IRremote.cpp:279: error: 'OCR2A' was not declared in this scope
F:\tools\arduino-1.0\libraries\IRremote\IRremote.cpp:282: error: 'TIMSK2' was not declared in this scope
F:\tools\arduino-1.0\libraries\IRremote\IRremote.cpp:282: error: 'OCIE2A' was not declared in this scop

————————————————————————————————

回复

使用道具 举报

发表于 2015-1-3 14:26:59 | 显示全部楼层
IDE什么版本?跟这个有关
回复 支持 反对

使用道具 举报

发表于 2015-1-21 22:32:48 | 显示全部楼层
能否把你的BOOTLOAD程序试用一下?
回复 支持 反对

使用道具 举报

发表于 2015-1-22 13:48:44 | 显示全部楼层
mega128 默认用Timer2(Pin #9),
修改请参考这里:http://www.geek-workshop.com/thread-3606-1-1.html
回复 支持 反对

使用道具 举报

发表于 2015-7-11 13:48:27 | 显示全部楼层
m128的timer的寄存器跟其他不一样,目前arduino ide还不支持。
FlexiTimer2 库支持m128,可以参考他的代码修改。
回复 支持 反对

使用道具 举报

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

本版积分规则 需要先绑定手机号

Archiver|联系我们|极客工坊

GMT+8, 2024-5-2 20:58 , Processed in 0.046666 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2021, Tencent Cloud.

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