Atmel ATmega88PA manual

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

Go to page of

A good user manual

The rules should oblige the seller to give the purchaser an operating instrucion of Atmel ATmega88PA, along with an item. The lack of an instruction or false information given to customer shall constitute grounds to apply for a complaint because of nonconformity of goods with the contract. In accordance with the law, a customer can receive an instruction in non-paper form; lately graphic and electronic forms of the manuals, as well as instructional videos have been majorly used. A necessary precondition for this is the unmistakable, legible character of an instruction.

What is an instruction?

The term originates from the Latin word „instructio”, which means organizing. Therefore, in an instruction of Atmel ATmega88PA one could find a process description. An instruction's purpose is to teach, to ease the start-up and an item's use or performance of certain activities. An instruction is a compilation of information about an item/a service, it is a clue.

Unfortunately, only a few customers devote their time to read an instruction of Atmel ATmega88PA. A good user manual introduces us to a number of additional functionalities of the purchased item, and also helps us to avoid the formation of most of the defects.

What should a perfect user manual contain?

First and foremost, an user manual of Atmel ATmega88PA should contain:
- informations concerning technical data of Atmel ATmega88PA
- name of the manufacturer and a year of construction of the Atmel ATmega88PA item
- rules of operation, control and maintenance of the Atmel ATmega88PA item
- safety signs and mark certificates which confirm compatibility with appropriate standards

Why don't we read the manuals?

Usually it results from the lack of time and certainty about functionalities of purchased items. Unfortunately, networking and start-up of Atmel ATmega88PA alone are not enough. An instruction contains a number of clues concerning respective functionalities, safety rules, maintenance methods (what means should be used), eventual defects of Atmel ATmega88PA, and methods of problem resolution. Eventually, when one still can't find the answer to his problems, he will be directed to the Atmel service. Lately animated manuals and instructional videos are quite popular among customers. These kinds of user manuals are effective; they assure that a customer will familiarize himself with the whole material, and won't skip complicated, technical information of Atmel ATmega88PA.

Why one should read the manuals?

It is mostly in the manuals where we will find the details concerning construction and possibility of the Atmel ATmega88PA item, and its use of respective accessory, as well as information concerning all the functions and facilities.

After a successful purchase of an item one should find a moment and get to know with every part of an instruction. Currently the manuals are carefully prearranged and translated, so they could be fully understood by its users. The manuals will serve as an informational aid.

Table of contents for the manual

  • Page 1

    Features • High Pe rf ormance, Low P ower A VR ® 8-Bit Microcontr oller • Adv anced RISC Architecture – 131 P o we rf ul Instructions – Most Sin gle Clock Cy c le Execu tio n – 32 x 8 General Purpose W orking Registers – Fully Stati c Operation – Up to 20 MIPS Thro ug hp ut at 20 MHz – On-chip 2-c ycle Multi plier • High Enduranc[...]

  • Page 2

    2 8161AS–AVR–11/08 ATmega88PA 1. Pin Configurations Figure 1-1. Pinout ATmega88 PA 1 2 3 4 5 6 7 8 24 23 22 21 20 19 18 17 (PCINT19/OC2B/INT1) PD3 (PCINT20/XCK/T0) PD4 GND VCC GND VCC (PCINT6/XT AL1/TOSC1) PB6 (PCINT7/XT AL2/TOSC2) PB7 PC1 (ADC1/PCINT9) PC0 (ADC0/PCINT8) ADC7 GND AREF ADC6 AV C C PB5 (SCK/PCINT5) 32 31 30 29 28 27 26 25 9 10 11[...]

  • Page 3

    3 8161AS–AVR–11/08 ATmega88PA 1.1 Pin Descriptions 1.1.1 VCC Digital supply voltage. 1.1.2 GND Ground. 1.1.3 P ort B (PB7:0) XT AL1/XT AL2/T OSC1/T OSC2 Port B is an 8-bit bi-directional I/O port with internal pull-up resist ors (selected for each bit) . The Port B output buffers have symmetrical drive characteristics with both high sink and so[...]

  • Page 4

    4 8161AS–AVR–11/08 ATmega88PA The various sp ecial features of Port D ar e elaborated in ” Alternate Functi ons of Port D” o n page 80 . 1.1.7 AV CC AV CC is the supply volta ge pin for the A/D Conver ter, PC3 :0, and ADC7:6. It should be extern ally connected to V CC , even if the ADC is not u sed. If the ADC is used, it should be conne ct[...]

  • Page 5

    5 8161AS–AVR–11/08 ATmega88PA 2. Overview The ATmega88PA is a low-power CM OS 8-bit microcontroller based on the AVR enhanced RISC architecture. By executing powerful inst ru ctions in a single clock cycle, the ATmega88PA achieves throughputs approaching 1 MIPS per MHz allowing the system designer to optimize power consumption versus proc essin[...]

  • Page 6

    6 8161AS–AVR–11/08 ATmega88PA architecture is more code efficient while achiev ing throughputs up to ten times faster than con- ventional CISC microcontrollers. The ATmega88PA provides the following feat ures : 8K bytes of In-System Programmable Flash with Read-While-Write capabilities, 512 bytes EEPROM, 1K bytes SRAM, 23 general purpose I/O li[...]

  • Page 7

    7 8161AS–AVR–11/08 ATmega88PA 5. Register Summary Address Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Pa ge (0xFF) Reserved – – – – – – – – (0xFE) Reserved – – – – – – – – (0xFD) Reserved – – – – – – – – (0xFC) Reserved – – – – – – – – (0xFB) Reserved – – – – – ?[...]

  • Page 8

    8 8161AS–AVR–11/08 ATmega88PA (0xC1) UCSR0B RXCIE0 TXCIE0 UDRIE0 RXEN0 TXEN0 UCSZ02 RXB80 TXB80 188 (0xC0) UCSR0A RXC 0 TXC0 UDRE0 FE0 DOR0 UPE0 U2X0 MPCM0 187 (0xBF) Reserved – – – – – – – – (0xBE) Reserved – – – – – – – – (0xBD) TWAMR TWAM6 TWAM5 TWAM4 TWAM3 TWAM2 TWAM1 TWAM0 –2 3 7 (0xBC) TWCR TWINT TWEA TWS[...]

  • Page 9

    9 8161AS–AVR–11/08 ATmega88PA (0x7F) DIDR1 – – – – – –A I N 1 D A I N 0 D 2 4 2 (0x7E) DIDR0 – – ADC5D ADC4D ADC3D ADC2D ADC1D ADC0 D 259 (0x7D) Reserved – – – – – – – – (0x7C) ADMUX REFS1 REFS0 ADLAR – MUX3 MUX2 MUX1 MUX0 255 (0x7B) ADCSRB –A C M E – – – ADTS2 AD TS1 ADTS0 258 (0x7A) ADCSRA ADEN ADSC A[...]

  • Page 10

    10 8161AS–AVR–11/08 ATmega88PA Note: 1. F or compatibili ty with fu ture devices, reserved bits s hould be written to zero if accessed. Reser ved I/O memor y addresse s should nev er be written. 2. I/O Registers within the address range 0x00 - 0x1F are directly bit-accessible using the SBI and CBI instructions. In these registers, the v alue of[...]

  • Page 11

    11 8161AS–AVR–11/08 ATmega88PA NEG Rd Two’s Complement Rd ← 0x00 − Rd Z,C,N,V,H 1 SBR Rd,K Set Bit(s) in Reg ister Rd ← Rd v K Z,N,V 1 CBR Rd,K Clear Bit(s) in Register Rd ← Rd • (0xFF - K) Z,N,V 1 INC Rd Increment Rd ← Rd + 1 Z,N,V 1 DEC Rd Decrement Rd ← Rd − 1 Z,N,V 1 TST Rd Test for Zero or Minus Rd ← Rd • Rd Z,N,V 1 C[...]

  • Page 12

    12 8161AS–AVR–11/08 ATmega88PA SEZ Set Zero Flag Z ← 1Z 1 CLZ Clear Ze ro Flag Z ← 0 Z 1 SEI Global Interrupt Enable I ← 1I 1 CLI Global Interrupt Disable I ← 0 I 1 SES Set Signed Test Fl ag S ← 1S 1 CLS Clear Signed Te st Flag S ← 0 S 1 SEV Set Twos Compleme nt Overflow. V ← 1V 1 CLV Clear Twos Complem ent Overflow V ← 0 V 1 SE[...]

  • Page 13

    13 8161AS–AVR–11/08 ATmega88PA 7. Or dering Information 7.1 A Tmega88P A Note: 1. This device can also be supplied in wafer f orm. Pl ease contact your local Atmel sales office for detailed order ing infor mati on and minimum quantities. 2. Pb-free packaging complies to the Eu ropean Directive f or Re strictio n of Ha zardous Substa nces (RoHS [...]

  • Page 14

    14 8161AS–AVR–11/08 ATmega88PA 8. P ac kaging Inf ormation 8.1 32A 2325 Orchard P arkway San Jose, CA 95131 TITLE DRA WING NO . R REV . 32A, 32-lead, 7 x 7 mm Body Size, 1.0 mm Body Thickness, 0.8 mm Lead Pitch, Thin Profile Plastic Quad Flat Package (TQFP) B 32A 10/5/2001 PIN 1 IDENTIFIER 0˚~7˚ PIN 1 L C A1 A2 A D1 D e E1 E B Notes: 1. This [...]

  • Page 15

    15 8161AS–AVR–11/08 ATmega88PA 8.2 28M1 TITLE DRA WING NO . GPC REV . Pac k a g e Drawin g Contact: p a ck a gedr a wing s @ a tmel.com 2 8 M1 ZBV B 2 8 M1, 28-pad , 4 x 4 x 1.0 mm Body , Lead Pitch 0.45 mm, 2.4 x 2.4 mm Exposed Pad , Thermally Enhanced Plastic Very Thin Quad Flat No Lead P ackage ( VQFN) 10/24/0 8 S IDE VIEW Pin 1 ID BO TTOM V[...]

  • Page 16

    16 8161AS–AVR–11/08 ATmega88PA 8.3 32M1-A 2 3 25 Orch a rd P a rkw a y Sa n Jo s e, CA 951 3 1 TITLE DRA WING NO . R REV . 3 2M1-A , 3 2-p a d, 5 x 5 x 1.0 mm Body , Le a d Pitch 0.50 mm, E 3 2M1-A 5/25/06 3 .10 mm Expo s ed P a d, Micro Le a d F r a me P a ck a ge (MLF) COMMON DIMEN S ION S (Unit of Me asu re = mm) S YMBOL MIN NOM MAX NO TE D1[...]

  • Page 17

    17 8161AS–AVR–11/08 ATmega88PA 8.4 28P3 2325 Orchard P arkway San Jose, CA 95131 TITLE DRA WING NO . R REV . 28P3 , 28-lead (0.300"/7.62 mm Wide) Plastic Dual Inline Package (PDIP) B 28P3 09/28/01 PIN 1 E1 A1 B REF E B1 C L SEA TING PLANE A 0º ~ 15º D e eB B2 (4 PLACES) COMMON DIMENSIONS (Unit of Measure = mm) SYMBOL MIN NOM MAX NOTE A ?[...]

  • Page 18

    18 8161AS–AVR–11/08 ATmega88PA 9. Errata 9.1 Errata A Tmega88P A The revision letter in t his sect ion refers to the revision of the ATmega88PA device. 9.1.1 Rev . F No known errata.[...]

  • Page 19

    19 8161AS–AVR–11/08 ATmega88PA 10. Datasheet Re vision History Please note that the referring page numbers in this se ction are referred to this documen t. The referring re visio n in th is section are referring to the document revision. 10.1 Rev . 8161A – 11/08 1. Initial revision (Based on the A Tmega4 8P /88P/168P/328P datashee t 8025F-A V[...]

  • Page 20

    8161AS–AVR–11/0 8 Headquar ters International Atmel Corporation 2325 Orchard Parkway San Jose, CA 95131 USA Tel: 1(408) 441-0311 Fax: 1(408) 487-2600 Atmel Asia Unit 1-5 & 16, 19/F BEA Tower, Millennium City 5 418 Kwun Tong Road Kwun Tong, Kowloon Hong Kong Tel: (852) 2245-6100 Fax: (852) 2722-1369 Atmel Europe Le Krebs 8, Rue Jean-Pierre T[...]