1 / 14

Microcontroller based system design

Microcontroller based system design. Asst. Prof. Dr. Alper ŞİŞMAN. I nterfacing. Interfacing is the process of connecting devices together so that they can exchange information A special interface must translate between the signal that the computer uses and those that the peripheral uses.

elaina
Télécharger la présentation

Microcontroller based system design

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN

  2. Interfacing • Interfacing is the process of connecting devices together so that they can exchange information • A special interface must translate between the signal that the computer uses and those that the peripheral uses. • An interface includes the physical connection, the hardware and a set of rules or procedures (proper timing&control), i.e., the software. • For example, the connection between a microprocessor and external memory is an interface. There are physical connections for addressing, data flow and control signals. The software consists of instructions that read from and/or write to an addressed location.

  3. The major problems with interfacing are: • wide variety of peripheral devices • enormous range of peripheral speeds • variety in signal types and signal levels in peripheral devices • complexity of the signaling structure (strobes, handshaking, etc.)

  4. IO module inside the µC • A simple input interface operation is similar to a memory read cycle. • µP generates address and control signals to select the input device. • 2. Input device generates data and loads data lines. • 3. µP reads data from the data bus and places it in a register. • Most µPs accept data from an input device through the data bus connections and therefore require some form of switch to connect this data to the bus at the appropriate time. One effective digital switch available is the three-state buffer.

  5. Input interface Ex.

  6. An output operation is similar to a memory write cycle. • µP generates address and control signals to select the output device. 2. µP places data on the data bus. 3. µP waits for the transfer to be successfully completed. • Whenever data is sent out from the µP to an external output device, it appears on the data bus for only a brief period of time. In almost all instances, the external output device uses some form of latch tograb onto and hold the data bus information.

  7. Output interface Ex.

  8. IO Mapping • Almost all microprocessors use the same bus for both memory and I/O transfers. • There are two basic input/output schemes: • Memory-mapped I/O; in which I/O devices (parallel I/O lines) are treated exactly the same as memory locations 2. Isolated I/O; in which memory and I/O addresses are decoded separately.

  9. Memory mapped IO (Microchip,Motorola) • Here 8 devices are mapped and each uses 32 parallel lines (bits) for interfacing:

  10. Advantages/Disadv. Of Mem. Mappped IO + Any instruction that operates on data in memory can operate on data at input and output devices. + No separate decoding or control system is necessary for input and output. • I/O transfers may be difficult to distinguish from other operations in software. • I/O devices occupy some of the address space. • The decoding system may become complex because I/O devices occupy much less than memory chips. In order to avoid complexity the memory space has to be wasted.

  11. Isolated IO (Intel) • In this type of I/O, there are separate memory and I/O instructions and separate memory and I/O maps. Adv./Disadv. +I/O device addresses can be short. + Programs are clearer because I/O transfers are distinguished from other operations. + Memory and I/O design can be separated - Drawback of isolated I/O is the requirement for extra decoding and extra instructions.

  12. Suppose that it is required to use eight I/O devices and the locations between $80 through $9F in the I/O map are to be used for this purpose

  13. Outside of µC • User interfaces • Displays (Alphanumeric LCD, Graphic LCD, TFT, 7-segment) • Keypads (Matrix keypad) • External Mem. Modules • SD card reader • External EEPROM • Digital Camera • Microphone , speaker , etc

  14. STM32F407 Interfaces • Digital IO, 16 ports with 16 pins. (Speed can be controllable for each port) • Input Conf: Pull up, pull down or no pull up/down • Output Conf: Open drain/push pull • Analog IO: Each port pin can be configured as analog input. 16 external ADC can be used. Resolution: 12 bit. DAC modules: 12 bit • Digital camera interface • Inter-integrate circuit (i2c) interface • Serial peripheral ibterface (spi) • UART interface • SDIO interface (SD card reader) • CAN bus • Ethernet interface • USB interface

More Related