ATtiny85 @ 16mhz with internal High Frequency PLL Clock

Hi guys, experimenting we found the possibility to use an ATtiny85 or Pico85 SMD @ 16mhz with the internal High Frequency PLL Clock.
To do this you have to regulate fuses removing divider, a easier technique is to modify boards.txt with the new clock and then program the MCU.
Here a video with software servo working well:

could you explain what you've done? How have you set the fuses?

This entry seems to work well...

###########################################################################

attiny85at16p.name=ATtiny85 @ 16 MHz  (internal PLL; 4.3 V BOD)

# The following do NOT work...
# attiny85at16p.upload.using=avrispv2
# attiny85at16p.upload.using=Pololu USB AVR Programmer

# The following DO work (pick one)...
attiny85at16p.upload.using=arduino:arduinoisp
# attiny85at16p.upload.protocol=avrispv2
# attiny85at16p.upload.using=pololu

attiny85at16p.upload.maximum_size=8192

# PLL Clock; Start-up time PWRDWN/RESET: 1K CK/14 CK + 4 ms; [CKSEL=0001 SUT=00]
# Brown-out detection level at VCC=4.3 V; [BODLEVEL=100]
# Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]
# Serial program downloading (SPI) enabled; [SPIEN=0]

attiny85at16p.bootloader.low_fuses=0xC1
attiny85at16p.bootloader.high_fuses=0xD4
attiny85at16p.bootloader.extended_fuses=0xFF
attiny85at16p.bootloader.path=empty
attiny85at16p.bootloader.file=empty85at16.hex

attiny85at16p.build.mcu=attiny85
attiny85at16p.build.f_cpu=16000000L
attiny85at16p.build.core=tiny
 
###########################################################################

Using ATtiny85 @ 16Mhz internal clock is the input voltage range 2.7V - 5.5V?

From Figure 21-2. Maximum Frequency vs. VCC in the datasheet it looks like the voltage range at 16 MHz is about 3.3V to 5.5V.

Will this work with the Attiny45?

Yes. Maybe...

27.2 Errata ATtiny45
27.2.3 Rev B and C

  1. PLL not locking
    When at frequencies below 6.0 MHz, the PLL will not lock
    Problem fix / Workaround
    When using the PLL, run at 6.0 MHz or higher.

27.2.4 Rev A
3. PLL not locking
When at frequencies below 6.0 MHz, the PLL will not lock
Problem fix / Workaround
When using the PLL, run at 6.0 MHz or higher.

Running an ATtiny45 at 16 MHz using the PLL should work just fine.

This has not been posted on in a while, but I just want to add to this forum:

The SoftwareServo library works well ONLY if your lfuse is c1. I tried df and that did not work; it only worked at 8MHz for me

So, c1 works the best

Thanks

Hello.

I try this, but it dont work.
Then i try to remove some lines and edit some :

attiny85at16p.name=ATtiny85 @ 16 MHz  (internal PLL 4.3 V BOD)

# The following DO work (pick one)...
###attiny85at16p.upload.using=arduino:arduinoisp               <- !!!
# attiny85at16p.upload.protocol=avrispv2
# attiny85at16p.upload.using=pololu

attiny85at16p.upload.maximum_size=8192

# PLL Clock; Start-up time PWRDWN/RESET: 1K CK/14 CK + 4 ms; [CKSEL=0001 SUT=00]
# Brown-out detection level at VCC=4.3 V; [BODLEVEL=100]
# Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]
# Serial program downloading (SPI) enabled; [SPIEN=0]

attiny85at16p.bootloader.low_fuses=0xC1
attiny85at16p.bootloader.high_fuses=0xD4
attiny85at16p.bootloader.extended_fuses=0xFF
#attiny85at16p.bootloader.path=empty                            <- !!!
#attiny85at16p.bootloader.file=empty85at16.hex          <- !!!

attiny85at16p.build.mcu=attiny85
attiny85at16p.build.f_cpu=16000000L
#attiny85at16p.build.core=tiny
attiny85at16p.build.variant=tiny8                             <- !!!
attiny85at16p.build.core=arduino:arduino                <- !!!

Then i can use my Arduino Uno as ISP.

But i have some problems with the servo moving. I made a short testing sketch :

void loop() {
  
  for (int i=20; i<160; i++){
    servo1.write(i);
    delay(10);
    SoftwareServo::refresh();
    
  }
  
  delay(1000);
  
  for (int i=160; i>20; i--){
    servo1.write(i);
    delay(10);
    SoftwareServo::refresh();
    
  }
  delay(1000);
}

The servo will move slowly, the fast many times in a short way, the again slow....not good !
I have also try without servolib.

 void servoAngle(int angle, int Speed){
  digitalWrite(servoPin, HIGH);
  angle = map(angle,0,180,400,2200); // 500 , 2500 Winkel in Zeit umrechnen, siehe Bemerkung!
  delayMicroseconds(angle);
  digitalWrite(servoPin, LOW);
  delayMicroseconds(Speed);
  
}

void loop() {

   for (int i=180; i>=50; i--){
    servoAngle(i,15000);
  }
  
  delay(2000);
  
  for (int i=50; i<=180; i++){
    servoAngle(i,15000);
  }
   
  delay(2000);
}

But here i am testing about the values in the map funktion.
With 8Mhz this will be

angle = map(angle,0,180,500,2500);

But her also the movement ist not so good as with my Arduino Uno.
Short ways are sometimes to fast, or dont be moved.

Then i see this with 16Mhz and i hoped it will be better, but its not.
Dont understand why the servo is moves so good in this video :frowning:

EDIT:
I think i have a power problem. First test was with my arduino as power supply.
The led are flickering a little.
Then i try with an external batterie pack for the servo and now it moves smooth.
I will try to install an big capacitor in the power line for the servo