Closed AnatolSher closed 1 year ago
On what board did you test it - W806 or W801 ?
W806-Kit v1.0
and I have a parallel questions :)
where is HAL (vers 0.4.0) tutorial for W806? How can I download it? This HAL is
present in the current build.
newest version is 0.6.0 - it is true?
Perhaps there was some misunderstanding between us :) I have nothing to do with the manufacturers of these boards, for me it's just a hobby. So my knowledge is very limited. I only use what I found in the Net.
At the time I don't have an 806 board, only an 801. I will try to figure out the SDK for 806, but if you find something yourself, please write :)
I understood you. It's also a hobby for me. I have an 801 board. And I will check all PWM channels on it.
I checked. The W801 board has the same behavior. Maybe the pin multiplexing is wrong. А по русски здесь писать можно?
Можно :) Но полезнее все же по английски, так как больше народу смогут участвовать.
Did you test for the same issue under windows?
This is independent of the operating system. I have tested compiling and uploading a PWM sketch on both Windows and Linux. Arduino IDE 1.8.19
Странные китайские программисты... :) Странная концепция инициализации пинов в различных режимах... :) Чтобы победить ошибку пришлось сделать так - при каждом вызове analogWrite() инициализировать PWM Понятно что это костыль... Пока пусть будет так, потом ревизию кода делать будем Лишнее за комментировал.
Strange Chinese programmers... :) Strange concept of initializing pins in different modes... :) To defeat the error, I had to do this - with each call to analogWrite () initialize PWM. Banned unnecessary program lines of the function.
В данный момент этот скетч работает как задумано
This sketch is currently working as intended.
Привет! Разобрался я почему PWM в многоканальном и одновременном исполнении не работал. Пришлось всю инициализацию переписать. Чуть позже выложу исходники
Привет Я до конца недели в отьезде
Исправлено в HAL 0.6.0
Hello! PWM work not correctly. ` // MultiPWM not worked. In this example, PB0 does not work correctly. However, when there is no PWM signal on the other pins, PB0 works fine.
include
include
define DUTY_MAX 250
define DUTY_MIN 50
int pwm_pins[3] = { PB0, PB1, PB2 };
void setup() { //put your setup code here, to run once: pinMode(pwm_pins[0], PWM_OUT); pinMode(pwm_pins[1], PWM_OUT); pinMode(pwm_pins[2], PWM_OUT);
analogWrite(pwm_pins[0], DUTY_MAX); analogWrite(pwm_pins[1], DUTY_MAX); analogWrite(pwm_pins[2], DUTY_MAX); }
void loop() { // put your main code here, to run repeatedly:
for (int pw = 0; pw < 3; pw++) {
} } `