Attiny45 hardware ok, but even then tested code does nothing

This is becoming REALLY irritating.

Anyways, Im currently working on a attiny45 based IR rgb led controller code, There was some hurdle i had to cross, but finally passed through and got a code working on the arduino nano. It worked perfectly, as i wished, 3 hardware pwm drives RGB and another softpwm drives a white led.

//#define F_CPU 8000000UL
#include <PinChangeInterrupt.h>
#include <IRLremote.h>
CNec IRLremote;
#include <Arduino.h>
#include <PalatisSoftPWM.h>
SOFTPWM_DEFINE_PIN2_CHANNEL(0);
SOFTPWM_DEFINE_OBJECT(1);

#define RECV_PIN  PB3
const int R_PIN = PB0;
const int G_PIN = PB1;
const int B_PIN = PB4;
//const int W_PIN = PB2;
byte red, green, blue, white;
//constrain(red, 0, 255);
//constrain(green, 0, 255);
//constrain(blue, 0, 255);
//constrain(white_high, 0, 255);
//constrain(white_low, 0, 255);
#define ON                0x3//0xF7C03F
#define OFF               0x2//0xF740BF//
#define BRIGHTNESS_UP     0x0//0xF700FF//
#define BRIGHTNESS_DOWN   0x1//0xF7807F//
#define FLASH             0xB//0xF7D02F
#define STROBE            0xF//0xF7F00F
#define FADE              0x13//0xF7C837//
#define SMOOTH            0x17//0xF7E817

#define RED               0x4//0xF720DF//
#define GREEN             0x5//0xF7A05F//
#define BLUE              0x6//0xF7609F//
#define WHITE             0x7//0xF7E01F

#define ORANGE            0x8//0xF710EF//
#define YELLOW_DARK       0xC//0xF730CF//
#define YELLOW_MEDIUM     0x10//0xF708F7
#define YELLOW_LIGHT      0x14//0xF728D7

#define GREEN_LIGHT       0x9//0xF7906F//
#define GREEN_BLUE1       0xD//0xF7B04F//
#define GREEN_BLUE2       0x11//0xF78877
#define GREEN_BLUE3       0x15//0xF7A857

#define BLUE_RED          0xA//0xF750AF//
#define PURPLE_DARK       0xE//0xF7708F//
#define PURPLE_LIGHT     0x12// 0xF748B7
#define PINK              0x16//0xF76897

//CNec IRLremote;







void setup()
{
  
  pinMode(R_PIN, OUTPUT);
  pinMode(G_PIN, OUTPUT);
  pinMode(B_PIN, OUTPUT);
//  pinMode(W_PIN, OUTPUT);
  PalatisSoftPWM.begin(100);
  
  if (!IRLremote.begin(RECV_PIN))
    {}
}



void loop() {
  if (IRLremote.available())
  {
    // Get the new data from the remote
    auto data = IRLremote.read();


    
      switch (data.command) {
        case RED:
          red = 255;
          green = 0;
          blue = 0;
          break;

        case GREEN:
          red = 0;
          green = 255;
          blue = 0;
          break;

        case BLUE:
          red = 0;
          green = 0;
          blue = 255;
          break;

        case FLASH:
          red = 255;
          green = 255;
          blue = 127;
          break;

        case BRIGHTNESS_UP:
          red += 10;
          green += 10;
          blue += 10;
          break;

        case BRIGHTNESS_DOWN:
          red -= 10 ;
          green -= 10;
          blue -= 10;
          break;

        case OFF:
          red = 0;
          green = 0;
          blue = 0;
          white = 0;
          break;

        case ORANGE:
          red += 10;
          break;

        case GREEN_LIGHT:
          green += 10;
          break;

        case BLUE_RED:
          blue += 10;
          break;

        case YELLOW_DARK:
          red -= 10;
          break;

        case GREEN_BLUE1:
          green -= 10;
          break;

        case PURPLE_DARK:
          blue -= 10;
          break;

        case STROBE:
          white += 10;
          break;

        case FADE:
          white -= 10;
          break;
        case ON:
          white = 255;
          break;
        case WHITE:
          white = 0;
          break;

          data.command = 0;
      }
  }
    
  
  analogWrite(R_PIN, red);
  analogWrite(G_PIN, green);
  analogWrite(B_PIN, blue);
  PalatisSoftPWM.set(0, white);
}

pretty basic, although i had to change TCCR1A & TCCR1B in the code library to TCCR0A & TCCR0B to make it compile, ( suggested by ide) weird, because the attiny45 does have timer 1.
and this one, without the software pwm just to be sure.

#include <PinChangeInterrupt.h>
#include <IRLremote.h>
CNec IRLremote;
#define RECV_PIN  PB3
const int R_PIN = PB0;
const int G_PIN = PB1;
const int B_PIN = PB4;
const int W_PIN = PB2;
byte red, green, blue, white;
//constrain(red, 0, 255);
//constrain(green, 0, 255);
//constrain(blue, 0, 255);
//constrain(white_high, 0, 255);
//constrain(white_low, 0, 255);
#define ON                0x3//0xF7C03F
#define OFF               0x2//0xF740BF//
#define BRIGHTNESS_UP     0x0//0xF700FF//
#define BRIGHTNESS_DOWN   0x1//0xF7807F//
#define FLASH             0xB//0xF7D02F
#define STROBE            0xF//0xF7F00F
#define FADE              0x13//0xF7C837//
#define SMOOTH            0x17//0xF7E817

#define RED               0x4//0xF720DF//
#define GREEN             0x5//0xF7A05F//
#define BLUE              0x6//0xF7609F//
#define WHITE             0x7//0xF7E01F

#define ORANGE            0x8//0xF710EF//
#define YELLOW_DARK       0xC//0xF730CF//
#define YELLOW_MEDIUM     0x10//0xF708F7
#define YELLOW_LIGHT      0x14//0xF728D7

#define GREEN_LIGHT       0x9//0xF7906F//
#define GREEN_BLUE1       0xD//0xF7B04F//
#define GREEN_BLUE2       0x11//0xF78877
#define GREEN_BLUE3       0x15//0xF7A857

#define BLUE_RED          0xA//0xF750AF//
#define PURPLE_DARK       0xE//0xF7708F//
#define PURPLE_LIGHT     0x12// 0xF748B7
#define PINK              0x16//0xF76897

//CNec IRLremote;







void setup()
{

  pinMode(R_PIN, OUTPUT);
  pinMode(G_PIN, OUTPUT);
  pinMode(B_PIN, OUTPUT);
  pinMode(W_PIN, OUTPUT);
  
  
  if (!IRLremote.begin(RECV_PIN))
    {}
}



void loop() {
  if (IRLremote.available())
  {
    // Get the new data from the remote
    auto data = IRLremote.read();


    if (data.command != 0xFFFFFFFF)
    {
      switch (data.command) {
        case RED:
          red = 255;
          green = 0;
          blue = 0;
          break;

        case GREEN:
          red = 0;
          green = 255;
          blue = 0;
          break;

        case BLUE:
          red = 0;
          green = 0;
          blue = 255;
          break;

        case FLASH:
          red = 255;
          green = 255;
          blue = 127;
          break;

        case BRIGHTNESS_UP:
          red += 10;
          green += 10;
          blue += 10;
          break;

        case BRIGHTNESS_DOWN:
          red -= 10 ;
          green -= 10;
          blue -= 10;
          break;

        case OFF:
          red = 0;
          green = 0;
          blue = 0;
          white = 0;
          break;

        case ORANGE:
          red += 10;
          break;

        case GREEN_LIGHT:
          green += 10;
          break;

        case BLUE_RED:
          blue += 10;
          break;

        case YELLOW_DARK:
          red -= 10;
          break;

        case GREEN_BLUE1:
          green -= 10;
          break;

        case PURPLE_DARK:
          blue -= 10;
          break;

        case STROBE:
          white += 10;
          break;

        case FADE:
          white -= 10;
          break;
        case ON:
          white = 255;
          break;
        case WHITE:
          white = 0;
          break;

          data.command = 0;
      }
    }
  }
  analogWrite(R_PIN, red);
  analogWrite(G_PIN, green);
  analogWrite(B_PIN, blue);
  if(white == 255){ digitalWrite(W_PIN, HIGH);}
  if(white == 0){digitalWrite(W_PIN, LOW);}
}

Both of these codes were tested on an arduino nano, worked perfect, hooked up arduino as ISP, uploads perfectly, Guess what, does nothing. nothing at all… Im sure the code works, sure the hardware works fine.
If the attiny was bricked, The code wouldnt even upload in the first place…

Oh and this is the original Softpwm code i wrote first but couldnt use because that library doesnt support attinys,

//#define F_CPU 8000000UL
#include <PinChangeInterrupt.h>
#include <IRLremote.h>
CNec IRLremote;

#include <SoftPWM.h>
#include <SoftPWM_timer.h>

#define RECV_PIN  PB3
const int R_PIN = PB0;
const int G_PIN = PB1;
const int B_PIN = PB4;
const int W_PIN = PB2;
byte red, green, blue, white;
//constrain(red, 0, 255);
//constrain(green, 0, 255);
//constrain(blue, 0, 255);
//constrain(white_high, 0, 255);
//constrain(white_low, 0, 255);
#define ON                0x3//0xF7C03F
#define OFF               0x2//0xF740BF//
#define BRIGHTNESS_UP     0x0//0xF700FF//
#define BRIGHTNESS_DOWN   0x1//0xF7807F//
#define FLASH             0xB//0xF7D02F
#define STROBE            0xF//0xF7F00F
#define FADE              0x13//0xF7C837//
#define SMOOTH            0x17//0xF7E817

#define RED               0x4//0xF720DF//
#define GREEN             0x5//0xF7A05F//
#define BLUE              0x6//0xF7609F//
#define WHITE             0x7//0xF7E01F

#define ORANGE            0x8//0xF710EF//
#define YELLOW_DARK       0xC//0xF730CF//
#define YELLOW_MEDIUM     0x10//0xF708F7
#define YELLOW_LIGHT      0x14//0xF728D7

#define GREEN_LIGHT       0x9//0xF7906F//
#define GREEN_BLUE1       0xD//0xF7B04F//
#define GREEN_BLUE2       0x11//0xF78877
#define GREEN_BLUE3       0x15//0xF7A857

#define BLUE_RED          0xA//0xF750AF//
#define PURPLE_DARK       0xE//0xF7708F//
#define PURPLE_LIGHT     0x12// 0xF748B7
#define PINK              0x16//0xF76897

//CNec IRLremote;







void setup()
{
  SoftPWMBegin();

  SoftPWMSet(W_PIN, 0);
  pinMode(R_PIN, OUTPUT);
  pinMode(G_PIN, OUTPUT);
  pinMode(B_PIN, OUTPUT);
  pinMode(W_PIN, OUTPUT);
  
  
  if (!IRLremote.begin(RECV_PIN))
    {}
}



void loop() {
  if (IRLremote.available())
  {
    // Get the new data from the remote
    auto data = IRLremote.read();


    if (data.command != 0xFFFFFFFF)
    {
      switch (data.command) {
        case RED:
          red = 255;
          green = 0;
          blue = 0;
          break;

        case GREEN:
          red = 0;
          green = 255;
          blue = 0;
          break;

        case BLUE:
          red = 0;
          green = 0;
          blue = 255;
          break;

        case FLASH:
          red = 255;
          green = 255;
          blue = 127;
          break;

        case BRIGHTNESS_UP:
          red += 10;
          green += 10;
          blue += 10;
          break;

        case BRIGHTNESS_DOWN:
          red -= 10 ;
          green -= 10;
          blue -= 10;
          break;

        case OFF:
          red = 0;
          green = 0;
          blue = 0;
          white = 0;
          break;

        case ORANGE:
          red += 10;
          break;

        case GREEN_LIGHT:
          green += 10;
          break;

        case BLUE_RED:
          blue += 10;
          break;

        case YELLOW_DARK:
          red -= 10;
          break;

        case GREEN_BLUE1:
          green -= 10;
          break;

        case PURPLE_DARK:
          blue -= 10;
          break;

        case STROBE:
          white += 10;
          break;

        case FADE:
          white -= 10;
          break;
        case ON:
          white = 255;
          break;
        case WHITE:
          white = 0;
          break;

          data.command = 0;
      }
    }
  }
  analogWrite(R_PIN, red);
  analogWrite(G_PIN, green);
  analogWrite(B_PIN, blue);
  SoftPWMSet(W_PIN, white);
}

Thanks,
Kaseftamjid.

and before someone says it, Yes, i have done as much debugging on my side as possible.
Edit: just tried another 45 chip, still nothing.

Im using Microcore by spencekonde, IRLremote by nico hood and 2 pwm libraries(one of them a fork of palatis’s)

Is there a certain reason most my posts are ignored?

kaseftamjid:
Is there a certain reason most my posts are ignored?

Not for any sinister reason. You have a fairly obscure problem and have made unspecified changes to a library to I and likely others haven't used. Perhaps no-one who read your posts knows, or doesn't care to work through what you have looking for bugs.

I suggest you try something trivial to make sure you haven't damaged your attiny and then write the smallest program you can to make your LED do something. You're trying big bang testing now, which as you have discovered, makes debugging harder.

wildbill:
Not for any sinister reason. You have a fairly obscure problem and have made unspecified changes to a library to I and likely others haven't used. Perhaps no-one who read your posts knows, or doesn't care to work through what you have looking for bugs.

I suggest you try something trivial to make sure you haven't damaged your attiny and then write the smallest program you can to make your LED do something. You're trying big bang testing now, which as you have discovered, makes debugging harder.

... I did specify what change i made in the library
More info.. Text was already over 9k charecters.. so i would have provided if it was asked for, given theres so much. I already did basic and as far as i understand troubleshooting.. thats the whole point of the forum isnt it? Anyways, im thankful atleast someone replied

wildbill:
I suggest you try something trivial to make sure you haven't damaged your attiny and then write the smallest program you can to make your LED do something. You're trying big bang testing now, which as you have discovered, makes debugging harder.

Did these, but still nothing. This is really bugging me out. Could it be a compiler error?

kaseftamjid:
Did these, but still nothing. This is really bugging me out. Could it be a compiler error?

No, down that road lies madness. Of course, there are compiler bugs, but the chances of you finding any are vanishingly small. Post your new code.

wildbill:
No, down that road lies madness. Of course, there are compiler bugs, but the chances of you finding any are vanishingly small. Post your new code.

new code?
I posted all the codes i have.
The only one that i havent is the cpp file i changed.
Changed this

TCCR1A = 0b00000000;
      TCCR1B = 0b00001001;

To this

begin ************/");
      TCCR0A = 0b00000000;
      TCCR0B = 0b00001001;

PalatisSoftPWM.h (124 KB)

TCCR0B = 0b00001001;
Does not appear to be a valid configuration for Timer0.

OCR1A = (F_CPU - hertz * PWMlevels() / 2) / (hertz * PWMlevels());
OCR1A is not a Timer0 register. The calculation might not yield a value useful for an 8 bit timer.

Is there anything i can change it into? given this is the only mention of a timer in the whole code, And i would love to use it with timer0