core13: An Arduino core for the Attiny13 *testers wanted*

Hi!

Check the attiny13 manual and find out that PWM freq can be set by the last 3 bits of TCCR0B register.

Use that code in setup section:

/* 
Setting Divisor Frequency PWM on 9.6, 4.8, 1.2 MHz CPU 
  0x01 divisor is 1      37500, 18750, 4687 Hz 
  0x02 divisor is 8      4687, 2344, 586 Hz 
  0x03 divisor is 64     586, 293, 73 Hz 
  0x04 divisor is 256    146, 73, 18 Hz 
  0x05 divisor is 1024   36, 17, 5 Hz 
  */ 

 TCCR0B = TCCR0B & 0b11111000 | 0x02; // 0x02 divisor is 8   586 Hz

Measured real frequency is 555 Hz.

The question is - does this influence delay() function? Will test this in a near future :slight_smile: