Extra help debugging for 4 separately used PWM channels, with the atmega328p lazarus / 78-Embedded - AVR ---------------------------------------------------------------------- pascalbythree · 2025-11-21 12:09 Can somebody please help me out debugging this peace of source code ? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ModePortB(1,true);    TCCR1A := (%10 shl COM1A) or (%10 shl COM1B) or (1 shl WGM1);         TCCR1B := TCCR1B or %101;     OCR1B := 125; // INTERNAL LIGHT EFFECT              ModePortB(2,true);    TCCR1A := (%10 shl COM1A) or (%10 shl COM1B) or (1 shl WGM1);         TCCR1B := TCCR1B or %101;         OCR1A := 125; // LED BAR 4   ModePortD(6,true);    TCCR1A := (%10 shl COM0A) or (%10 shl COM0B) or (1 shl WGM1);          TCCR1B := TCCR1B or %101;           OCR0A := 125; // LED BAR 5 ModePortD(5,true);    TCCR1A := (%10 shl COM0A) or (%10 shl COM0B) or (1 shl WGM1);         TCCR1B := TCCR1B or %101;      OCR0B := 125; // LED BAR 6 The INTERNAL LIGHT EFFECT and the LEDBAR 4 blinks just fine. What to change to get the LED BAR 5 and LED BAR 6 channel to work at the same time? PS: It has to run 4 different values. Greets, Wouter van Wegen ---------------------------------------------------------------------- Laksen · 2025-11-21 14:10 TCCR0A/B instead of 1? ---------------------------------------------------------------------- pascalbythree · 2025-11-21 15:05 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i         // SETTTING ALL PWM MODUS FOR 4 DRIVERS    ModePortB(1,true);    TCCR1A := (%10 shl COM1A) or (%10 shl COM1B) or (1 shl WGM1);         TCCR1B := TCCR1B or %010;     OCR1B := 0; // INTERNAL LIGHT EFFECT           ModePortB(2,true);    TCCR1A := (%10 shl COM1A) or (%10 shl COM1B) or (1 shl WGM1);         TCCR1B := TCCR1B or %010;         OCR1A := 0; // LED BAR 4         ModePortD(6,true);    TCCR0A  := (%10 shl COM0A) or (%10 shl COM0B) or (1 shl WGM1);         TCCR0B := TCCR1B or %010;         OCR0A := 0; // LED BAR 5            ModePortD(5,true);    TCCR0A  := (%10 shl COM0A) or (%10 shl COM0B) or (1 shl WGM1);         TCCR0B := TCCR0B or %010;    OCR0B := 0; // LED BAR 6 Thank you, it got to work already like this!