No, while the code doesn't need the reset pin, you need the reset pin to be available to allow you to reprogram the board normally but it seems this is not the case with the bootloader installed on the Digispark. Unfortunately, that is where the delay of 10 seconds is being caused, by the bootloader looking for new code.Popopo wrote: That's right, as you write. But not always (for every digispark board), in any case, the reset pin affect to this project?
Reset pin is pin1, transformed into GPIO by Digispark GPIO#5, since the project use PB1 and PB4 it doesn't matter actually. Does it?
Ok, from what you say, it seems that not every Digispark is locked down! This is good and even better, yours sounds like it can be reprogrammed.Popopo wrote: I have been programing it with Arduino as ISP, so ISP is enable for me => reset pin is still a reset pin.
I suspect that perhaps the clock frequency is higher on the screeching boards, or, the clock divider for the timer being used to generate the PWM "noise" is smaller. The PWM frequency is determined by the clock frequency, the time prescaler which divides the clock frequency and determines how many clock cycles determine a single timer cycle. If the timer is running at full speed, and the clock is 20 MHz, it's possible that the PWM frequency is getting into too high a range, and shoving the audio up a few octaves?bwinkel67 wrote: So that's why I ask what you are doing because if that's what you did and didn't see any difference then I wouldn't bother. If that's the case, why would Stephen's program run on his ATTiny85 board and sound normal and then sound metallic on the Digispark ATTiny board? What's the difference between the two boards?
I don't know for certain, I've only ever used Stephen Usher's code and was never able to get a sound out of it as my speaker was buggered!
Also, the board design used by Stephen is not supposed to need a capacitor, it's based on some direct drive sound code.
Yes indeed, it's definitely not HiFi quality sound, but high end synthesisers often use square waves as a source of their sound, just enhanced by filters and such like.Popopo wrote: Attiny digitalized sound is played by PWM == SQUARES, not waves, no waves => not nice sound.
Ok, further to the above, I've had a look at Stephen's code at https://github.com/stephen-usher/vDrive ... snd-v1.ino. It seems he's enabled the PLL to run the timer at 64 MHz with a divide by 1 prescaler initially, but then this is dropped to a divide by 8, giving a timer frequency of 8 MHz, so the timer will be clocked at 8 MHz. Sound samples will be output at a rate of 8 KHz in "Fast" PWM mode.
I don't know what code the version you are running uses, I wonder if it's similar?
HTH Cheers,
Norm.