mikromedia for ATMEGA User Manual

mikromedia for ATMEGA User Manual

user's guide to mikro me ia board for ATmega

Compact development system rich with on-board peripherals for all-round multimedia development on ATmega1280 device

TO OUR VALUED CUSTOMERS

I want to express my thanks to you for being interested in our products and for having confidence in Mikroelektronika.

The primary aim of our company is to design and produce high quality electronic products and to constantly improve the performance thereof in order to better suit your needs.

Nebojsa Matic

General Manager

The ATMEGA and Windows® logos and product names are trademarks of ATMEL® and Microsoft® in the U.S.A. and other countries.

Page 3

Table of Contents

Introduction to mikromedia for ATmega

Package Contains

Key Features

System Specification

1. Power supply

2. ATmega1280 microcontroller

Key microcontroller features

3. Programming the microcontroller

Programming with mikroBootloader

Identifying COM port step 1 – Choosing COM port step 2 – Establishing connection step 3 – Browse for .hex file step 4 – Select .hex file step 4 – Uploading .hex file step 6 – Progress bar step 5 – Finish upload

15

16

16

17

17

12

14

14

15

8

10

10

11

6

7

4

5

Programing with exernal programmer

4. Reset buttons

5. Crystal oscillator

6. microSD Card Slot

7. Touch Screen

8. Audio Module

9. USB UART communication

10. Accelerometer

11. Flash Memory

12. Pads

13. Pinout

14. Dimensions

15. Mikromedia accessories

What’s next

Page 3

31

32

33

34

35

36

24

26

28

30

16

20

22

23

Introduction to mikromedia for ATmega

The

mikromedia for ATmega

is a compact development system with lots of on-board peripherals which allow development of devices with multimedia contents. The central part of the system is the 8-bit

ATmega1280

microcontroller. The mikromedia for ATmega features integrated modules such as stereo MP3 codec,

TFT

320x240 touch screen

display, accelerometer,

USB connector, audio connector, MMC/SD card slot, 8 Mbit flash memory, 2x26 connection pads and other. It comes pre-programmed with USB-

UART bootloader, but can also be programmed with external

AVR JTAGICE mkII

. Mikromedia is compact and slim, and perfectly fits in the palm of the hand, which makes it convenient platform for mobile devices.

Page 4 Page 5

Page 4

Package Contains

01

Damage resistant protective box

02 mikromedia for ATmega development system

20122011 www.mikroe.com

Copyright ©2011 Mikroelektronika.

All rights reserved. Mikroelektronika, Mikroelektronika logo and other

Mikroelektronika trademarks are the property of Mikroelektronika.

All other tradmarks are the property of their respective owners.

Unauthorised copying, hiring, renting, public performance and broadcasting of this DVD prohibited.

03

DVD with documentation and examples

04 mikromedia for ATmega user’s guide

05 mikromedia for ATmega schematic

Page 5

06

USB cable

Key Features

10

11

12

13

14

15

05

06

07

08

09

01

02

03

04

18

Connection Pads

TFT 320x240 display

USB MINI-B connector

CHARGE indication LED (RED)

Li-Polymer battery connector

3.5mm headphone connector

Power supply regulator

USB-UART IC

8MHz crystal oscillator

RESET button

VS1053 stereo audio codec

12.288MHz crystal oscillator

Atmel AVR ATmega 1280 device

Accelerometer

Serial 8Mbit Flash memory microSD Card Slot

JTAG programmer connector

Power indication LED (GREEN)

01

02

Page 6

10

Page 7

Page 6

03

04

05

08

07

09

10

13

14

11

12

06

15

16

17

18

Page 7

System Specification

power supply

Over a USB cable (5V DC)

power consumption

68 mA with erased MCU

(when on-board modules are inactive)

board dimensions

8 x 6 cm (3.14 x 2.36 inch)

weight

~46 g (0.10 lbs)

1. Power supply

Figure 1-1: Connecting

USB power supply

1. USB power supply

You can apply power supply to the board using

MINI-B USB

cable provided with the board. On-board voltage regulators will make sure that are avaibale the appropriate voltage levels to each part of the board.

Power LED (GREEN)

will indicate the presence of power supply.

2. Battery power supply

You can also power the board using

Li-Polymer

battery, via on-board battery connector. On-board battery charger circuit

MCP73832

enables you to charge the battery over USB connection.

CHARGE LED (RED)

will indicate battery charging. Led is off when battery is full. Charging current is ~250mA and charging voltage is 4.2V DC.

Figure 1-2: Connecting Li-Polymer battery

Page 8 Page 9

Page 8

VCC-SYS VCC-USB

PMEG3010ER

D1

FP2

FERRITE

C28

10nF

3

4

1

2

5

CN3

VBUS

D-

D+

ID

GND

USB MINIB VCC-BAT

+

-

M1

DMP2160UW

CN1

BATT CONN

R43

10K

VSENSE

VCC-BAT

R6

4K7

R49

4K7

R34

4K7

Figure 1-3: Power supply schematics

STAT

VCC-3.3

VCC-3.3

R39

4K7

R35

10K

LD2

CHARGE

VCC-3.3

R36

10K

Q4

BC846

Q5

BC846

R37

10K

VCC-3.3

C29

E10

VCC-1.8

VCC-1.8

2.2uF

U3

1

2

3

Vin

GND

EN

AP7331-ADJ

Vout

ADJ

10uF

5

4

R47

120K

R46

22K

R50

12K1

E5

R38

10K

10uF

VCC-3.3

VCC-BAT

E7

R45

1K

VCC-SYS

1

2

3

10uF

U5

STAT

VSS

VBAT

MCP73832

PROG

VDD

5

4

Charging Current approx. 250mA

C40

2.2uF

R44

3K9

LD1

POWER

Page 9

39

40

41

42

35

36

37

38

31

32

33

34

27

28

29

30

47

48

49

50

43

44

45

46

51

52

HDR2

M1X26

VCC-3.3

VCC-3.3

VCC-SYS

HDR1

M1X26

13

14

15

16

9

10

11

12

7

8

5

6

3

4

1

2

21

22

23

24

17

18

19

20

25

26

R26

2K2

E3

10uF

VCC-SYS VCC-3.3

1

3

E4

10uF

REG1

Vin

Vout

GND

LD29080DT33

2

2. ATmega1280 microcontroller

The mikromedia for ATmega development board comes with the

AVR ATmega1280

microcontroller. This high-performance

8-bit

microcontroller with its integrated modules and in combination with other on-board modules is ideal for multimedia applications.

Key microcontroller features

- Up to

16 MIPS

Operation;

- 8-bit architecture;

- 128KB of Flash memory;

- 8KB of SRAM memory;

- 4KB of EEPROM

- 86 I/O pins;

- UART, SPI, TWI;

- ADC, Analog Comparator;

- JTAG programming interface, etc.

PORTS (A, B, C, D, E, F, G, H, I, J, K, L)

Watchdog timer

JTAG

Analog

Comparator

ADC

TIMERS

TWI

SPI

FLASH

XRAM

EEPROM

SRAM

USART0

USART1

USART2

USART3

Page 10 Page 11

Page 10

3. Programming the microcontroller

Figure 3-1:

ATmega1280 microcontroller

Page 11

The microcontroller can be programmed in two ways:

01

Via USB-UART mikroBootloader

02

Using external

AVR JTAGICE mkII

programmer

Programming with mikroBootloader mikroBootloader software

You can program the microcontroller with UART bootloader which is preprogrammed into the device by default. To transfer

.hex file from a PC to MCU you need bootloader software

(

mikroBootloader

) which can be downloaded from:

http://www.mikroe.com/eng/downloads/get/1822/ mikrobootloader_atmega1280_v210.zip

After software is downloaded unzip it to desired location and start mikroBootloader software.

Page 12

Figure 3-2: mikroBootloader window

01

When you start mikroBootloader software, a window shown on Figure 3-2 should appear.

Page 13

Page 12

NOTE:

Connect mikromedia for ATmega with a PC before starting mikroBootloader software

Page 13

Identifying device COM port step 1 – Choosing COM port

01

02

03

01

Figure 3-3: Identifying COM port

01

In Device Manager you can see which COM port is assigned to mikromedia (in this case COM32)

Figure 3-4: Selecting COM port

Page 14

01

Click the

Change Settings

button

02

From drop down list

select COM port

which is used for communication with a PC (in this case COM32)

03

Click

OK

button

Page 15

Page 14

step 2 – Establishing connection step 3 – Browse for .hex file

01

01

Figure 3-5: Connecting mikromedia with mikroBootloader

01

Reset mikromedia board and within 5s click the

Connect button.

If connected, caption on a button will be changed to “Disconnect”.

NOTE:

Baud Rate is set to 56000bps by default

Page 15

Figure 3-6: Browsing for .hex file

01

Click the

Browse for HEX

button and from pop-up window (figure 3-5) select .hex file which will be uploaded to MCU memory

step 4 – Select .hex file step 5 – Uploading .hex file

Figure 3-7: Selecting HEX

01

02

Select a .hex file via open dialog window

Click the

Open button

01

02

01

Page 16

Figure 3-8: Begin uploading

01

To start .hex file uploading click the

Begin uploading button

Page 17

Page 16

step 6 – Progress bar step 7 – Finish upload

01

Figure 3-9: Progress bar

01

You can monitor .hex file uploading via progress bar

Page 17

Figure 3-10: Restarting MCU

01

Click the

OK

button after uploading is finished.

Reset MCU

and your mikromedia will start with new firmware.

Programing with external programmer

The microcontroller can be programmed with an external programmer (AVR JTAGICE mkII or other supported programer with

JTAG

interface). The external programmer is connected to the development system via pads marked with

JTAG

, Figure 3-11. In order to connect the external programmer to the development system, it is necessary to solder the 2x5 male headers provided with the product to

JTAG

pads

NOTE:

If bootloader program is accidently erased you can upload it again via AVR

JTAGICE mkII programmer. Program mikroMedia for ATmega Bootloader Firmware.hex

can be found under Firmware folder (page 12)

Page 18

Figure 3-11: mikroProg

JTAG connector

Page 19

Page 18

AVCC

PG5

PE0/RXD0

PE1/TXD0

PE2/XCK0

PE3/OC3A

PE4/INT4

PE5/INT5

PE6/INT6

PE7/INT7

VCC

GND

PH0/RXD2

PH1/TXD2

PH2/XCK2

PH3/OC4A

PH4/OC4B

PH5/OC4C

PH6/OC2B

PB0/PCINT0

PB1/SCK

PB2/MOSI

PB3/MISO

PB4/OC2A

PB5/OC1A

PB6/OC1B

9

10

11

12

13

14

15

16

17

5

6

3

4

7

8

1

2

18

19

20

21

22

23

24

25

78 77

U1

ATmega1280

100pin TQFP

38 39 40 41 42 43 44 45

PD2/RXD1 PD3/TXD1

AD3/PA3

AD4/PA4

AD5/PA5

AD6/PA6

AD7/PA7

ALE/PG2

PCINT15/PJ6

PCINT14/PJ5

PCINT13/PJ4

PCINT12/PJ3

XCK3/PJ2

TXD3/PJ1

RXD3/PJ0

GND

VCC

A15/PC7

A14/PC6

A13/PC5

A12/PC4

A11/PC3

A10/PC2

A9/PC1

A8/PC0

PG1

PG0

PD6/T1 PD7/T0

48 49

63

62

61

60

59

67

66

65

64

75

74

73

72

71

70

69

68

54

53

52

51

58

57

56

55

VCC-3.3

VCC-3.3

TCK

TDO

TMS

TDI

RESET#

5

7

1

3

9

CN5

JTAG

2

4

6

8

10

VCC-3.3

Figure 3-12: JTAG programmer connection schematics

Page 19

4. Reset Buttons

Board is equipped with two reset buttons. First is located at the back side of the board (Figure 4-1), and second one is at the top of front side (Figure 4-2).

If you want to reset the circuit, press either of two buttons. It will generate low voltage level on microcontroller reset pin (input). In addition, a reset can be externally provided through pin 27 on side headers (Figure 4-3).

Figure 4-1: Reset button located at the backside of the board

Page 20

Figure 4-2: Frontal reset button

Page 21

Page 20

AVCC

PG5

PE0/RXD0

PE1/TXD0

PE2/XCK0

PE3/OC3A

PE4/INT4

PE5/INT5

PE6/INT6

PE7/INT7

VCC

GND

PH0/RXD2

PH1/TXD2

PH2/XCK2

PH3/OC4A

PH4/OC4B

PH5/OC4C

PH6/OC2B

PB0/PCINT0

PB1/SCK

PB2/MOSI

PB3/MISO

PB4/OC2A

PB5/OC1A

PB6/OC1B

19

20

21

22

23

24

25

13

14

15

16

17

18

5

6

3

4

1

2

10

11

12

7

8

9

R7

100

VCC-3.3

VCC-3.3

R8

10K

X1 8MHz

C2

22pF

78 77

U1

ATmega1280

100pin TQFP

38 39 40 41 42 43 44 45

PD2/RXD1 PD3/TXD1

AD3/PA3

AD4/PA4

AD5/PA5

AD6/PA6

AD7/PA7

ALE/PG2

PCINT15/PJ6

PCINT14/PJ5

PCINT13/PJ4

PCINT12/PJ3

XCK3/PJ2

TXD3/PJ1

RXD3/PJ0

GND

VCC

A15/PC7

A14/PC6

A13/PC5

A12/PC4

A11/PC3

A10/PC2

A9/PC1

A8/PC0

PG1

PG0

PD6/T1 PD7/T0

48 49

75

74

73

72

71

67

66

65

64

70

69

68

56

55

54

53

59

58

57

52

51

63

62

61

60

C1

22pF

RST

T2 T1

C3

100nF

VCC-3.3

VCC-3.3 VCC-3.3 VCC-3.3

RST

E8

10uF

C5

100nF

C6

100nF

C7

100nF

VCC-3.3

HDR2

M1X26

39

40

41

42

35

36

37

38

43

44

45

46

31

32

33

34

27

28

29

30

47

48

49

50

51

52

Figure 4-3: Reset circuit schematics

Page 21

5. Crystal oscillator

ATmega1280

is equipped with internal 128kHz RC oscillator that can provide base frequency. Board also contains 8MHz crystal oscillator (

X1

), which is the most optimal because chip is powered by 3.3V supply. Since chip does not have integrated PLL, maximum operating frequency is also 8MHz, which is just enough for your multimedia applications.

AVCC

PG5

PE0/RXD0

PE1/TXD0

PE2/XCK0

PE3/OC3A

PE4/INT4

PE5/INT5

PE6/INT6

PE7/INT7

VCC

GND

PH0/RXD2

PH1/TXD2

PH2/XCK2

PH3/OC4A

PH4/OC4B

PH5/OC4C

PH6/OC2B

PB0/PCINT0

PB1/SCK

PB2/MOSI

PB3/MISO

PB4/OC2A

PB5/OC1A

PB6/OC1B

19

20

21

22

23

24

25

9

10

11

12

13

14

15

16

17

18

5

6

3

4

7

8

1

2

78 77

U1

ATmega1280

100pin TQFP

38 39 40 41 42 43 44 45

PD2/RXD1 PD3/TXD1

AD3/PA3

AD4/PA4

AD5/PA5

AD6/PA6

AD7/PA7

ALE/PG2

PCINT15/PJ6

PCINT14/PJ5

PCINT13/PJ4

PCINT12/PJ3

XCK3/PJ2

TXD3/PJ1

RXD3/PJ0

GND

VCC

A15/PC7

A14/PC6

A13/PC5

A12/PC4

A11/PC3

A10/PC2

A9/PC1

A8/PC0

PG1

PG0

PD6/T1 PD7/T0

48 49

63

62

61

60

67

66

65

64

59

58

57

56

55

54

53

52

51

75

74

73

72

71

70

69

68

VCC-3.3

X1 8MHz

C2

22pF

C1

22pF

Figure 5-2:

Crystal oscillator schematics

Page 22

Figure 5-1:

8MHz crystal oscillator

Page 23

Page 22

6. microSD Card Slot

Board contains

microSD card slot

for using microSD cards in your projects. It enables you to store large amounts of data externally, thus saving microcontroller memory. microSD cards use Serial

Peripheral Interface (

SPI

) for communication with the microcontroller.

AVCC

SCK-PB1

MOSI-PB2

MISO-PB3

R4 27

R5 27

PG5

PE0/RXD0

PE1/TXD0

PE2/XCK0

PE3/OC3A

PE4/INT4

PE5/INT5

PE6/INT6

PE7/INT7

VCC

GND

PH0/RXD2

PH1/TXD2

PH2/XCK2

PH3/OC4A

PH4/OC4B

PH5/OC4C

PH6/OC2B

PB0/PCINT0

PB1/SCK

PB2/MOSI

PB3/MISO

PB4/OC2A

PB5/OC1A

PB6/OC1B

5

6

3

4

1

2

10

11

12

13

14

7

8

9

19

20

21

22

23

24

25

15

16

17

18

78 77

U1

ATmega1280

100pin TQFP

38 39 40 41 42 43 44 45

PD2/RXD1 PD3/TXD1

AD3/PA3

AD4/PA4

AD5/PA5

AD6/PA6

AD7/PA7

ALE/PG2

PCINT15/PJ6

PCINT14/PJ5

PCINT13/PJ4

PCINT12/PJ3

XCK3/PJ2

TXD3/PJ1

RXD3/PJ0

GND

VCC

A15/PC7

A14/PC6

A13/PC5

A12/PC4

A11/PC3

A10/PC2

A9/PC1

A8/PC0

PG1

PG0

PD6/T1 PD7/T0

48 49

75

74

73

72

71

67

66

65

64

70

69

68

56

55

54

53

59

58

57

52

51

63

62

61

60

VCC-3.3

SD-CD#

SD-CS#

Figure 6-1: microSD card slot module connection schematics

VCC-MMC

C38

100nF

FP1

VCC-3.3

E6

10uF

FERRITE

SD-CS#

MOSI-PB2

SCK-PB1

MISO-PB3

SD-CD#

VCC-MMC

VCC-MMC

CN4

R11

10K

R10

10K

R9

10K

R16

27

4

5

1

2

6

7

CD

CS

Din

+3.3V

SCK

GND

Dout

X1 8MHz

C2

22pF

C1

22pF

Page 23

Figure 6-2:

Inserting microSD card

7. Touch Screen

The development system features a

TFT

320x240 display

covered with a

resistive

touch panel. Together they form a functional unit called a

touch screen.

It enables data to be entered and displayed at the same time. The

TFT display is capable of showing data in

262.144

diffe rent

colors

.

Figure 7-1: Touch Screen

Page 24 Page 25

DRIVEA

DRIVEB

LCD-BLED

AVCC VREF

PG5

PE0/RXD0

PE1/TXD0

PE2/XCK0

PE3/OC3A

PE4/INT4

PE5/INT5

PE6/INT6

PE7/INT7

VCC

GND

PH0/RXD2

PH1/TXD2

PH2/XCK2

PH3/OC4A

PH4/OC4B

PH5/OC4C

PH6/OC2B

PB0/PCINT0

PB1/SCK

PB2/MOSI

PB3/MISO

PB4/OC2A

PB5/OC1A

PB6/OC1B

18

19

20

21

22

23

24

25

14

15

16

17

10

11

12

13

1

2

3

4

5

8

9

6

7

ATmega1280

100pin TQFP

38 39 40 41 42 43 44 45

78 77

PD2/RXD1 PD3/TXD1

AD3/PA3

AD4/PA4

AD5/PA5

AD6/PA6

AD7/PA7

ALE/PG2

PCINT15/PJ6

PCINT14/PJ5

PCINT13/PJ4

PCINT12/PJ3

XCK3/PJ2

TXD3/PJ1

RXD3/PJ0

GND

VCC

A15/PC7

A14/PC6

A13/PC5

A12/PC4

A11/PC3

A10/PC2

A9/PC1

A8/PC0

PG1

PG0

PD6/T1 PD7/T0

75

74

73

72

71

66

65

64

63

70

69

68

67

58

57

56

55

54

53

52

51

62

61

60

59

48 49

U1

X1 8MHz

C2

22pF

C1

22pF

VCC-3.3

VREF-1.8

FP3

E11

10uF

FERRITE

VCC-1.8

T-D3

T-D4

T-D5

T-D6

T-D7

LCD-RS

LCD-RST

LCD-CS#

T-D15

T-D14

T-D13

T-D12

T-D11

T-D10

T-D9

T-D8

PMRD

PMWR

LCD-BLED

E13

10uF

VCC-3.3

R3

1K

VCC-SYS

R23

1K

D2

BAT43

VCC-3.3

R15

10K

VCC-1.8

R41

1K

R58

10K

Q10

BC846

Q2

BC846

Q3

BC846

VCC-3.3

R24

10K

R55

10K

VCC-3.3

R25

10K

Q9

BC856

VCC-1.8

R40

12

Q8

BC856

Q1

BC846

LCD-RST

LCD-CS#

LCD-XR

LCD-YU

LCD-XL

T-D15

T-D14

T-D13

T-D12

T-D11

T-D10

T-D9

T-D8

T-D7

T-D6

T-D5

T-D4

T-D3

T-D2

T-D1

T-D0

VCC-SYS

VCC-3.3

LCD-RST

PMRD

PMWR

LCD-RS

LCD-CS#

LCD-XR

LCD-YD

LCD-XL

LCD-YU

TFT1

DB7

DB6

DB5

DB4

DB3

DB2

DB1

DB0

DB15

DB14

DB13

DB12

DB11

DB10

DB9

DB8

SDO

SDI

RD

WR/SCL

RS

CS

FMARK

VCC-IO

LED-K

LED-A1

LED-A2

LED-A3

LED-A4

IM0

IM1

IM2

IM3

RESET

VSYNC

HSYNC

DOTCLK

ENABLE

DB17

DB16

VCC

VCC-I

GND

XR

YD

XL

YU

MI0283QT2

30

31

32

33

34

35

36

37

25

26

27

28

29

21

22

23

24

17

18

19

20

9

10

11

12

13

14

15

16

7

8

5

6

1

2

3

4

42

43

44

45

46

47

38

39

40

41

DRIVEA

VCC-3.3

R14

10K

Q6

BC846

C21

100nF

R42

100K

LCD-YD

DRIVEB

R54

1K

R56

10K

Q7

BC846

C22

100nF

R57

100K

Figure 7-2: Touch Screen connection schematics

Page 25

8. Audio Module

Figure 8-1: on-board VS1053 stereo audio codec mikromedia for ATmega features stereo audio codec

VS1053

. This module enables audio reproduction by using stereo headphones connected to the system via a

3.5mm

connector CN2. All functions of this module are controlled by the microcontroller via Serial

Peripheral Interface (

SPI

).

Page 26 Page 27

Page 26

AVCC

SCK-PB1

MOSI-PB2

MISO-PB3

R4 27

R5 27

PG5

PE0/RXD0

PE1/TXD0

PE2/XCK0

PE3/OC3A

PE4/INT4

PE5/INT5

PE6/INT6

PE7/INT7

VCC

GND

PH0/RXD2

PH1/TXD2

PH2/XCK2

PH3/OC4A

PH4/OC4B

PH5/OC4C

PH6/OC2B

PB0/PCINT0

PB1/SCK

PB2/MOSI

PB3/MISO

PB4/OC2A

PB5/OC1A

PB6/OC1B

5

6

3

4

1

2

10

11

12

13

14

7

8

9

19

20

21

22

23

24

25

15

16

17

18

78 77

U1

ATmega1280

100pin TQFP

38 39 40 41 42 43 44 45

PD2/RXD1 PD3/TXD1

AD3/PA3

AD4/PA4

AD5/PA5

AD6/PA6

AD7/PA7

ALE/PG2

PCINT15/PJ6

PCINT14/PJ5

PCINT13/PJ4

PCINT12/PJ3

XCK3/PJ2

TXD3/PJ1

RXD3/PJ0

GND

VCC

A15/PC7

A14/PC6

A13/PC5

A12/PC4

A11/PC3

A10/PC2

A9/PC1

A8/PC0

PG1

PG0

PD6/T1 PD7/T0

48 49

75

74

73

72

71

67

66

65

64

70

69

68

56

55

54

53

59

58

57

52

51

63

62

61

60

VCC-3.3

X1 8MHz

C2

22pF

C1

22pF

VCC-3.3

C29

E10

VCC-1.8

VCC-1.8

2.2uF

U3

1

2

3

Vin

GND

EN

AP7331-ADJ

Vout

ADJ

10uF

5

4

R47

120K

R46

22K

R50

12K1

VCC-1.8

VCC-1.8

VCC-1.8

VCC-1.8

C4

100nF

VCC-3.3

VCC-3.3

C9

100nF

VCC-3.3

C10

100nF

VCC-3.3

C11

100nF

VCC-3.3

C12

100nF

C23

100nF

C24

100nF

C26

100nF

C27

100nF

VCC-3.3

R19

10K

MP3-CS#

MP3-RST#

R2

10K

R1 1M

X2

12.288MHz

C19

22pF

C20

22pF

MP3-DCS

MP3-CS#

VCC-1.8

U2

19

20

21

22

23

24

13

14

15

16

17

18

XDCS/BSYNC

IOVDD1

VC0

DGND1

XTAL0

XTAL1

IOVDD2

DGND2

DGND3

DGND4

XCS

CVDD2

VS1053

GPIO5 RX TX SC

SI SO CVDD3 XTEST GPIO0 GPIO1 GND GPIO4

28 29 30 31 32 33 34 35 36

LN2

AGND3

LEFT

AVDD2

RCAP

AVDD1

GBUF

AGND2

AGND1

RIGHT

AVDD0

AGND0

44

43

42

41

40

39

38

37

48

47

46

45

VCC-3.3

R33

470

E2 10uF

C18

3.3nF

R

R18

100K

LEFT

R32

470

E1 10uF

C17

3.3nF

L

R17

100K

CN2

LEFT

R28 10

RIGHT

R29 10

GBUF

RIGHT

C13

1uF

R30

20

C15

10nF

R31

20

C16

10nF

R27

10

C14

47nF

PHONEJACK

R20

10K VCC-3.3

R21

10K

R22

27

Figure 8-2: Audio module connection schematics

Page 27

9. USB-UART communication

Figure 9-1: USB-UART communication

Mikromedia contains USB MINI-B connector which is positioned next to the battery connector. FT232RL USB-UART IC enables you to implement

UART serial communication functionality via USB cable, since

ATmega1280

does not support USB protocol. Before connecting the board, make sure that you have FTDI drivers installed on your computer. Rx/Tx LED flashes when USB and controller communicate.

Page 28 Page 29

Page 28

AVCC

USBDET

RX0-MCU

TX0-MCU

PG5

PE0/RXD0

PE1/TXD0

PE2/XCK0

PE3/OC3A

PE4/INT4

PE5/INT5

PE6/INT6

PE7/INT7

VCC

GND

PH0/RXD2

PH1/TXD2

PH2/XCK2

PH3/OC4A

PH4/OC4B

PH5/OC4C

PH6/OC2B

PB0/PCINT0

PB1/SCK

PB2/MOSI

PB3/MISO

PB4/OC2A

PB5/OC1A

PB6/OC1B

19

20

21

22

23

24

25

9

10

11

12

13

14

15

16

17

18

1

2

3

4

7

8

5

6

78 77

U1

ATmega1280

100pin TQFP

38 39 40 41 42 43 44 45

PD2/RXD1 PD3/TXD1

AD3/PA3

AD4/PA4

AD5/PA5

AD6/PA6

AD7/PA7

ALE/PG2

PCINT15/PJ6

PCINT14/PJ5

PCINT13/PJ4

PCINT12/PJ3

XCK3/PJ2

TXD3/PJ1

RXD3/PJ0

GND

VCC

A15/PC7

A14/PC6

A13/PC5

A12/PC4

A11/PC3

A10/PC2

A9/PC1

A8/PC0

PG1

PG0

PD6/T1 PD7/T0

48 49

75

74

73

72

71

70

69

68

67

66

65

64

63

62

61

60

59

58

57

56

55

54

53

52

51

VCC-3.3

VCC-3.3

RX0-MCU

TX0-MCU

8

9

10

11

12

13

14

6

7

4

5

1

2

3

U4

TXD

DTR#

RTS#

VCCIO

RXD

RI#

GND

NC

DSR#

DCD#

CTS#

CBUS4

CBUS2

CBUS3

OSCO

OSCI

TEST

AGND

NC

CBUS0

FT232RL

CBUS1

GND

VCC

RESET#

GND

3V3OUT

USBDM

USBDP

FT232RL

28

27

26

25

24

23

22

21

20

19

18

17

16

15

VCC-3.3

C34

100nF

R53

220

LD3

RX/TX

R51

4K7

VCC-USB

FP2

FERRITE

C36

100nF

R52

10K

R64

100

USBDM

USBDP 3

4

5

1

2

C28

10nF

CN3

VBUS

D-

D+

ID

GND

USB MINIB

USBDET

X1 8MHz

C2

22pF

C1

22pF

Figure 9-2: USB-UART connection schematics

Page 29

10. Accelerometer

On board

ADXL345

accelerometer, among other features, can be used to measure acceleration in three axis:

x

,

y

, and

z

. The accelerometer function is defined by the user in the program loaded into the microcontroller. Communication between the accelerometer and the microcontroller is performed via the

I2C

interface.

AVCC VCC-3.3

PG5

PE0/RXD0

PE1/TXD0

PE2/XCK0

PE3/OC3A

PE4/INT4

PE5/INT5

PE6/INT6

PE7/INT7

VCC

GND

PH0/RXD2

PH1/TXD2

PH2/XCK2

PH3/OC4A

PH4/OC4B

PH5/OC4C

PH6/OC2B

PB0/PCINT0

PB1/SCK

PB2/MOSI

PB3/MISO

PB4/OC2A

PB5/OC1A

PB6/OC1B

5

6

3

4

1

2

10

11

12

13

14

7

8

9

19

20

21

22

23

24

25

15

16

17

18

78 77

U1

ATmega1280

100pin TQFP

38 39 40 41 42 43 44 45

PD2/RXD1 PD3/TXD1

AD3/PA3

AD4/PA4

AD5/PA5

AD6/PA6

AD7/PA7

ALE/PG2

PCINT15/PJ6

PCINT14/PJ5

PCINT13/PJ4

PCINT12/PJ3

XCK3/PJ2

TXD3/PJ1

RXD3/PJ0

GND

VCC

A15/PC7

A14/PC6

A13/PC5

A12/PC4

A11/PC3

A10/PC2

A9/PC1

A8/PC0

PG1

PG0

PD6/T1 PD7/T0

48 49

75

74

73

72

71

67

66

65

64

70

69

68

56

55

54

53

59

58

57

52

51

63

62

61

60

Figure 10-1:

Accelerometer connection schematics

VCC-3.3

VCC-3.3

R12

10K

SCL-PD0

3

4

1

2

5

6

U9

VCC

GND

Res

GND

GND

VCC

SDA

ADD

Res

NC

INT2

INT1

13

12

9

8

11

10

SDA-PD1

ACC ADDRESS

VCC-3.3

ADXL345

J1

R13

10K

VCC-3.3

VCC-3.3

C33

100nF

C32

100nF

X1 8MHz

C2

22pF

C1

22pF

Page 30

Figure 10-2:

Accelerometer module

You can set the accelerometer address to 0 or 1 by re-soldering the

SMD jumper (zero-ohm resistor) to the appropriate position. Jumper is placed in address 1 position by default.

Page 31

Page 30

11. Flash Memory

AVCC VCC-3.3

SCK-PB1

MOSI-PB2

R4 27

MISO-PB3

R5 27

PG5

PE0/RXD0

PE1/TXD0

PE2/XCK0

PE3/OC3A

PE4/INT4

PE5/INT5

PE6/INT6

PE7/INT7

VCC

GND

PH0/RXD2

PH1/TXD2

PH2/XCK2

PH3/OC4A

PH4/OC4B

PH5/OC4C

PH6/OC2B

PB0/PCINT0

PB1/SCK

PB2/MOSI

PB3/MISO

PB4/OC2A

PB5/OC1A

PB6/OC1B

11

12

13

14

7

8

9

10

15

16

17

18

5

6

3

4

1

2

19

20

21

22

23

24

25

78 77

U1

ATmega1280

100pin TQFP

38 39 40 41 42 43 44 45

PD2/RXD1 PD3/TXD1

AD3/PA3

AD4/PA4

AD5/PA5

AD6/PA6

AD7/PA7

ALE/PG2

PCINT15/PJ6

PCINT14/PJ5

PCINT13/PJ4

PCINT12/PJ3

XCK3/PJ2

TXD3/PJ1

RXD3/PJ0

GND

VCC

A15/PC7

A14/PC6

A13/PC5

A12/PC4

A11/PC3

A10/PC2

A9/PC1

A8/PC0

PG1

PG0

PD6/T1 PD7/T0

48 49

75

74

73

72

71

67

66

65

64

70

69

68

56

55

54

53

59

58

57

52

51

63

62

61

60

VCC-3.3

FLASH-CS#

MISO-PB3

R59 27

R48

10K

C37

VCC-3.3

VCC-3.3

3

4

1

2

U10

CS

SDO

WP

GND

M25P80

VCC

HOLD

SCK

SDI

100nF

8

7

6

5

SCK-PB1

MOSI-PB2

Figure 11-1: Flash memory module connection schematics

Page 31

Figure 11-2:

Flash memory module

Since multimedia applications are getting increasingly demanding, it is necessary to provide additional memory space to be used for storing more data. The flash memory module enables the microcontroller to use additional

8Mbit

flash memory. It is connected to the microcontroller via the Serial Peripheral Interface (

SPI

).

12. Pads

AVCC

39

40

41

42

35

36

37

38

31

32

33

34

27

28

29

30

47

48

49

50

43

44

45

46

51

52

HDR2

M1X26

RST

PL2

PL5

PL6

PL7

PB5

PB6

PD4

PD5

PD6

PD7

RX1-PD2

TX1-PD3

SCL-PD0

SDA-PD1

PH3

PH4

L

R

PL3

PL4

PL0

PL1

VCC-3.3

PE4

PE5

PE6

PE7

PH0

PH1

PH2

PH3

PH4

PH5

PH6

SCK-PB1

MOSI-PB2

R4 27

MISO-PB3

PB5

PB6

R5 27

PG5

PE0/RXD0

PE1/TXD0

PE2/XCK0

PE3/OC3A

PE4/INT4

PE5/INT5

PE6/INT6

PE7/INT7

VCC

GND

PH0/RXD2

PH1/TXD2

PH2/XCK2

PH3/OC4A

PH4/OC4B

PH5/OC4C

PH6/OC2B

PB0/PCINT0

PB1/SCK

PB2/MOSI

PB3/MISO

PB4/OC2A

PB5/OC1A

PB6/OC1B

5

6

3

4

1

2

10

11

12

13

14

7

8

9

19

20

21

22

23

24

25

15

16

17

18

PK0 PK1 PK2 PK3 PK4 PK5 PK6

78 77

U1

ATmega1280

100pin TQFP

38 39 40 41 42 43 44 45

PD2/RXD1 PD3/TXD1

AD3/PA3

AD4/PA4

AD5/PA5

AD6/PA6

AD7/PA7

ALE/PG2

PCINT15/PJ6

PCINT14/PJ5

PCINT13/PJ4

PCINT12/PJ3

XCK3/PJ2

TXD3/PJ1

RXD3/PJ0

GND

VCC

A15/PC7

A14/PC6

A13/PC5

A12/PC4

A11/PC3

A10/PC2

A9/PC1

A8/PC0

PG1

PG0

PD6/T1 PD7/T0

48 49

75

74

73

72

71

67

66

65

64

70

69

68

56

55

54

53

59

58

57

52

51

63

62

61

60

VCC-3.3

PJ2

PJ1

PJ0

PE5

PE6

PE7

PJ0

PJ1

PJ2

PH0

PH1

PH2

PH5

PK0

PK1

PK2

PK3

PK4

PK5

PK6

PE4

PH6

SCK-PB1

MISO-PB3

MOSI-PB2

VCC-3.3

VCC-SYS

HDR1

M1X26

13

14

15

16

9

10

11

12

7

8

5

6

3

4

1

2

21

22

23

24

17

18

19

20

25

26

Pads HDR2

PL0 PL1 PL2 PL3 PL4 PL5 PL6 PL7 RX1-PD2 TX1-PD3 PD4 PD5 PD6 PD7

X1 8MHz

C2

22pF

C1

22pF

Figure 12-1:

Pads connecting schematics

Pads HDR1

Most microcontroller pins are available for further connectivity via two 1x26 rows of connection pads on both sides of the mikromedia board. They are designed to match additional shields, such as Battery Boost shield, Gaming, PROTO shield and others. Pads with underlined silkscreen markings have multiple functions (see the complete schematics for more information).

Page 32 Page 33

Page 32

13. Pinout

System power supply

Reference Ground

Analog Lines

Interrupt Lines

Digital I/O lines

SPI Lines

SCK

SDI

SDO

3.3V power supply

Reference Ground

PK6

PE4

PE5

PE6

PE7

PJ0

PJ1

PJ2

VSYS

GND

PK0

PK1

PK2

PK3

PK4

PK5

PH0

PH1

PH2

PH5

PH6

PB1

PB3

PB2

3.3V

GND

Pin functions

Digital lines Analog Lines Interrupt Lines SPI Lines

Page 33

I2C Lines

PL0

PL1

PL2

PL5

PL6

PL7

PB5

PB6

L

R

RST

GND

PH3

PH4

PL3

PL4

PD4

PD5

PD6

PD7

PD2

PD3

PD0

PD1

3.3V

GND

UART lines

Reset pin

Reference Ground left ch.

right ch.

PWM lines audio out

Digital I/O lines

RX

TX

SCL2

SDA2

UART Lines

I

2

C Lines

3.3V power supply

Reference Ground

Pin functions

PWM lines

14. Dimensions

80.90 mm (3.18”)

73.01 mm (2.87”)

69.85 mm (2.75”)

4.45 mm (0.17”)

Page 34

2.54 mm (0.10”) 2.77 mm (0.11”)

Page 35

Page 34

15. mikromedia accessories

We have prepared a set of extension boards pin-compatible with your mikromedia, which enable you to easily expand your board basic functionality.

We call them mikromedia shields. But we also offer other accessories, such as Li-polymer battery, stacking headers, wire jumpers and more.

01

Connect shield

02

BatteryBoost shield 03 PROTO shield

04

Gaming shield

05

Li-Polimer battery

Page 35

06

Wire Jumpers

07

Stacking headers

What’s next?

You have now completed the journey through each and every feature of mikromedia for ATmega board. You got to know it’s modules and organization. Now you are ready to start using your new board. We are suggesting several steps which are probably the best way to begin. We invite you to join the users of mikromedia™ brand. You will find very useful projects and tutorials and can get help from a large ecosystem of users. Welcome!

Compiler

You still don’t have an appropriate compiler? Locate AVR® compiler that suits you best on the Product DVD provided with the package:

DVD://download/eng/software/compilers/

Choose between mikroC™, mikroBasic™ and mikroPascal™ and download fully functional demo version, so you can begin building your first applications.

Projects

Once you have chosen your compiler, and since you already got the board, you are ready to start writing your first projects.

Visual TFT software

for rapid development of graphical user interfaces enables you to quickly create your

GUI. It will automatically create necessary code which is compatible with mikroElektronika compilers. Visual TFT is rich with examples, which are an excellent starting point for your future projects. Just load the example, read well commented code, and see how it works on hardware. Visual TFT is also available on the Product DVD.

Page 36 Page 37

Page 36 Page 37

Notes:

Notes:

Page 38 Page 39

Page 38

DISCLAIMER

All the products owned by MikroElektronika are protected by copyright law and international copyright treaty. Therefore, this manual is to be treated as any other copyright material. No part of this manual, including product and software described herein, may be reproduced, stored in a retrieval system, translated or transmitted in any form or by any means, without the prior written permission of MikroElektronika. The manual PDF edition can be printed for private or local use, but not for distribution. Any modification of this manual is prohibited.

MikroElektronika provides this manual ‘as is’ without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties or conditions of merchantability or fitness for a particular purpose.

MikroElektronika shall assume no responsibility or liability for any errors, omissions and inaccuracies that may appear in this manual. In no event shall MikroElektronika, its directors, officers, employees or distributors be liable for any indirect, specific, incidental or consequential damages (including damages for loss of business profits and business information, business interruption or any other pecuniary loss) arising out of the use of this manual or product, even if MikroElektronika has been advised of the possibility of such damages. MikroElektronika reserves the right to change information contained in this manual at any time without prior notice, if necessary.

HIGH RISK ACTIVITIES

The products of MikroElektronika are not fault – tolerant nor designed, manufactured or intended for use or resale as on – line control equipment in hazardous environments requiring fail – safe performance, such as in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines or weapons systems in which the failure of Software could lead directly to death, personal injury or severe physical or environmental damage (‘High Risk Activities’). MikroElektronika and its suppliers specifically disclaim any expressed or implied warranty of fitness for High

Risk Activities.

TRADEMARKS

The MikroElektronika name and logo, the MikroElektronika logo, mikroC™, mikroBasic™, mikroPascal™, mikroProg™, EasyAVR6™, BIGAVR6™, AVRPLC16 v6™ and mikromedia™ are trademarks of MikroElektronika. All other trademarks mentioned herein are property of their respective companies.

All other product and corporate names appearing in this manual may or may not be registered trademarks or copyrights of their respective companies, and are only used for identification or explanation and to the owners’ benefit, with no intent to infringe.

Copyright © MikroElektronika, 2012, All Rights Reserved.

Page 39

If you want to learn more about our products, please visit our website at

www.mikroe.com

If you are experiencing some problems with any of our products or just need additional information, please place your ticket at

www.mikroe.com/esupport

If you have any questions, comments or business proposals, do not hesitate to contact us at

[email protected]

mikromedia for ATMEGA Manual

(Mini) ver. 1.00

0 100000 018798

Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement