8-bit resolution (256 wiper steps). а в схеме которую Вы выложили , как правильно заметил Sancho, 10 разрядный ЦАП - 1024 шага.
Отправлено спустя 2 минуты 1 секунду:
notepad++
Подправить прошивку блока питания
8-bit resolution (256 wiper steps). а в схеме которую Вы выложили , как правильно заметил Sancho, 10 разрядный ЦАП - 1024 шага.
notepad++
AVR studio 4.19 открывает только ps_atmega8_oled. Видимо кто то перекомпипастил.
Прям схема как Вы выложили тыц
Проект надо свой выкладывать. Тогда помощь придет.
Логические цепи разрушены. Зачем делать примеры с отклонением от принципиальной схемы.
Обычных не бывает. У меня 3 вида и все работают по разному. Хотя закупал у одного продавана два десятка одним заказом.
На плате энкодера производитель установил сопротивление 10к и кондер 0,1мкф?
Вы не даете полную информацию. Что значит рабочие - где осциллограмма?
Код: Выделить всё
[code]
/* Encoder Library - TwoKnobs Example
* http://www.pjrc.com/teensy/td_libs_Encoder.html
*
* This example code is in the public domain.
*/
#include <Encoder.h>
// Change these pin numbers to the pins connected to your encoder.
// Best Performance: both pins have interrupt capability
// Good Performance: only the first pin has interrupt capability
// Low Performance: neither pin has interrupt capability
Encoder knobLeft(10, 11);
Encoder knobRight(12, 13); // с 13 ноги убрать светодиод
// avoid using pins with LEDs attached
void setup() {
Serial.begin(9600);
Serial.println("TwoKnobs Encoder Test:");
}
long positionLeft = -999;
long positionRight = -999;
void loop() {
long newLeft, newRight;
newLeft = knobLeft.read();
newRight = knobRight.read();
if (newLeft != positionLeft || newRight != positionRight) {
Serial.print("Left = ");
Serial.print(newLeft);
Serial.print(", Right = ");
Serial.print(newRight);
Serial.println();
positionLeft = newLeft;
positionRight = newRight;
}
// if a character is sent from the serial monitor,
// reset both back to zero.
if (Serial.available()) {
Serial.read();
Serial.println("Reset both knobs to zero");
knobLeft.write(0);
knobRight.write(0);
}
}
Мой обычный KY-040. Фантастика не правда ли
уже писал Вам. Не читаете?
Кондерчик подбирайте. У меня родные от продавана заменил, где то даже на 0,22мкф.