The ATtiny15 Processor
For many simple digital applications, a small microprocessor is a better choice than discrete logic, for it is able to execute software. It is therefore able to perform certain tasks with much less hardware complexity. I’ll show you just how easy it is to produce a small, embedded computer for integration into a larger system, using an ATMEL ATtiny15 AVR processor. This processor has 512 words of flash for program storage and no RAM! (Think on that when next you have to install some 100-megabyte application on your desktop computer!) This tiny processor, unlike its bigger AVR siblings, relies solely on its 32 registers for working-variable storage.
Since there is no RAM in which to allocate stack space, the ATtiny15
instead uses a dedicated hardware stack that is a mere
three entries deep, and this is shared by
subroutine calls and interrupts. (That fourth nested function call is
a killer!) The program counter is 9-bits wide (addressing 512 words
of program space); therefore, the stack is also 9-bits wide. Also
unlike the bigger AVRs, only two of the registers
(r30
and r31
) may be coupled as
a 16-bit index register (called Z
).
The processor also has 64 bytes of EEPROM (for holding system parameters), up to five general-purpose I/O pins, eight internal and external interrupt sources, two 8-bit timer/counters, a four-channel 10-bit analog-to-digital converter, and an analog comparator and is able to be reprogrammed in-circuit. It comes in a tiny 8-pin package, ...
Get Designing Embedded Hardware now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.