4 ms·
Many microcontrollers (PIC, STM32, atmega8 etc) include an internal RC oscillator - which is literally inside the chip itself. Zero external components required
by michaelt 6y ago
Many microcontrollers (PIC, STM32, atmega8 etc) include an internal RC oscillator - which is literally inside the chip itself. Zero external components required.
Not only do you save the costs of using a crystal, you also save two pins - which was useful in the days of 8-pin microcontrollers like the ATtiny85.
As internal RC oscillator drift rates can be as much as 10% (and vary with temperature) they're not precise enough to run a serial connection, let alone a USB connection. That's why products like Arduino tend to go directly to using a proper crystal (which gives you a 0.01% drift rate for a few pennies).
- xxpor 6y agoI know next to nothing about microcontrollers, so this might be a dumb question, but how do they do the initial flashing is they can't run a serial port? Are they hooked up to something external before going on the final PCB? Do they not need a precise clock to read the onboard program from whatever's storing it?
- michaelt 6y agoEven if you've got a really inaccurate clock, you can still accept synchronous protocols like SPI and I2C where the bus master provides a clock signal. Every chip brand would have their own protocol and provide their own programming hardware that could speak it.