boards/atmega328p: Fixed doc

- Use proper IEC units for sizes
- Added info on EEPROM
- Fixed incorrect info on default fuse settings
- Added info on how to unlock 8MHz
This commit is contained in:
Marian Buschsieweke 2019-11-18 00:16:43 +01:00
parent 61c6b071b2
commit f4089d08fe
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F

View File

@ -19,12 +19,13 @@ any external components at a supply voltage anywhere between 2.7V and 5.5V.
### MCU ### MCU
| MCU | ATmega328p | | MCU | ATmega328p |
|:------------- |:-------------------------------------- | |:------------- |:--------------------------------------------- |
| Family | AVR/ATmega | | Family | AVR/ATmega |
| Vendor | Microchip (previously Atmel) | | Vendor | Microchip (previously Atmel) |
| RAM | 2Kb | | RAM | 2KiB |
| Flash | 32Kb | | Flash | 32KiB |
| Frequency | 8MHz (up to 20MHz with external clock) | | EEPROM | 1KiB |
| Frequency | 1MHz/8MHz (up to 20MHz with external clock) |
| Timers | 3 (2x 8bit, 1x 16bit) | | Timers | 3 (2x 8bit, 1x 16bit) |
| ADCs | 6 analog input pins | | ADCs | 6 analog input pins |
| UARTs | 1 | | UARTs | 1 |
@ -44,18 +45,24 @@ All credit for above pinout image goes to https://github.com/MCUdude/MiniCore#pi
The ATmega328p has two internal oscillators clocked at 8MHz and at 128kHz that The ATmega328p has two internal oscillators clocked at 8MHz and at 128kHz that
allow it to be operated without any external clock source or crystal. By default allow it to be operated without any external clock source or crystal. By default
the fuses are configured to use the internal 8MHz oscillator resulting in a the fuses are configured to use the internal 8MHz oscillator and a clock divider
clock speed of 8MHz. By setting the `CKDIV8` fuse the clock divider can be resulting in a clock speed of 1MHz. By clearing the `CKDIV8` fuse the clock
enabled to operate the ATmega328p at 1MHz. divider can be disabled to operate the ATmega328p at 8MHz without an external
clock source. This can be done like this:
avrdude -c usbtiny -p m328p -B 32 -U lfuse:w:0xe2:m
(Replace `usbtiny` with the ISP programmer you are using. The `-B 32` might
be needed on some ISP programmers to communicate with slow ATmega MCUs. It will
not be needed anymore after the clock device has been disabled.)
This "board" is configured to use 8MHz as core clock, so that the ATmega328p This "board" is configured to use 8MHz as core clock, so that the ATmega328p
can be used without external circuitry and without any changes in the default runs at the highest frequency possible without external clock sources.
fuse configuration.
By setting the environment variable `ATMEGA328P_CLOCK` to a custom frequency in By setting the environment variable `ATMEGA328P_CLOCK` to a custom frequency in
Hz (e.g. `1000000` for 1MHz), this core clock can be changed easily. Refer to Hz (e.g. `1000000` for 1MHz), this core clock can be changed easily. Refer to
the datasheet on how to configure the ATmega328p to use an external crystal, the datasheet on how to configure the ATmega328p to use an external crystal,
an external clock source or the clockd divider. an external clock source or the clock divider.
### Relation Between Supply Voltage, Clock Frequency and Power Consumption ### Relation Between Supply Voltage, Clock Frequency and Power Consumption