Design of application system based on external SRAM expansion keyboard of ATmega2560 microcontroller

Publisher:SereneDreamsLatest update time:2018-03-21 Source: eefocusKeywords:ATmega2560 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

    From the application point of view, this paper designs an application system based on the external SRAM expansion keyboard of ATmega2560 microcontroller. The detailed design is given from the hardware block diagram to the software.

    ATmega2560 microcontroller is the most advanced one in ATmega series. It has been widely used in consumer electronics and industrial automatic control fields. Due to its low development cost, easy to use and powerful functions, you only need to make a simple ISP download line to write the compiled program into its program memory for downloading, which can save a lot of development costs. This article introduces the application design example of ATmega2560 microcontroller external SRAM expansion disk, and introduces the flexible application of external memory expansion function method, so that beginners can quickly grasp the design difficulties and key points.

 

    1 ATmega2560 Microcontroller Overview

    ATmega2560 has the characteristics of fast speed, high clock frequency, strong I/O port function, large driving ability, flexible storage function, rich peripherals, low power consumption, high confidentiality, and especially easy to use and low development cost.

    The ATmega2560 microcontroller has a Flash capacity of 256 kB, an EEPROM capacity of 4 kB, an SRAM capacity of 8 kB, 86 I/O ports, 4 serial USART ports, 16 10-bit ADC channels, 6 sleep modes, and is packaged in TQFP.

    1.1 ATmega2560 microcontroller software compilation

    ATmega2560 controller is one of the ATmega series AVR microcontrollers. The ATmega2560 integrated development environment can be selected from AVRStudio v4.14.exe. It includes AVR Assemblet compiler, AVR Studio debugging function, AVR Prog serial and parallel download function, and JTAG ICE simulation functions. When programming in C language is required, Win AVR-20100110-install.exe software should be added.

    1.2 ATmega2560 microcontroller software download

    The download program software SLISP V1518 PNP.exe from Guangzhou Tianhe Shuanglong Electronics Co., Ltd. is selected. The installed MCU download software is shown in Figure 1. The software can download multiple models of microcontrollers from ATmega8 to ATmega2561. The software can easily set the fuse bit through the setting navigation or factory default settings. After setting the various parameters of the download software, click the flash option in Figure 1, select the execution code program to be written, click Program, and the program is easily downloaded to the flash in ATmega2560.

a.JPG

    
1.3 Making ATmega2560 microcontroller download ISP line
    Figure 2 shows the simplest ISP parallel port download line schematic diagram, which can be completed with four 1 kΩ resistors and a DB25 socket. It is a very good choice to use this downloader in an environment without an emulator. The SCK pins correspond to pin 20 of ATmega2560, MISO corresponds to pin 22, RESET corresponds to pin 30, MOSI corresponds to pin 21, and GND is connected to all ground pins of ATmega2560. The ISP parallel port download line is very simple to make.

b.JPG

2 Design of external SRAM keyboard expansion for ATmega2560 microcontroller
2.1 Hardware circuit design
    The hardware circuit is mainly composed of ATmega2560 microcontroller, LM1085IS-5.0 voltage regulator, AHC573 latch and programmable peripheral interface M82C55A, and keyboard input circuit. Figure 3 is the main control circuit of ATmega2560 microcontroller, and Figure 4 is the keyboard scanning circuit for external SRAM (data memory) expansion. The XP parallel port in Figure 4 is the ISP download interface, and the execution code can be downloaded to the ATmega2560 program memory through the ISP parallel port downloader.

 

c.JPG

    
    The PA port of M82C55A is set as an output port, and the PB port is set as an input port. The intersection of the PA and PB ports constitutes a keyboard scanning circuit.
    The PA port (pins 71 to 78) of the ATmega2560 microcontroller is used as the low byte of the external memory interface address and is also multiplexed as a data port. The PC port (pins 53 to 60) is only used as the high byte of the external memory interface address. When the ALE (pin 70) external memory address latch enable signal is valid, the PA port is used as the low 8 bits of the 16-bit address bus. The latched address output of the latch AH573 and the high 8 bits of the PC port together form a 16-bit external memory address space. When the read or write control signal of the external memory is valid, that is, when RD (pin 52) or WR (pin 51) is valid, the PA port will be used as a data port to transmit data.


2.2 Software Design
    (1) Software Design Flowchart
    The flow chart of the software program is shown in Figure 5.

d.JPG

 

    (2) Key Program Analysis
    e.JPG


f.JPG
    3 Conclusion
    From the application perspective, this paper constructs a complete ATmega2560 microcontroller external SRAM expansion keyboard application design, and gives a detailed analysis from the hardware principle to the software design. It has certain application value in the ATmega2560 external SRAM expansion application.

Keywords:ATmega2560 Reference address:Design of application system based on external SRAM expansion keyboard of ATmega2560 microcontroller

Previous article:Design and simulation of underwater acoustic modem based on single chip microcomputer
Next article:Design of MCU control board based on MCF51QE128 and ATmega64

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号