Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
So the uC current capability looks ok. Logically, then, something is amiss with the uC software. Could interrupts be over-riding the buzzer drive arrangement?
if ( internal_sec%16==0 ) //blink the water change activity led
{ PORTC |= 1<<PINC1; } else { PORTC &=~(1<<PINC1);LCDWriteIntXY(0,1,val,4); }
ISR(TIMER1_COMPA_vect) // action to be done every 250 msec
{
internal_sec++;
if (internal_sec > 239) //convert it to 1000msec
{
internal_sec = 0;
internal_min ++; //we get 1 min after every 60 sec
if (internal_min ==240) // gives 4 hr timing
{
internal_min = 0;
}
}
}
I tried the screwdriver method it didnot work. I think I will just throw it and get a new one.Sounds more like a faulty buzzer.....I use little 5v buzzers... When it clicks i tap it with a screwdriver and it then makes the correct sound... My 5v buzzers really should be given 6V as I drive them through a NPN BJT and they don't get the full 5V they need..
I don't think the ISR is to blame either... This only counts time it doesn't set / reset any pin.
while(1)
{
PORTC = 0x01; // buzzer on pin RC0
Delay_mS(250);
PORTC = 0x00; // buzzer off
Delay_mS(750);
}