Hi, so I have an ATMega 328PB that has an external 8Mhz oscillator. But I want to configure it using the prescaler so I can run it at 4Mhz so I can run the microprocessor at lower voltages such at 1.8v
(https://ww1.microchip.com/downloads/en/DeviceDoc/40001906C.pdf)
Does anyone know how I do this? Can it be done via the platformio.ini file or does it need to be done in the actual sketch code?
This is what I currently have in my platformio.ini
file
[env]
platform = atmelavr
board = ATmega328PB
framework = arduino
board_hardware.oscillator = External ; Oscillator type
board_build.f_cpu = 8000000L
board_hardware.bod = disabled ; Set brown-out detection
board_hardware.eesave = yes ; Preserve EEPROM when uploading using programmer
build_unflags = -flto
board_hardware.uart = uart0 ; Set UART to use for serial upload
board_upload.speed = 57600
monitor_speed = 115200
upload_flags =
-P$UPLOAD_PORT