ATTiny, Counting with interupts

Robin2:
Can you post all the code as single piece, or better still as an attachment. If it goes beyond 10 or 12 lines I find it easier to copy it to my text editor where I can do searches and have the code colour-highlighted.

...R

I'll post it up in a bit, as I am trying to get sleep to work, it seems without success. I am following the guide here but I am not seeing the same results, so I must be doing something wrong.

This is the code I am testing...

#include <avr/sleep.h>
#define BODS 7                          // BOD Sleep bit in MCUCR
#define BODSE 2                         // BOD Sleep enable bit in MCUCR
void setup() {
  // put your setup code here, to run once:
  
  // disable ADC
  ADCSRA = 0; 
  set_sleep_mode (SLEEP_MODE_PWR_DOWN);  
  sleep_enable();
 
  // turn off brown-out enable in software
  MCUCR = bit (BODS) | bit (BODSE);  // turn on brown-out enable select
  MCUCR = bit (BODS);        // this must be done within 4 clock cycles of above
  sleep_cpu ();              // sleep within 3 clock cycles of above
}

void loop() {
  // put your main code here, to run repeatedly:

}

I am seeing the same current usage as without the sleep code.

Regards,

Les