device interface (090721)

15
MIware 엠엠엠엠엠 엠엠엠 Device Interface 엠엠엠엠엠 엠엠엠 엠 엠

Upload: -

Post on 11-Apr-2017

67 views

Category:

Engineering


1 download

TRANSCRIPT

Page 1: Device interface (090721)

MIware 엠아이웨어 연구소

Device Interface

엠아이웨어 연구소

김 대 갑

Page 2: Device interface (090721)

MIware 엠아이웨어 연구소

Contents

Device 와 Device Driver Device Driver 연결 구성 개념도 UART SPI I2C I2S Camera Sensor Interface Display Interface Memory Interface SD Card Interface

Page 3: Device interface (090721)

MIware 엠아이웨어 연구소

Device 와 Device Driver

Device 란 ? System 을 구성하기 위한 실제적 혹은 물리적 장치

- CPU, RAM, Hard Disk, Monitor, Key Board, etc.

Device Driver 란 ? Device 를 동작 시켜주기 위한 Software

Processor (SoC : System on Chip)

S3C2443

Memory (SDRAM)LCD

SD Card Audio DAC

Page 4: Device interface (090721)

MIware 엠아이웨어 연구소

Device Driver 연결 구성 개념도

Device Interface Hardware (Device) 장치를 구동하기 위한 연결 고리

Device 에 따라 연결되는 Signal 이 다름

- UART, SPI, I2C, I2S, etc.

Device Dependent Driver Device 에 의존적인 Software 로써 각 Device 마다 해당

Device 에 맞는 처리를 해주어야 함 Device Independent Driver Device 에 비의존적인 Software 로써 O/S 에서 인식될

수 있는 일반화된 형식으로 구성될 수 있음 Device Driver Interface Application 혹은 Operator 가 Device Driver 를 접근하기

위한 연결 고리

- open(), close(), read(), write(), ioctl(), etc.

Device DependentDriver

Device Interface

Hardware

Device IndependentDriver

Device Driver Interface

Device Driver

Operator or Application

Page 5: Device interface (090721)

MIware 엠아이웨어 연구소

UART (Universal Asynchronous Receiver Transmitter)

UART 란 ? 병렬 Data 를 비동기적으로 직렬로 송수신하기

위한 장치

RS-232 물리 계층 규약을 따름

- 9Pin 으로 구성됨 - Baud Rate - Start Bit, Data, Parity Bit, Stop Bit

RS232 I/F

Processor

Max232TXDRXDRTSCTS

UART I/F

Modem

DCE

RXDRTSCTS

TXD

Modem

DCEPhoneLine ...

Processor-1 Processor-2

TXDRXDRTSCTS

UART I/F

RXDTXDCTSRTS

Page 6: Device interface (090721)

MIware 엠아이웨어 연구소

SPI (Serial Peripheral Interface)

Serial Peripheral Interface 모토롤러가 개발했으며 , 낮은 가격으로 마이크로 컨트롤러와 주변기기 칩 사이에 단순한

인터페이스를 제공한다 .

Page 7: Device interface (090721)

MIware 엠아이웨어 연구소

I2C (Inter Integrated Circuit)

Inter Integrated Circuit 필립스에서 제창된 것으로써 싸고 효과적으로 작은 규모의 임베디드 시스템에서

주변기기를 제어하는데 사용된다 .

SPI 보다 전송률이 낮다 . 표준 모드 (100kbps), 빠른 모드 (400kbps),

Page 8: Device interface (090721)

MIware 엠아이웨어 연구소

I2S (Inter IC Sound)

Inter IC Sound CD 플레이어 등 디지털 오디오 장치 및 신호를 효과적으로 전달하기 위하여 설계됨

Page 9: Device interface (090721)

MIware 엠아이웨어 연구소

Camera Sensor Interface

Camera Sensor Interface 종류 Analog 방식

- NTSC 혹은 PAL 입력 (Video Decoder 가 있어 Digital 형태로 변형이 될 수 있음 )

Digital 방식

- ITU-R BT 601, ITU-R BT 656

- Interlace Mode, Progressive Mode

ProcessorCamera Sensor Module

PCLK

VSYNC

MCLK

HREF

DATA 8

I2C MasterSlave

FIELD

Page 10: Device interface (090721)

MIware 엠아이웨어 연구소

Display Interface

Display Interface 종류 Bus Interface

- I80 Bus Interface, M68 Bus Interface, Vsync Interface

- Display Device 내에 GRAM 이 존재함

- RGB565 (16bit), RGB666 (18bit), RGB888 (24bit)

RGB Timing Interface

NTSC / PAL TV-Out Interface (Analog Video Out)

I80 Bus Interface

Processor Display Unit

CSB

DATA

18

RS

WRB

RDB

Page 11: Device interface (090721)

MIware 엠아이웨어 연구소

Display Interface (Continue)

Vsync Interface

M68 Bus Interface

Processor Display Unit

CSB

DATA

18

RS

RW

E

Processor Display Unit

CSB

DATA

18

RS

WRB

VSYNC

Back Porch

Front Porch

VSYNC

Lines

Time

VSYNC

Page 12: Device interface (090721)

MIware 엠아이웨어 연구소

Display Interface (Continue)

RGB Timing Interface

Processor Display Unit

DOTCLK

DATA

18

VSYNC

HSYNC

ENABLE

SPIMaster Slave

Page 13: Device interface (090721)

MIware 엠아이웨어 연구소

Memory Interface

RAM (Random Access Memory) 종류 SRAM (Static RAM) DRAM (Dynamic RAM) : SDR, DDR - Refresh 장치가 필요함

ROM (Read Only Memory) 종류 mROM (Masked ROM) EPROM (Erasable & Programmable ROM) EEPROM (Electrically Erasable & Programmable ROM)

Flash Memory 종류 NOR Flash - 일반 메모리처럼 Address 단자와 Data 단자가 분리됨 - Read 동작은 ROM/RAM 처럼 수행할 수 있음 - Erase 및 Write 는 특정 처리 명령을 통해서만 가능함 NAND Flash - Address 단자가 따로 존재하지 않음 - Erase, Write 및 Read 는 특정 처리 명령을 통해서만 가능함 - NOR 와 같은 가격으로 볼 때 더 많은 용량을 가짐

Processor

SRAM

Memory

CE

Data Bus

WE

RE

Address Bus

Page 14: Device interface (090721)

MIware 엠아이웨어 연구소

Memory Interface (Continue)

NAND Flash 예제 삼성 NAND Flash K9F1208X0A

- 하나의 Page 는 512 byte 의 data 영역과

16 byte 의 spare 영역으로 구성됨Processor

NANDFlash

MemoryCE

Data Bus

WE

RE

ALE

CLE

R/B

Page 15: Device interface (090721)

MIware 엠아이웨어 연구소

SD Card Interface

SD (Secure Digital) Card 기능적 분류 SD Memory Card : 일반적으로 SD Card 라고 부르고 사용되는 메모리 카드 - 용량에 따라 SDHC (SD High Density), 속도에 따라 Class 가 정의됨 SD I/O Card : SDIO 라고하며 , SD Card Interface 를 통하여 I/O 장치가 연결됨 - Ex) WLAN, Bluetooth, GPS, etc. SD Combo Card : SD Memory 와 I/O 장치가 함께 들어가 있는 Card

Processor SD Card

CLK

CMD

DAT[3..0]

SD CardController 4