Hi, I’m new to platformio. I’m writing code for ATmega32 and using usbasp to upload code. I have a MCU on my board without external clock generator. I wrote a simple code to blink led on PB1. But for some reason instead of 1 second period, 8 seconds pass. I changed clock to 1 MHz and blink period became 1 second. Do I need 16 MHz crystal or do I need to change something in config file?
[env:ATmega32]
platform = atmelavr
board = ATmega32
framework = arduino
upload_protocol = usbasp
board_build.f_cpu = 8000000L
#include <Arduino.h>
#define led PB1
// put function declarations here:
void setup() {
// put your setup code here, to run once:
pinMode(led, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(led, 1); delay(1000);
digitalWrite(led, 0); delay(1000);
}