In reading up the Atmega328 specs, it talks a fair bit about clocking on PB6 & 7. All the Uno schematics I’ve seen use and external crystal into PB6/7 but I’m not sure that’s necessary.
From the Specs: “The device is shipped with internal RC oscillator at 8.0MHz and with the fuse CKDIV8 programmed, resulting in 1.0MHz system clock. The startup time is set to maximum and time-out period enabled. (CKSEL = “0010”, SUT = “10”, CKDIV8 = “0”). The default setting ensures that all users can make their desired clock source setting using any available programming interface.”
The atmega can run off an internal oscillator - no problem
Precise timing from a crystal is useful if you intend to use UART - which has stricter timing requirements than the oscillator can provide (at higher baudrates).
Put simply, if you want to use UART at > 9600baud then you’ll likely need an external crystal. Otherwise you’re good to go!
Atmega328P definitely works with internal RC oscillator.
Can confirm from personal experience. Once tried to make a clock with minimal number of components. Could never get it as accurate as a bedside clock, but it did work.
I used the ICSP interface to load programs, if I remember right.
The bootloader needs to be changed if you change from the standard 16MHz crystal.
If you need more GPIO pins you could try the Atmega32U4 or an Atmega 2560 board.
Really depends on what you want to do and what facilities you have access to.
There are a number of boards with the Atmega32U4 that may work for you.
I finished the schematic and the number of IO pins worked out such that I can leave the crystal in place. I ended up using an LM324 to do some of the error detection I built in. I used MultiSim to do some simulation which is a pretty handy tool.
3 Likes
And you can get our latest projects and tips straight away by following us on: