Прошил at2313a-pu

Тема в разделе "Микроконтроллеры AVR", создана пользователем Максим B, 2 фев 2014.

  1. Максим B

    Максим B Гуру

    Прошил котнроллер 2313a-pu - светодиод мигает. Теперь хочу подключить реле и TSOP. Подключил к 7 ноге на attiny TSOP датчик и заливаю скетч для узнавания кнопки пульта
    Код (Text):
    #include <IRremote.h>
    int RECEIVE_PIN = PD3;
    IRrecv irrecv(RECEIVE_PIN);
    decode_results results;
    void setup() {
        Serial.begin(9600);
        irrecv.enableIRIn(); // Start the receiver
    }
    void loop() {
        if (irrecv.decode(&results)) {
            Serial.print("0x");
            Serial.println(results.value, HEX);
            delay(50);
            irrecv.resume();// Receive the next value
        }
    }
     
    код рабочий. При заливке получаю ошибки
    Код (Text):
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::mark(int)':
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:172: error: 'TCCR2A' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:172: error: 'COM2B1' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::space(int)':
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:180: error: 'TCCR2A' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:180: error: 'COM2B1' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp: In member function 'void IRsend::enableIROut(int)':
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:198: error: 'TIMSK2' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:198: error: 'TOIE2' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:207: error: 'TCCR2A' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:207: error: 'WGM20' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:208: error: 'TCCR2B' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:208: error: 'WGM22' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:208: error: 'CS20' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:211: error: 'OCR2A' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:212: error: 'OCR2B' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp: In member function 'void IRrecv::enableIRIn()':
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:224: error: 'TCCR2A' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:229: error: 'TCCR2B' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:229: error: 'CS22' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:230: error: 'CS21' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:231: error: 'CS20' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:234: error: 'TIMSK2' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:234: error: 'TOIE2' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:236: error: 'TCNT2' was not declared in this scope
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp: In function 'void TIMER2_OVF_vect()':
    C:\arduino-1.0.4\libraries\IRremote\IRremote.cpp:266: error: 'TCNT2' was not declared in this scope
     
    кто с таким сталкивался?
     
  2. Megakoteyka

    Megakoteyka Оракул Модератор

    Код пытается использовать те регистры, которых нет в контроллере. Например, таймера 2 в этом контроллере нет, а код хочет его использовать.
     
  3. Максим B

    Максим B Гуру

    тогда вопрос: какой код можно использовать для данного контроллера чтобы управлять ик пультом - реле? прошить именно с ардуины.
     
  4. Максим B

    Максим B Гуру

  5. Airbus

    Airbus Радиохулиган Модератор

    Так купи или сделай.Вещь необходимая.И Ардуине мозги поправить иногда пригодиться-бывает и такое.Я так понимаю вопрос к теме Ардуино относиться лишь косвенно?Вот здесь http://tinyurl.com/p6wufb5 IR Control для Ардуино
     
    Последнее редактирование: 19 мар 2014