Download ATmega328P Ardiuno Uno Datasheet (PDF)

atmega328p ardiuno uno datasheet pdf - The Atmel ATmega328P is one member of the Atmel 8-bit microcontroller family. Each member ofthe family has different amounts of RAM, ROM, I/O ports, etc. Depending on the number of externalpins required they may come in packages with more than a hundred pins, or with as few as eight.

The ATmega328P contains the following components:
  • 32kb of FLASH memory for program storage.
  • 2kb of RAM memory.
  • 1kb of EEPROM memory
  • Two 8-bit and one 16-bit timer/counters. These can count internal clock cycles or external events andgenerate an interrupt when reaching a specified count value.
  • 6 channels of 10-bit analog-to-digital converter (ADC).
  • Serial communications port. This can be used to communicate to the COM port of a computer.
  • I2C interface port for communication with other I2C compatible ICs
  • 21 lines of general purpose I/O.

Not all of these functions are available at the same time. Most of the pins on the chip are connectedto multiple functional units and it is up to the programmer to decide what a particular pin does. Forexample, a pin might be used as a general purpose I/O line, or it might be ADC input, but it can’t be bothsimultaneously.

I2C Interface

The ATmega328P has the ability to communicate to other IC’s using the IIC or I2C serial interface.

This isa two line bi-directional interface designed for medium speed communications between ICs on a board. Oneline is the clock, the other is for data.

Numerous ICs are available on the market that have I2C interfacesuch as EEPROMs, temperature sensors, real-time-clocks, RAM, etc.

On the 328P, the I2C interface is available on pins 27 and 28. These pins are shared with both the ADCfunction and by Port C (PC4 and PC5).

If the I2C interface is enabled then any other function on thosepins is not available.If the pins mentioned above are not available for use, it is still possible to implement an I2C interfaceby using software to perform all the I2C transactions.

Several I2C libraries are available from Internet sites, most of which will probably have to be modified to work with the 328P.

SPI Programming Interface

In order to program the ATmega328P a project board needs to have a six-pin header on the board with connections to power, ground, reset and PB3, PB4 and PB5.

This six-pinheader mates with the connector on the AVRISP mkII programming modules provided in the lab.
When mounting the header on your board make sure to leave some room around it for the connector to mate withit.

The cable to the connector comes in from the side where the power and ground pins are located so it’s best to leave extra space on this side of the connector for the cable.

ATmega328P Reset Sources

The Atmel ATmega328P has four sources of reset:
  • Power-on reset. The MCU is reset when the supply voltage is below the power-on reset threshold (VPOT).
  • External reset. The MCU is reset when a low level is present on the RESET pin for longer than the minimum pulse length.
  • Watchdog system reset. The MCU is reset when the watchdog timer period expires and the watchdog system reset mode is enabled.
  • Brown-out reset. The MCU is reset when the supply voltage VCC is below the brown-out reset threshold (VBOT) and the brown-out detector is enabled

Reset Logic

ATmega328P reset logic

ATmega328P I/O Memory

All ATmega328P I/Os and peripherals are placed in the I/O space. All I/O locations may be accessed by the LD/LDS/LDD and ST/STS/STD instructions, transferring data between the 32 general purpose working registers and the I/O space.

I/O registers within the address range 0x00 - 0x1F are directly bit-accessible using the SBI and CBI instructions. In these registers, the value of single bits can be checked by using the SBIS and SBIC instructions.

When using the I/O specific commands IN and OUT, the I/O addresses 0x00 - 0x3F must be used. When addressing I/O registers as data space using LD and ST instructions, 0x20 must be added to these addresses.

The ATmega328P is a complex microcontroller with more peripheral units than can be supported within the 64 location reserved in opcode for the IN and OUT instructions.

For the extended I/O space from 0x60 - 0xFF in SRAM, only the ST/STS/STD and LD/LDS/LDD instructions can be used. For compatibility with future devices, reserved bits should be written to zero if accessed.

Reserved I/O memory addresses should never be written. Some of the status flags are cleared by writing a logical one to them. Note that, unlike most other AVR, the CBI and SBI instructions will only operate on the specified bit, and can therefore be used on registers containing such status flags. The CBI and SBI instructions work with registers 0x00 to 0x1F only.

Overview of the ATMega328P Processor

This provides an overview of the ATMega328P micro controller's pins, ports and parts.



You can download ATmega328P Ardiuno Uno datasheet (PDF) here.

Comments