hi. i build a curcuit with Attiny45 and program it. im new in this and this is my code below. there is 555 timer that in astable mode and its just used in boost converter it generates about 100+ volts . i want to power up 555 timer with a PNP transistor with npn transistor pulls the base of pnp down.
Attiny45 pulls the base of npn HIGH when pin2ClkSignal is LOW. Attiny45 works just fine when powering an LED but i when i connect it to npn transistor base for powering 555 timer its just becomes LOW by itself why is that it doesnt do that when powering an LED .
this is my curcuit to power 555 timer.
int pin7StartPwm = 2;
int pin2ClkSignal = 3;
int pin3ButtonSignal = 4;
void setup() {
// put your setup code here, to run once:
pinMode(pin7StartPwm,OUTPUT);
pinMode(pin2ClkSignal,INPUT_PULLUP);
pinMode(pin3ButtonSignal,INPUT_PULLUP);
digitalWrite(pin7StartPwm , LOW);
}
void loop() {
// put your main code here, to run repeatedly:
if (digitalRead(pin3ButtonSignal) == LOW){
digitalWrite(pin7StartPwm , LOW);
delay(1000);
}else if (digitalRead(pin2ClkSignal) == LOW){
digitalWrite(pin7StartPwm , HIGH);
delay(1000);
}else{
}
}
Attiny45 pulls the base of npn HIGH when pin2ClkSignal is LOW. Attiny45 works just fine when powering an LED but i when i connect it to npn transistor base for powering 555 timer its just becomes LOW by itself why is that it doesnt do that when powering an LED .
this is my curcuit to power 555 timer.
int pin7StartPwm = 2;
int pin2ClkSignal = 3;
int pin3ButtonSignal = 4;
void setup() {
// put your setup code here, to run once:
pinMode(pin7StartPwm,OUTPUT);
pinMode(pin2ClkSignal,INPUT_PULLUP);
pinMode(pin3ButtonSignal,INPUT_PULLUP);
digitalWrite(pin7StartPwm , LOW);
}
void loop() {
// put your main code here, to run repeatedly:
if (digitalRead(pin3ButtonSignal) == LOW){
digitalWrite(pin7StartPwm , LOW);
delay(1000);
}else if (digitalRead(pin2ClkSignal) == LOW){
digitalWrite(pin7StartPwm , HIGH);
delay(1000);
}else{
}
}