Logic Level Converter 



-4050 (VCC : 3.3V)

5V to 3.3V

'Hardware' 카테고리의 다른 글

풀업(pullup)과 풀다운(pulldown)  (0) 2015.09.08
저항  (0) 2015.09.08
led와 저항  (0) 2015.09.08
I2S(Integrated Interchip Sound)  (0) 2015.08.04
SPI(Serial Peripheral Interface Bus)  (0) 2015.08.04

풀업(pullup)과 풀다운(pulldown)

 

풀업(pullup)과 풀다운(pulldown)을 알기에 앞서 플로팅(floating)에 대해 알아보자.

1. 플로팅 (floating)


 칩에 입력을 5V 또는 0V를 가한다. 하지만 입력을 가하지 않는 경우는 칩 자체에서는 5V를 입력하였는지 1V를 입력하였는지 모른다. 이런 문제에 의하여 오작동이 발생할 수 있다. 이런 상태를 플로팅되었다라고 한다. 플로팅 상태는 잡음에 매우 취약해지므로 시스템이 불안정해진다. 이를 해결 하기 위해서 풀업 / 풀다운 저항을 사용하게 된다.

2. 풀업 저항 (Pullup resistor)


풀업 저항을 사용한다면 스위치가 열려 있을 때 칩에는 항상 5V의 전압이 가해진다.
따라서 회로에 입력을 몰라도 항상 5V의 전압을가진 상태가 된다. 스위치를 닫는다면 그라운드 쪽으로 전류가 흐르게 되며 회로의 전압은 0V가 되며, 1을 입력한 것으로 인식하게 된다. 핀을 높은 저항에 매달아 둔다는 뜻에서 '풀 업 저항'이라 한다.


3. 풀다운 저항 (Pulldown resistor)


회로는 5V의 전압을 받으면 1로 인식하고, 0V의 전압을 받으면 0으로 인식한다.
스위치가 열려있는 상태에서 그라운드와 연결되어 있으므로 전류가 항상 그라운드로 흐르게 되어 0V가 된다. 스위치를 닫게되면 소량의 전류가 저항을 통해 그라운드로 흘러 나가지만 많은 양의 전류가 회로(핀)로 흘러 5V가 된다. 따라서 1이 입력된 것으로 인식한다. 항상 그라운드에 묶어둔다는 의미에서 '풀 다운 저항' 이라 한다.







[출처]

http://blog.naver.com/jinjinwlsdud?Redirect=Log&logNo=60112904160
http://exmars.egloos.com/3454006

'Hardware' 카테고리의 다른 글

레벨시프터 Logic Level Converter  (0) 2015.11.10
저항  (0) 2015.09.08
led와 저항  (0) 2015.09.08
I2S(Integrated Interchip Sound)  (0) 2015.08.04
SPI(Serial Peripheral Interface Bus)  (0) 2015.08.04

'Hardware' 카테고리의 다른 글

레벨시프터 Logic Level Converter  (0) 2015.11.10
풀업(pullup)과 풀다운(pulldown)  (0) 2015.09.08
led와 저항  (0) 2015.09.08
I2S(Integrated Interchip Sound)  (0) 2015.08.04
SPI(Serial Peripheral Interface Bus)  (0) 2015.08.04

led와 저항

100~300 옴 3~5V

1k옴 12V

'Hardware' 카테고리의 다른 글

풀업(pullup)과 풀다운(pulldown)  (0) 2015.09.08
저항  (0) 2015.09.08
I2S(Integrated Interchip Sound)  (0) 2015.08.04
SPI(Serial Peripheral Interface Bus)  (0) 2015.08.04
I2C(Inter Integrated Circuit)  (0) 2015.08.04


(1) I2S란?

: 

위키에 보면 I2S는 Integrated Interchip Sound 의 약어라고 한다. 
즉, 디지털 오디오 장치에 표준 통신법. ( I2SBUS.pdf)



위의 그림과 같이 기본적으로는 3개의 line이 연결.
[ serial clock(이하 SCK), word select(이하 WS), serial data(이하 SD)]

○ Tansmitter - CPU
○ Receiver - Sound IC(sound codec)


(2) I2S Interface



● SCK
 : bit clock으로 'SD'로부터 나오는 데이터를 SCK의 Clock 기준으로 잘라 SD값을 읽어간다.
   1 bit값(0 or 1)을 읽을 수 있는데, 연속적으로 읽게되면 음악이 된다. (bit clock)
   대부분의 칩간의 통신이 이러한 기준 clock을 가지고 data를 읽어오곤 한다.

● WS
 : 스테레오의 'left / right 정보로 스피커에서 서로 다른 소리가 날 수 있도록 한다.

   예를 들면, 'WS'가 low일 경우 left용 data를 읽고, high일 경우 right용 data를 읽는다.

● SD
 : sound data가 되고, PCM Data.

● MASTER CLOCK
 : sound IC는 스스로 clock을 만들 수 없기 때문에 master clock을 받게 된다.
이 clock을 기준으로 sound IC는 나누고 곱하는 등 작업을 내부적으로 동작하며 'SCK'나 'WS'를 발생한다.

● UPDA
 : 마이크와 같은 입력장치가 sound IC에 물려 있게 된다면 마이크의 음성 신호를 디지털 데이터로 전환 후 
   CPU에 올려줘야 하기 때문에 'SD'와 같은 용도의 upload용 data line으로 bit들이 전송된다.

● I2C
 :추가적으로 sound IC를 제어하기 위해 I2C로 연결되어 있어야 한다.
  I2S는 sound data를 전송하기 위한 표준이고, 실제 sound IC를 제어하려면 제어용 통신이 별도로 필요하기 때문이다.
  SPI통신이나 I2C, serial통신등이 존재하지만 대부분 sound IC는 I2C 통신을 하고 있다.

 위와 같이 I2S라인 5개와 I2C라인 2개가 연결 되야 sound IC를 제어 할 수 있다.


(3) SD DATA
: wave file format은 크게 "RIFF"부분, "fmt"부분, "data"부분으로 나뉘는데, wave file의 정보를 담는 "RIFF"와 "fmt"를 합쳐도 36Byte 이다.
  그리고 나머지는 모두 "data"로 PCM변조하여 analog음원을 digital화 하면서 얻게되는 sample들을 나열한 형태이다.
  이 sample들이 "data"에 담긴 정보인 PCM data 이다.

- 연속적인 data가 'SD'라인을 통해서 sound IC에 전달 되고, sound IC는 PCM data를 아날로그화 하여 스피커로 출력된다.


(4) 정리

첫번째, sound IC가 master인지 slave인지 정하고, sound IC를 initailize(I2S, I2C정보 셋팅)합니다.

두번째, CPU에서 음원(wave file, mp3 file등)을 분석해서 sampling rate, bit per sample, channel수를 알아챕니다.

세번째, I2C를 통해 sound IC에게 sampling rate, bit per sample, channel수 등의 정보를 알려줍니다.

네번째, 'SCK', 'WS'가 해당 음원에 맞게 셋팅 됩니다.

다섯번째, 'SD'에 PCM data를 넣어줍니다.

여섯번째, 음악이 스피커나 이어폰을 통해 재생됩니다.




※ 출처 : http://musart.tistory.com/75

'Hardware' 카테고리의 다른 글

저항  (0) 2015.09.08
led와 저항  (0) 2015.09.08
SPI(Serial Peripheral Interface Bus)  (0) 2015.08.04
I2C(Inter Integrated Circuit)  (0) 2015.08.04
UART란?  (0) 2015.08.04

SPI(Serial Peripheral Interface Bus)


(1) SPI(Serial Peripheral Interface Bus ) 통신
SPI (Serial Peripheral Interconnect) 버스는 Motorola에 의해 개발된 전이중 (full duplex) 통신이 가능한 동기 통신 규격이다.
 
I2C와 마찬가지로 Master - Slave 방식으로 동작하며 Master가 동기를 위한 클럭을 출력한다. 각 SPI Slave 장치는 chip enable (/CE) 입력을 가지고 있으며 이 입력이 활성화되었을 때에만 동작한다. 따라서 Master는 여러 개의 slave select (SS) 선을 Slave들의 /CE에 연결하고 한 순간에 하나의 Slave만 선택하는 방법을 사용하여 두 개 이상의 Slave 장치들을 구동할 수 있다. SPI의 통신 속도는 최고 70 MHz에 이르기 때문에 I2C에 비해 훨씬 빠르다.



그림에 표시된 4 개의 신호는 SPI 버스에서 정의된 신호이다

● SCLK : Serial Clock. 매스터가 출력하는 동기용 클럭 (output from master)
● MOSI : Master Output Slave Input. 매스터의 출력이며 슬레이브에게는 입력 (output from master)
● MISO : Master Input Slave Output. 슬레이브의 출력이며 매스터에게는 입력 (output from slave)
● SS : Slave Select. 매스터의 출력으로 슬레이브를 선택하기 위한 신호 (Active Low)


(2) SPI 통신 과정

SCLK는 Master가 출력하는 클럭 신호이다. SCLK를 기준으로 Master와 Slave 사이의 데이터 교환이 진행된다. MOSI는 Master의 출력으로 Slave로 정보를 보내기 위한 선이다. 반대로 MISO는 Slave의 출력으로 Master가 Slave의 정보를 받기 위한 선이다. 앞의 그림에서 보듯이 Master와 Slave의 MOSI끼리 서로 연결되며 MISO끼리 서로 연결된다. SS는 Master가 Slave를 선택하기 위한 Master의 출력으로 Slave의 /CE 입력에 연결된다. Slave는 /CE 입력이 ‘0’인 동안에만 활성화된다. 

통신을 진행하기 위해서 Master는 우선 SS로 ‘0’을 출력하여 해당 Slave를 활성화시킨다. 그런 다음 Master는 SLCK로 동기를 위한 클럭을 출력하는데 이 클럭에 맞추어 MOSI로 데이터를 한 비트씩 내보낸다. 이와 동시에 Master는 자신이 출력하는 클럭에 맞추어 MISO를 한 비트씩 읽는다. 다시 말해서 SPI Master는 자신의 출력인 SCLK에 맞추어 MOSI로 데이터를 내보내며 동시에 MISO로는 데이터를 수신한다. SPI 버스는 언제나 양방향 통신을 진행한다. SCLK에 맞추어 MOSI로 데이터를 출력하는 동안 MISO로는 데이터가 수신된다. 수신되는 데이터는 상황에 따라 의미가 있는 값일 수도 있고 쓰레기 값일 수도 있다. 마찬가지로 Slave의 데이터를 읽기 위하여 SLCK에 맞추어 MISO로 입력을 받는 동안 MOSI로는 데이터가 출력된다.

보통 SPI 통신은 8 비트 단위로 진행되지만 12 비트나 16 비트 또는 그 이상의 길이가 한 단위가 될 수도 있다. 비트 전송 순서에 대한 규정은 없다. 데이터의 전송은 MSB부터 시작될 수도 있고 LSB부터 시작될 수도 있다. 데이터를 연속 전송하는 경우 한 단위의 데이터를 보낼 때마다 SS 신호를 매번 인가할 수도 있지만 SS 신호를 ‘0’으로 설정한 후 모든 데이터를 다 보낼 때까지 이 상태를 유지하고 있다가 데이터의 전송이 끝났을 때 SS를 ‘1’로 바꿀 수도 있다. SPI 규격은 이런 부분까지 규정하고 있지 않으며 Master와 Slave 사이의 약속에 따라 결정된다. SPI Slave 장치의 용도와 특성에 따라 사용 방법이 다르므로 Slave 장치의 데이터쉬트를 반드시 확인해야 한다.

어떤 마이크로컨트롤러는 설정된 전송 단위에 맞추어 데이터 전송 때마다 자동으로 SS 신호를 출력해 주는 기능을 가지고 있다. ATMEL사의 ARM7 기반 AT91SAM7S 계열 마이크로컨트롤러가 그 예이다. 데이터 전송 단위를 16 비트로 설정했다면 SPI Master가 SCLK 신호를 출력하기 전에 자동으로 SS 신호를 ‘0’으로 내리고 데이터가 출력되는 동안 이 상태를 유지하다 전송이 끝나면 이 신호를 다시 ‘1’로 올려준다. 이런 용도로 사용할 수 있는 SS 핀이 여러 개 있어서 사용자가 선택할 수 있다. 이런 기능이 있으면 정해진 길이의 데이터를 반복해서 출력하는 경우, 예를 들면 주기적으로 DAC에 값을 전송하는 경우에 매우 편리하다. 이런 기능이 없는 마이크로컨트롤러의 경우에는 사용자가 프로그램을 통해 수동으로 SS 신호를 제어해야 한다. AVR 마이크로컨트롤러는 이 기능을 지원하지 않으므로 GPIO 핀을 Slave 선택용으로 정하고 수동으로 그 신호를 제어해야 한다.


(3) 2개 이상의 SPI Slave 연결
: I2C 버스처럼 SPI 버스에서도 한 개의 Master가 두 개 이상의 Slave와 연결될 수 있다. I2C Slave가 고유한 주소를 가지고 있는 것처럼 각각의 SPI Slave는 chip enable (/CE) 신호를 가지고 있다. SPI Master는 각 Slave의 /CE 신호를 제어하여 원하는 Slave를 선택한다. 다음 그림은 한 개의 SPI Master에 두 개의 Slave들을 연결하는 방법을 설명한다.


세 장치의 SCLK, MOSI, MISO는 각각 서로 연결되어 있지만 Slave의 /CE 신호들은 서로 묶이지 않고 Master의 다른 핀들로 연결된다.Slave의 수에 상관없이 한 순간에는 하나의 Slave만 Master와 통신할 수 있다. 두 Slave가 모두 활성화되면 Slave의 출력인 MISO에서 데이터의 충돌이 일어난다. 그래서 Master는 자신이 원하는 Slave의 /CE 신호만 ‘0’으로 설정하여 활성화시키고 나머지 Slave의 /CE는 ‘1’로 두어야 한다. /CE 입력이 ‘1’인 Slave는 선택되지 않았기 때문에 자신의 MISO 출력을 hi-Z 상태로 만들어 선택된 Slave와 Master 간의 통신에 영향을 주지 않는다. 따라서 모든 SPI Slave의 MISO 출력은 3 상태를 지원한다. /CE 입력이 ‘1’인 Slave는 당연히 Master가 출력한 SCLK와 MOSI 신호를 무시한다.
 
세 개 이상의 Slave도 같은 방법으로 Master와 연결할 수 있다. Slave의 수가 하나씩 늘어날 때마다 새로운 Slave를 위한 /CE 신호만 하나 더 필요할 뿐이다. 그런데 이 때 Master에 연결된 Slave들이 사용하는 SPI 모드가 한 가지가 아니거나 비트 전송 순서가 다를 수 있는데 이런 경우에는 통신의 효율이 많이 낮아진다. 가령 어떤 Slave는 모드 0을 사용하고 또 다른 Slave는 모드 1을 사용한다면 Master가 Slave를 바꿀 때마다 동작 모드를 매번 다시 설정해야 한다. 또한 동작 모드가 같아도 비트 전송 순서가 다르다면 마찬가지 문제가 생긴다.
 
Master가 하나의 Slave만 구동한다면 Slave의 /CE 신호를 GND로 고정시켜 두어도 상관없다. 어차피 SCLK, MOSI, MISO를 공유할 다른 Slave가 없기 때문에 이 선들은 하나뿐인 Slave 전용으로 사용된다. 그렇기 때문에 Slave를 항상 활성화시켜 둬도 기능상의 문제는 생기지는 않는다.


(4) 전송 타이밍



(5) SPI의 장단점

○ SPI 버스의 가장 큰 장점으로는 최고 70 MHz에 이르는 빠른 통신 속도와 동시 양방향 통신이 가능하다는 점을 들 수 있다.
전송 데이터 단위에 대한 제약이 없어서 8 비트, 16 비트, 24 비트 등 원하는 길이를 한 워드로 설정할 수 있다. 비트 순서에 대한 제약도없으므로 필요에 따라 MSB부터 전송할 수도 있고 LSB부터 전송할 수도 있다. I2C Slave와 달리 SPI Slave는 자체 주소를 가지고 있지 않으므로 주소 충돌의 문제도 발생하지 않는다.
 
○ I2C 버스와 달리 SPI 버스에는 한 개의 버스 Master만 있을 수 있으며 I2C 버스에 비해 필요한 핀의 수가 더 많다.
SPI 버스는 기본적으로 4 가닥의 선을 사용하며 Master에 연결된 Slave의 숫자가 많아질수록 Slave를 선택하기 위한 SS 핀의 수 역시Slave 수에 비례해서 늘어난다. 또한 I2C 버스의 ACK와 같은 메커니즘이 없어서 Master는 자신이 통신하고 있는 장치가 실제 존재하는지여부를 확인할 수 없다.



※ 출처 : http://eslectures.blog.me/80137860924

'Hardware' 카테고리의 다른 글

led와 저항  (0) 2015.09.08
I2S(Integrated Interchip Sound)  (0) 2015.08.04
I2C(Inter Integrated Circuit)  (0) 2015.08.04
UART란?  (0) 2015.08.04
How to Build an 8-Bit Computer by spel3o  (0) 2015.03.14

I2C(Inter Integrated Circuit)


(1) I2C
:
I2C(Inter Integrated Circuit)버스는 마이크로프로세서와 저속 주변장치 사이의 통신을 용도로 Philips에서 개발한 규격인데 두 가닥의 선을 사용하므로 TWI(Two Wire Interface)라고도 불린다. I2C버스는 양방향 오픈 드레인 선인 SCL(Serial Clock)과 SDA(Serial Data)로 이루어져 있으며, Master-Slave 형태로 동작한다. 속도면에서는 다른 방식에 비하여 현저히 느리지만 하드웨어적으로 간단한 구성과 대화형 protocol을 만들 수 있고 하나의 버스에 많은 수의 노드를 연결 할 수 있다는 큰 장점이 있다.


(2) I2C Interface 구성
SCL은 통신의 동기를 위한 클럭용 선이고 SDA는 데이터용 선이다. Master는 SCL로 동기를 위한 클럭을 출력하며 Slave는 SCL로 출력되는 클럭에 맞추어 SDA를 통해 데이터를 출력하거나 입력 받는다. 단지 SDA 한 선으로만 데이터를 주고 받기 때문에 I2C 버스는 반이중 (half duplex) 통신만 가능하다. SCL 선과 SDA 선은 모두 오픈 드레인므로 두 선에는 각각 풀업 저항을 연결해 주어야 한다.


모든 I2C 매스터와 슬레이브 장치들의 SCL은 서로 연결되며 SDA 또한 서로 연결된다. 모든 장치들이 SCL과 SDA를 각각 공유하고 있으므로 매스터가 슬레이브를 개별적으로 지정하기 위한 방법이 있어야 한다. I2C 버스에서 매스터가 각 슬레이브를 구분하는 수단은 슬레이브의 주소이다. 모든 I2C 슬레이브 장치들은 7 비트의 고유한 주소를 가지고 있으며 매스터는 주소로 원하는 슬레이브를 지정한다. 주소의 길이가 7 비트이므로 매스터는 최대 128 개의 슬레이브 장치들과 연결될 수 있다. 물론 슬레이브 장치들의 주소는 모두 달라야 한다.


(3) I2C 통신방식
: 앞의 그림에는 매스터가 하나 밖에 없지만 I2C 버스에 두 개 이상의 매스터들이 존재할 수도 있다. 버스에 연결된 장치의 수가 아무리 많아도 한 순간에는 오직 하나의 매스터와 하나의 슬레이브만이 통신할 수 있다. 현재 통신을 진행하고 있는 매스터가 버스 소유권을 가지고 있다. 두 개 이상의 매스터가 있는 경우에 현재 버스의 소유권을 가지고 있는 매스터 및 매스터와 통신을 진행하고 있는 슬레이브 장치 이외의 나머지 장치들은 이들의 통신을 방해하지 않아야 한다.

SCL과 SDA는 모두 오픈 드레인이므로 모든 장치들의 SCL과 SDA는 각각 와이어드 AND로 연결 되어 있다. 와이어드 AND 연결에서는 어느 한 장치라도 ‘0’을 출력하면 해당 신호의 상태는 논리 ‘0’이 된다. 만일 SCL이나 SDA에 연결되어 있는 어떤 장치가 논리 ‘0’을 출력한다면 다른 장치가 그 신호의 상태를 논리 ‘1’로 만들 수 있는 방법은 없다. 통신에 참여하지 않은 장치가 SCL이나 SDA로 ‘0’을 출력하면 매스터가 정상적으로 통신을 진행할 수 없다. 이것은 I2C 버스에 연결되어 있지만 현재 통신에 참여하지 않고 있는 장치들은 모두 자신의 출력을 플로우팅 상태로 유지해야 한다는 것을 뜻한다. (플로우팅 상태 : 신호가 low인지 high 인지 알수 없는 상태)

통신이 진행되지 않는 상황에서 모든 장치의 출력은 플로우팅 상태이므로 SCL과 SDA의 상태는 모두 논리 ‘1’이다. 이 상황에서 I2C 버스의 사용을 원하는 매스터는 SCL과 SDA로 시작 조건을 출력하며 버스 소유권을 주장하고 통신을 시작할 수 있다.두 신호의 상태가 모두 논리 ‘1’이 아니라면 현재 다른 매스터가 버스 소유권을 가지고 통신을 진행 중에 있다는 것을 뜻하므로 그 매스터가 버스 소유권을 반납할 때까지는 다른 매스터가 새로운 통신을 시작해서는 안 된다.


(3) 안정화 구간
: 다음 그림은 I2C 프로토콜의 시작 조건, 정지 조건, 그리고 데이터 안정 구간을 보여주고 있다.


I2C 프로토콜에서 SCL이 ‘0’인 구간에서는 SDA의 상태 변화가 허용되지만 SCL이 ‘1’인 구간에서는 SDA는 안정된 논리 상태를 유지해야 한다. Master가 Slave로 데이터를 출력할 때 SCL이 ‘0’인 구간에서 SDA의 비트 전환을 하며 SCL이 ‘1’인 구간에서는 SDA의 상태를 그대로 유지한다. Slave가 데이터를 출력하고 Master가 그 데이터를 읽을 때에도 마찬가지이다. 그래서SCL이 ‘1’인 구간은 데이터가 안정한 구간이다.

I2C 프로토콜에서 SCL이 ‘1’을 유지하고 있는 구간에서 SDA의 상태가 변하는 것은 일반 데이터 전송이 아닌 특별한 조건을 의미한다. SCL이 ‘1’인 동안 SDA가 ‘1’에서 ‘0’으로 바뀌는 것을 시작 조건 (start condition, S)이라고 하며 SCL이 ‘1’인 동안 SDA가 ‘0’에서 ‘1’로 바뀌는 것을 정지 조건 (stop condition, P)이라고 한다. I2C 통신을 원하는 Master는 SCL과 SDA가 모두 논리 ‘1’일 때 SDA의 상태를 ‘0’으로 바꾸어 시작 조건을 출력하며 다른 장치들에게 통신의 시작을 알린다. 마찬가지로 통신을 끝낼 때에는 SCL이 ‘1’인 동안 SDA를 ‘0’에서 ‘1’로 바꾸어 정지 조건을 출력하며 버스 소유권의 반납을 다른 장치에게 알린다.


(4) 패킷형식
: 다음 그림은 I2C 버스에서 사용되는 데이터 패킷의 형식을 보여준다. ACK을 포함한 9 비트가 I2C 규격에서 통신의 기본 단위가 된다.


Master는 SCL과 SDA가 모두 ‘1’인 상태에서 SDA를 ‘0’으로 바꾸어, 즉 시작 조건을 출력하면서 통신의 시작을 알린다. 시작 조건 이후부터는 SCL의 상태가 ‘0’인 구간에서만 SDA의 논리 값이 바뀐다. 매스터가 SCL로 출력하는 클럭에 동기를 맞추어 SDA로는 데이터가 MSB부터 한 비트씩 출력된다. SCL은 항상 Master가 출력하는 신호이지만 SDA는 현재의 동작이 Master의 읽기냐 쓰기냐에 따라 매스터의 출력일 수도 슬레이브의 출력일 수도 있다.

8 비트 데이터가 8 클럭 싸이클 동안 SDA로 출력되면 그 데이터를 수신한 쪽에서 9 번째 클럭에 맞추어 그 8 비트 데이터의 수신 여부를 확인해 주는 ACK 비트를 출력한다. 다시 말해서 ACK 비트는 직전의 8 비트 정보를 수신한 쪽에서 그 정보의 송신자에게 직전 8 비트 정보에 대한 수신 여부를 확인하는 값이다. ACK 비트가 ‘0’이면 정상 수신을 나타내며 ACK 비트가 ‘1’이면 (항상 그런 것은 아니지만) 정상 수신이 아님을 나타낸다. 값이 ‘0’인 ACK 비트와 구분하기 위하여 값이 ‘1’인 ACK 비트를 NACK (no acknowledgement)라고 부르기도 한다.

만일 매스터가 SDA로 8 비트 정보를 출력했다면 그 정보를 수신한 슬레이브가 9 번째 클럭에 SDA로 ACK 비트를 출력하여 매스터에게 수신 결과를 알린다. 이 때 매스터가 ACK 비트를 받으려면 9 번째 클럭 싸이클 동안 자신의 SDA 출력을 ‘1’로 유지하고 있어야 한다. 반대로 SDA로 출력된 8 비트 정보가 슬레이브의 출력이라면 그것을 수신한 매스터가 9 번째 클럭에서 ACK 비트를 출력한다. 이 때 매스터의 ACK 비트를 받기 위해 슬레이브는 자신의 SDA 출력을 ‘1’로 유지하고 있어야 한다.

8 비트 정보와 이어지는 ACK 비트의 전송이 끝난 다음에는 매스터가 정지 조건을 출력할 수도 있고 시작 조건을 다시 출력할 수도 있으며 다음 바이트 전송이 이어질 수도 있다. 다음 동작은 현재 진행 중인 동작이 무엇인가에 따라 달라진다.


(5) 주소 지정 형식
모든 I2C 슬레이브 장치는 7 비트의 고유한 주소를 가지고 있으며 매스터는 이 주소를 사용하여 상대 슬레이브 장치를 지정한다. 다음 그림은 매스터가 슬레이브의 주소를 지정하고 데이터를 주고 받는 방법에 대한 설명이다.



먼저
 Master 시작 조건에 이어서 자신이 원하는 Slave 7 비트 주소를 출력한다버스에 연결되어 있는 모든 Slave 장치들은 SDA 선을 계속 감시하면서 Master가 출력한 주소가 자신의 주소와 일치하는지 여부를 검사한다만일 Master 출력한 주소가어떤 Slave 주소와 같으면  Slave ACK 비트에 0’을 출력하여 Master에게 응답한다. Master 출력한 주소를 가진 Slave 없으면 아무도 ACK 비트로 0’을 출력하지 않으므로 ACK 비트의 상태는 1’을 유지하여 Master NACK 받게 된다.

 

Slave 주소 7 비트 다음에 오는 번째 비트는 다음 동작이 Master 읽기인지 쓰기인지를 가리킨다. Master  비트로 0출력했다면 이것은 Master 쓰기임을 뜻하므로 Slave 주소 다음의 1 바이트 데이터는 Master 출력이다 데이터는 앞서 주소가 지정된 Slave 위한 것이므로  Slave  값을 읽어 들인다. 반면에 Slave 주소 7 비트 다음에 오는 번째 비트가 1이면 이것은 다음 동작이 Master 읽기라는 것을 의미한다그러므로 Master 의해 주소가 지정된 Slave ACK 응답한 이어서 Master에게 보낼 데이터를 출력한다.

 

주의할 것은 Slave 주소는 7 비트이지만 패킷의 상위 7 비트로 정렬되고 마지막에 R/W 비트가 LSB 위치에 추가된다는 것이다.그렇기 때문에 Slave 주소를 왼쪽으로  비트 쉬프트 시킨 후의 8 비트 값을 Slave 주소라고 생각하는 것이  편할 수도있다예를 들면 DS1037이라는 RTC 칩의 I2C 주소는 1101000b으로 고정되어 있다 DS1037 I2C 주소는 0x68이다. DS1037 데이터를 기록해야   Master I2C 버스로 시작 조건을 출력한 다음 11010000b 출력한다. DS1037 데이터를 읽고자 한다면 Master I2C 버스로 시작 조건을 출력한 다음 11010001b 출력한다그러므로 8 비트 값인 0xd0DS1037 쓰기 주소, 0xd1 DS1037 읽기 주소로 생각할 수도 있다.

 

I2C 버스 규격은 I2C 버스의 전기적 특성  타이밍과 함께 앞에서 설명한 시작 조건정지 조건주소 지정 방법 등에 대해서만규정하고 있다구체적인 통신 방법 Master Slave 주소를 출력한 다음 정지 비트를 출력할 때까지 주고 받는 데이터의바이트 , Slave 내부 레지스터 주소 지정 방법 등은 Slave 장치에 따라 달라진다매우 다양한 종류의 I2C Slave 장치가 있으니 여러 가지 다양한 방법이 있을  있다.

 

대부분의 마이크로컨트롤러는 I2C 인터페이스를 지원한다그렇기 때문에 UART 사용할 때와 비슷하게 I2C 관련  개의 레지스터를 설정한  레지스터 읽기/쓰기를 통해 간단하게 I2C 통신을 실행할  있다마이크로컨트롤러가 I2C 인터페이스를지원하지 않으면 프로그램을 통해 비교적 쉽게 I2C 프로토콜을 구현할  있다?수신 타이밍을 정확하게 맞추어야 하는 비동기 통신과 달리 Master 출력하는 클럭에 맞추어 모든 동작이 이루어지므로 타이밍에 관련된 어려움이 특별히 없기 때문이다.


(6) I2C 통신의 예
: 직렬 EEPROM, ADC, DAC, RTC 등을 포함한 다양한 매우 장치들이 I2C 인터페이스를 지원하고 있다. I2C 슬레이브 장치와 통신을 하려면 그 슬레이브의 데이터쉬트를 참고하여 구체적인 통신 방법을 이해해야 한다. 다음 그림은 24LC64라는 64 Kbit 직렬 EEPROM의 내부 데이터를 읽기 위한 여러 방법 중 하나이다.



24LC64의 주소는 1010A2A1A0b로 정해져 있다. 앞 4 비트는 1010로 고정되어 있지만 뒤의 3 비트 A2A1A0는 사용자가 임의로 바꿀 수 있다. 주소의 마지막 3 비트를 사용자가 조절할 수 있도록 24LC64는 이 3 비트에 각각 대응되는 3 개의 입력 핀 A2, A1, A0을 가지고 있다. 주소의 일부를 사용자가 정하도록 만든 것은 24LC64에 여러 가지 다른 주소를 부여할 수 있도록 하기 위한 것이다. 만일 24LC64의 주소가 완전히 고정되어 있다면 I2C Master가 구동할 수 있는 24LC64는 1 개뿐이다.

위의 그림은 24LC64의 저장된 값을 특정 주소부터 연속으로 읽는 방법이다. 맨 먼저 Master는 시작 조건을 출력한 다음 24LC64의 7 비트 주소를 출력하고 8 번째 비트로 ‘0’을 출력하여 다음 동작이 쓰기라는 것을 알린다. Master가 지정한 주소와 동일한 주소를 가진 24LC64가 있다면 그 IC는 ACK을 출력하여 Master에게 응답한다. ACK을 받은 Master는 이어서 24LC64의 저장 공간 중에서 자신이 원하는 주소를 MSB부터 연속해서 출력한다. 24LC64의 저장 용량은 64 Kbits, 즉 8 K 바이트이므로 내부 주소 지정을 위해서는 13 비트의 주소 정보가 필요하다. 그러므로 Master는 두 번에 걸쳐 주소를 출력한다. 매 바이트를 받을 때마다 24LC64는 Master에게 ACK을 보낸다. 

24LC64 내부의 주소를 출력한 후 ACK을 받으면 Master는 시작 조건과 Slave 주소를 다시 한 번 더 출력한다. 그런데 이번에는 Master가 24LC64의 데이터를 읽을 차례이므로 7 비트 Slave 주소 다음에 오는 8 번째 비트는 ‘1’로 설정한다. 24LC64가 다시 Master에게 ACK으로 응답하면 그 다음부터 Master는 24LC64가 출력하는 데이터를 연속해서 읽는다. 24LC64의 출력을 1 바이트 받을 때마다 Master는 ACK을 출력하여 이를 24LC64에게 알린다. ACK을 받은 24LC64는 내부에서 주소를 1 증가시키고 새로운 주소의 데이터를 읽어서 다음 SCL 클럭에 맞추어 출력하게 된다. 데이터를 연속해서 수신한 Master는 자신이 원하는 마지막 데이터를 받으면 이번에는 NACK을 출력하고 이어 정지 조건을 출력하여 통신을 끝낸다.

위의 예는 I2C 통신을 사용하는 24LC64를 사용하기 위한 많은 방법들 중 하나일 뿐이다. I2C 인터페이스를 가진 장치마다 사용법이 다르기도 하거니와 한 장치에서도 명령의 종류에 따라 다양한 방법이 있을 수 있다.


(7) I2C의 장단점

○ I2C 버스의 가장 큰 장점으로 Slave 장치의 수에 관계 없이 두 가닥의 선만으로 Master와 Slave 사이의 양방향 통신이 가능하다는 것을 들 수 있다. 두 개 이상의 Master를 사용할 수 있다는 사실은 I2C 버스가 가진 또 다른 장점이다. 
 
○ 반면에 I2C 버스의 양방향 특성은 오픈 드레인 구조에 기반을 두고 있으므로 근본적으로 동시 양방향 통신이 불가능하고 통신 속도를 높이기 어렵다. 표준 모드에서 I2C 통신의 최대 속도는 100 kHz이며 고속 모드에서는 최고 400 kHz까지 가능하다. 다른 동기 통신 프로토콜, 예를 들어 뒤에서 설명할 SPI와 비교하면 매우 낮은 속도이므로 I2C 버스는 저속 주변장치와의 데이터 통신이나 주변 장치의 동작 모드 설정 등의 용도로 많이 쓰인다. 동작 모드 설정은 사용 빈도가 높지 않기 때문에 낮은 속도가 별 문제가 되지 않는다.
 
○ I2C 인터페이스를 사용하는 제품의 수는 무척 많은 반면 Slave의 주소는 7 비트로 그 길이가 제한되어 있어서 다수의 Slave 장치를 사용할 때 Slave 주소가 충돌할 가능성이 있다. 이런 문제에 대한 해결책으로 Slave 주소의 하위 2 ~ 3 비트를 사용자가 임의로 설정할 수 있는 제품들이 많기는 하지만 주소가 7 비트로 제한되어 있어서 근본적인 해결책이 될 수는 없다.





※ 출처 : http://eslectures.blog.me/80137860924

'Hardware' 카테고리의 다른 글

I2S(Integrated Interchip Sound)  (0) 2015.08.04
SPI(Serial Peripheral Interface Bus)  (0) 2015.08.04
UART란?  (0) 2015.08.04
How to Build an 8-Bit Computer by spel3o  (0) 2015.03.14
led는 안다리가 짧은게 vcc  (0) 2015.01.03

Universal

 

UART 시스템은 과거로 거슬러 올라가 1840년대 최초의 전신 시스템에서 부터 시작되었다고 볼 수 있습니다.

Morse 코드 신호는 송신기에서 수신기로 전류를 통해 흘러가지만 보통 시각적으로 보기 좋게 하기 위해 종이에 수신된 메시지를 찍도록 하였습니다.

전류가 흐르면 '점'을 찍도록 하고, 전류가 흐르지 않으면 '공백'으로 처리 되었습니다.

 

 

컴퓨터에서는 전류를 감지하는 방법에서 전압을 측정하는 방식으로 바뀌었습니다. RS-232 표준은 Logic high(negative voltage) 가 '점'으로 표시되는 것이며, Logic Low(positive voltage) 가 공백으로 표시되는 것이라 보면 될 것입니다.

하지만 보통의 CPU는 negative voltage를 사용하기 어렵고 전압 레벨도 다르기 때문에, CPU 자체적인 UART 통신은 TTL(the transistor logic) 신호를 사용합니다. TTL 레벨에서는 3.3V 가 '점'으로 표시되며 0V는 '공백'으로 표시됩니다.

이처럼 트랜지스터의 사용으로 쉽게 만들 수 있는 시스템이라 하여 Universal 이라는 이름이 붙여진 것이라 볼 수 있습니다.

 

 

Asynchronous

 

이제는 비동기(Asynchronous)가 의미하는 바를 살펴 봅시다.

송신자가 메시지를 전송하려고 해도 수신자가 받을 준비가 되어 있지 않다면 아무 소용 없는 일 일 것입니다. 병렬 통신의 경우 한 순간에 하나의 글자가 만들어 질 수 있습니다. 하지만 직렬 통신(Serial Communication)의 경우에는 하나의 글자가 만들어 지는데 시간이 걸립니다. 그렇기 때문에 송신자가 글자를 보내면서 데이터를 보내고 있다는 신호를 지속적으로 주게 됩니다. 이것이 동기 통신(Synchronous Communication)입니다. 하지만 동기 통신은 데이터 라인 말고도 동기를 위한 신호선이 추가로 필요합니다. 신호선 하나 추가하는 것이 의외로 복잡한 일일 수 있습니다.

송신자와 수신자가 동일한 시계를 가지고 있다면 어떨까요?

예를 들어 내가 11시 30분부터 10초 단위로 한글자씩 보낼 것이니 잘 받아라 라는 프로토콜(약속) 을 정해 놓고 10초 단위로 한 글자씩 받으면 신호선을 추가하지 않고도 보낼 수 있지 않을까요?

이것이 바로 비동기 통신(Asynchronous Communication) 입니다. UART 에서는 서로 Baud Rate를 정해 놓고 통신을 하기 때문에 동일한 시계를 사용한다고 볼 수 있겠죠.

Baud Rate에 오차가 있으면 어떻게 될까요?

 

 

위 그림에서 보듯이 시간의 오차가 커질 수록 데이터의 오차 확률도 높아진 다는 것을 알 수 있습니다. 위 그림에서 흰색 점이 통신의 확인 시점이라고 보시면 되는데요 5~6% 오차가 발생하는 시점부터 x 에러가 발생하는 것을 확인할 수 있습니다. Baud Rate라고 하는 시간을 정확하게 맞춰야 하는 이유겠죠

 

 

Receiver-Transmitter

 

UART는 하나의 장치에 송신기와 수신기를 붙여 놓은 것이라 볼 수 있습니다. 예전에 Morse Code를 보내는 장치는 송신기에서 데이터를 보내고 수신기에서는 데이터를 받는 것이었습니다.

이러한 장치는 단방향 통신밖에 할수가 없습니다. 그럼 양방향 통신을 하기 위해서는 어떻게 해야 할까요? 하나의 장치만 추가하면 되겠죠?

그래서 송신기와 수신기를 붙여 놓으면 양방향 통신을 할 수 있는 것입니다.

그렇다면 프로토콜을 한번 볼까요?

 

 

처음 Start bit가 있고 마지막에 Stop bit가 있습니다. High로 유지되다가 데이터가 송수신 시작 되는 시점에 Low(Start bit) 가 되고 8비트 데이터를 보낸 후에 Parity 비트를 옵션으로 넣을 수 있습니다.

마지막에는 High(Stop bit) 가 됩니다. 여기에서 Stop bit는 그 다음 데이터와의 시간 간격을 위해서 1~2bit로 설정할 수 있습니다.

그래서 8비트 데이터를 보낸다고 했을 때 최소 10bit 에서 12bit까지 시간을 소모할 수 있습니다. 여기에서 시간이라 표시한 의미는 알겠죠? Baud Rate 에 따라서 위의 그림에서 하나의 칸의 시간을 결정할 수 있는 것입니다. 즉 9600bps 라고 하는 것은 1초에 9600칸 또는 bit를 보낼 수 있다는 것을 의미합니다.

 

출처 : http://www.mcublog.co.kr/1841


'Hardware' 카테고리의 다른 글

SPI(Serial Peripheral Interface Bus)  (0) 2015.08.04
I2C(Inter Integrated Circuit)  (0) 2015.08.04
How to Build an 8-Bit Computer by spel3o  (0) 2015.03.14
led는 안다리가 짧은게 vcc  (0) 2015.01.03
간단한 레귤레이터 만들기 11V->5V  (0) 2014.12.30
Picture of How to Build an 8-Bit Computer
Building an 8-bit TTL computer sounds like a daunting and complicated task, or at least it did to me when I started out on my journey to understand the architecture of a basic CPU. When it comes down to it, a CPU is fairly simple in operation once you learn the fundamentals behind all of its processes. This project is intended to help anyone interested in building their own computer and gaining the wonderful knowledge that comes along with the process. Don't be afraid to try, you can only learn.

This project will start off by describing the basics of electronics. After that, the fundamentals of binary and boolean logic will be described. Lastly we will then move onto the function of the various parts of a simple-as-possible computer (with a few modifications) as described in Malvino's text Digital Computer Electronics. This means that the end product of this Instructable will be a computer that you can program with a unique instruction set. This project also leaves many of the design aspects of the computer up to you and serves as a guide for building your own computer. This is because there are many ways to approach this project. If you already have a sound understanding of boolean logic and the workings of binary feel free to skip to the meat of the project. I hope that you all enjoy and get something out of a build like this, I know that I sure did.

For this project you will need:

1.) A power supply
2.) Breadboards + lots of wires
3.) LED's for output
4.) Various logic IC's (discussed later)
5.) Free time
6.) A willingness to mess up and learn from mistakes
7.) A lot of patience

Optional (but very useful):

1.) Oscilloscope
2.) Digital multimeter
3.) EEPROM programmer
4.) Sonic screwdriver

Useful Links for a Project Like This:

Digital Computer Electronics: 
http://www.amazon.com/Digital-computer-electronics-Albert-Malvino/dp/007039861
TTL Cookbook: http://www.amazon.com/TTL-Cookbook-Understanding-Transistor-Transistor-Integrated/dp/B0049UUV38
 
Remove these adsRemove these ads by Signing Up

Step 1: What Is a Computer?

Picture of What Is a Computer?
This may seem like a very simplistic question that does not need answering when, in fact, it is a question that many people do not know the true answer to. Computers have existed a lot longer than the transistor in mechanical and theoretical form. The actual definition of a computer was thought up by a very intelligent individual by the name of Alan Turing. He described a machine that was termed the Turing Machine. Every computer that we use today, from the computer or cell phone that you are reading this on to supercomputers all can be classified as a Turing Machine at their most simplistic level.

What is a Turing Machine? A Turing Machine consists of 4 parts: the tape, head, table and state register. To visualize the operation of such a machine you first have to imagine a film strip spanning infinitely in each direction. Now imagine that each cell of this film strip can contain only one of a defined set of symbols (like an alphabet). For this example let us imagine that each cell can only contain either a "0" or a"1". These cells can be rewritten an infinite amount of time but retain their information indefinitely until they are changed again. The part of the Turing Machine known as the head can write symbols to the cells as well as either increment or decrement its position on the film strip by a given integer (whole number) of cells. The next part is the table which holds a given set of instructions for the head to execute such as "move right 4 cells" and "set cell to 1". The fourth and final part of a Turing Machine is its state register whose purpose is to hold the current state of the machine. The state includes the instruction as well as the current data on the tape.

That is how simple the operation of a computer is. When your computer operates, it is actually operating as a turing machine. It processes data held on your computer by a given set of instructions and algorithms. The computer described in this Instructable is a very simplistic model of a computer, but it still operates as one that you can program with a set of instructions that it will follow and execute.

Useful Links:

Wikipedia on Turing Machines: 
http://en.wikipedia.org/wiki/Turing_machine

Step 2: An Introduction to Electronics

Picture of An Introduction to Electronics
M200106P01WL.jpeg
resistor-color-code-all.gif
27_01_Resistors_in_series_and_parallel.jpeg
Transistor.jpg
Before building an 8-bit computer, it is extremely useful to have a grasp on the elemental properties of electricity and analog circuitry. There are parts on the computer you will build will need analog components. There are many electronics self teaching guides available for a minimal cost that provide a crash-course in electrical engineering. I personally found Electronics Self Teaching Guide by Harry Kybet and Earl Boysen to be a wonderful book for tackling the world of analog electronics.

Electronics Self Teaching Guidehttp://www.amazon.com/Electronics-Self-Teaching-Guide-Teaching-Guides/dp/0470289619/

Common Components:

Resistor - Limits current, measured in ohms.

Capacitor - Stores charge, can either be polar or non-polar (polar meaning that it must be placed in the correct direction to work). Measured in farads.

Diode - Only allows current to flow in one direction, breaks down at a certain voltage when placed in the wrong direction.

Transistor - A current gate that is controlled by a third pin that acts as a mediator. There are many types of transistors, but here we will be talking about the BJT (bipolar junction transistor) which comes in two types: NPN and PNP.


Current, voltage and resistance go hand-in-hand in a circuit. The relation between the three can be expressed with Ohm's law: V = IR. In other words, Voltage equals the current in amperes multiplied by the resistance in ohms. Ohm's law is one of the most important formulas in electronics and it is well worth knowing off of the top of your head.

To apply Ohm's law you need to know the resistance of a circuit. To find the value of a resistor you have to use its color code. The resistor color code is based upon the visible spectrum and can be memorized in many different fashions. For those who don't care to memorize it, there is a plethora of tools that exist to help you find the correct value for your resistor. To calculate total resistance in a circuit you need two formulas for two different configurations of resistors: series and parallel. In series one resistor follows the other one, whereas in parallel they work alongside each other. In series the formula is very simple:

Resistors in Series: R(total) = R(1) + R(2) + . . . + R(N)

Meaning that you just have to add up the values of the resistors.

Resistors in Parallel: R(total) = 1/{ 1/R(1) + 1/R(2) + . . . + 1/R(N) }

A good tool to find resistance from color code: http://www.csgnetwork.com/resistcolcalc.html

It is easier to understand the formula for resistors in parallel if you think of the resistors as working together like two people working together on a project. The same formula is used for word problems where you are given the rate at which two person operate and you must find out how fast their project will be completed if the work together.

To find how much current is supplied to a given component with a given resistance value you would simply plug in the resistance and voltage values into Ohm's law and solve for I. For instance:

A light is in a circuit and and two 1K (one thousand ohm) resistors are placed in front of it in parallel. With a power supply of 9 volts, how much current is supplied to the light?
1.) Calculate R(total):
R(total) = 1/( 1/1000 + 1/1000 ) = 1/( 2/1000) = 1000/2 = 500 ohms
2.) Calculate current using Ohm's law:
9 = I * 500
I = 9/500 = .018 A = 18 mA (milliamps)

You can also arrange resistors in a circuit to regulate voltage. This is called a voltage divider and involves two resistors in series. The voltage output of the two resistors is at their junction. For a better idea, look at the picture that I have attached. In this arrangement the formula for voltage output is:

V(out) = V(source) * R(2)/{ R(1) + R(2) }

Capacitors will be useful in your computer with the construction of the clock. The clock is simply a circuit that turns on and off at a constant rate. Just like resistors, capacitors have two formulas for finding the total value for both series and parallel configurations.

Series: C(total) = 1/{ 1/C(1) + 1/C(2) + . . . + 1/C(N) }

Parallel: C(total) = C(1) + C(2) + . . . + C(N)


The rate at which a capacitor charges depends upon the resistance of the circuit before (or after if you are discharging) the capacitor as well as its capacitance. The charging of a capacitor is measured in time constants. It takes 5 time constants to fully charge or discharge a capacitor. The formula for finding the time constant of a capacitor in seconds is:

T(constant) = Resistance * Capacitance

Diodes are simple in operation and come in handy when building a TTL computer. They only allow current to flow in one direction. When they are placed in the correct direction they are what is called forward-biased. When they are reversed they break down at a certain voltage. When a diode is working against the current it is reverse-biased.

A Transistor operates like a valve that is operated by current. A BJT has three pins: the collector, the emitter and the base. For sake of simplicity in this step I will describe a NPN transistor in which current flows from the collector to the emitter. The current applied at the base controls how much of the current flows from the collector to the emitter. Transistors are ideal for many applications due to their ability to amplify a signal. This is because the current applied at the base of the transistor can be considerably less than the current controlled. This gain in current is called the current gain of the transistor, or beta. The formula for beta is:

Beta = Current(Collector)/Current(Base)

When a transistor is completely on it is said to be saturated. A boolean transistor is one that is either in its saturated or off state and never in between. This is the type of transistor that you will be dealing with mostly in digital electronics. Transistors form the logic gates needed for a computer to function. These will be described later.

Useful Links:

http://en.wikipedia.org/wiki/Resistor
http://en.wikipedia.org/wiki/Capacitor
http://en.wikipedia.org/wiki/Diode
http://en.wikipedia.org/wiki/Transistor


Step 3: Binary Numbers

Picture of Binary Numbers
Today we are used to a worldwide numbering system that is based on the number ten. By that I mean that we have no numeral in our number system that is worth the value of ten and thus our number system is base ten.

Think of our number system as an odometer. An odometer counts from the lowest digit to the highest digit and then forces the next rotor in sequence to advance one place. For example:

0 1
0 2
0 3
0 4
0 5
0 6
0 7
0 8
0 9
1 0 <-- Carry to the next digit

Binary is base two, meaning that it only has two numerals and has no numeral for 2. Binary only has the numerals 0 and 1 or "off" and "on". To count in binary you simply apply the odometer technique:

0001b - 1
0010b - 2
0011b - 3
0100b - 4
0101b - 5
0110b - 6
0111b - 7
1000b - 8
etc . . .

There is another factor of our number system that makes it base ten; as we move higher in digits the weight of numerals increase by a power of ten. For example 1 = 10^0, 10 = 10^1, 100 = 10^2, etc . . . In binary, things of course are base two and as such, each successive numeral is another power of two. 1b = 1 = 2^0, 10b = 2 = 2^1, 100b = 4 = 2^2, etc . . .

To convert a decimal number to binary there is a simple trick known as double-dabble that makes the process a lot more easy:

Say we want to convert 13 to a binary number, we start by dividing 13 by two and writing down the remainder. Then directly above it you write down the resulting number without the remainder (6 in this case) and divide that by two and write down the remainder above the previous one. You continue this process until you reach either a 1 or a 0. At the end you read from the top down to get the result.

1/2   = 0 R1  < Read from top to bottom. The result is 1101 or 2^0 + 0 + 2^2 + 2^3 = 1 + 0 + 4 + 8 = 13. This is called a binary word.
3/2   = 1 R1  <
6/2   = 3 R0  <
13/2 = 6 R1  <

Hexadecimal is used very often with binary. Hexadecimal is base 16 and contains the numerals 0-9 and a-f. One hexadecimal numeral is used to describe one nibble or four bits of data. A bit is a single 1 or 0 of binary. A nibble can count from 0 to 15 (0000 to 1111) before the next bit is in the next nibble. Two nibbles together is a byte or 8 bits. Since the first numeral is 2^0, the last numeral is weighted 2^7. Therefore a byte can be anywhere in the range from 0 to 255. To express the byte 00101110 (46 in decimal) in hexadecimal you would first separate the two nibbles into 0010 and 1110. The first nibble has a value of 2, and the second one has a value of E (or 14 in decimal). Therefore the byte 00101110 in hexadecimal would be 2E.

Useful Links:

http://en.wikipedia.org/wiki/Binary_numeral_system
http://en.wikipedia.org/wiki/Hexadecimal

Step 4: Logic Gates

Picture of Logic Gates
3statbuf.gif
SR-NOR-latch.png
A computer consists of thousands of logic gates arranged to carry out certain functions. A logic gate is a component in digital electronics whose output depends on the state of its inputs. Most logic gates have two inputs and one output. You can think of logic gates as the decision-makers in digital electronics. The six main logic gates used in digital electronics are:

AND Gate: Output is high when all if its inputs are high.

OR Gate: Output is high when any of its inputs are high.

NOT Gate: Only has one input. Output is high when its input is low.

NAND Gate: Output is high unless all of its inputs are high.

NOR Gate: Output is high when none of its inputs are high.

XOR Gate: Output is high when an odd number of inputs are high.


Tri-State Buffer: A buffer that is controlled by a third logic signal.

It is important to mention now the difference between a high "1" signal and a low "0" signal. A high signal can either be a connection to positive voltage or it can be a floating input. A floating input is one that is not connected to any output. An example of a floating input would be one that is not connected at all or one that is connected to the output of a 3-state buffer that is not activated. A low signal is present when an input is at ground.

Logic gates can be fed into each other to produce almost any function imaginable. For instance, two NOR gates can be fed into each other to store one bit of data in a RS_NOR latch while power is supplied to the circuit.

Step 5: Binary Counting (The Program Counter)

Picture of Binary Counting (The Program Counter)
article1.gif
One of the most essential parts to a computer is its program counter. The program counter provides the computer with the current address of the instruction to be executed. In order for the program counter to work, however, it needs to count in binary. To do this JK flip flops are used. A flip-flop is an arrangement of logic gates that stores one bit (like the RS_NOR latch described in the logic gates step). A JK flip-flop changes its state when its clock pulse input goes high and then low again (its J and K inputs also have to be high). In other words, whenever a JK flip flop gets the falling edge of a clock pulse its state changes from either a "0" to a "1" or from a "1" to a "0".

If you connect the output of one JK flip flop to another and cascade them the result is a binary counter that acts like an odometer. This is because as the first JK flip flop in the sequence goes high, and then low, it triggers the next one in the sequence. The clock's frequency (how many times it turns on and off a second) is halved with every successive addition of a JK flip flop. That is why a JK flip-flop is also called a divide-by-two circuit. The resulting pattern for four JK flip flops will be 0000, 0001, 0010, 0011, 0100, etc . . .

For the simple-as-possible computer described in this Instructable, however, there are a few more functions that you need in order to make the computer operational. In order for the computer to be able to restart its program it needs the ability to clear or set all of its outputs to zero. The program counter also needs the ability to load a binary word for the JMP op code which allows the computer to jump to a certain instruction. Logic gates are used to achieve this goal. Fortunately for us binary counters come in convenient chips with all of the functions that you need.

Step 6: Registers

Picture of Registers

Registers:

Registers could potentially be the most important part of a computer. A register temporarily stores a value during the operation of a computer. The 8-bit computer described in this Instructable has two registers attached to its ALU, a register to store the current instruction and a register for the output of the computer.

Depending on the chip, a register will have 2 or 3 control pins. The registers that we will be using have two control pins: output enable and input enable (both active when low). When the output enable pin is connected to ground the currently stored binary word is sent out across the output pins. When the input pin is connected to ground the binary word present on the input pins is loaded into the register.

An example of the use of a register on a computer is the accumulator on the ALU (arithmetic logic unit that performs mathematical operations). The accumulator is like the scratchpad for the computer that stores the output of the ALU. The accumulator is also the first input for the ALU. The B register is the second input. For an addition operation, the first value is loaded into the accumulator. After that the second value to be added to the first value is loaded into the B register. The outputs of the accumulator and B register are fused open and are constantly feeding into the ALU. The final step for addition is to transfer the output of the operation into the Accumulator.

Registers all operate on a shared data line called the bus. The bus is a group of wires equal in number to the architecture of any CPU. This is really putting the horse before the cart considering bus width is the defining measurement for CPU architecture. Since a digital 1 means positive voltage, and a 0 means grounding, it would be impossible to have all registers share the same bus without giving them the ability to selectively connect and disconnect from the bus. Luckily for us, there is a third state between 1 and 0 that is ambivalent to current imput that works great for this. Enter the tri-state buffer: a chip that allows you to selectively connect groups of wires to a bus. Using some of these tri-state-buffers, you can have every register and chip on the entire computer needing of communication share the same wires as a bus. In the case of my computer, it was an 8-wire wide band of breadboard slots that spanned the bottom pins of the breadboard. Experiment around with busses, since they carry all of the information from piece to piece in the computer a faulty buss could mean erroneous data that ripples down the line.

Step 7: The ALU

Picture of The ALU
adder-subtractor-circuit.gif
Image1.gif
DSC01798.JPG
Scan 2 copy.jpg
The ALU (arithmetic logic unit) of a computer is the part that executes mathematical operations. For the SAP computer it will only need to have two functions: addition and subtraction. Adding and subtracting in binary works very similarly to addition and subtraction in decimal terms, for example:
  1<-- Carry           1  1 <-- Carry Bits
  05                         0101
+05                      +0101
  10                         1010

To add binary we need what is called a full-adder. A full-adder effectively adds one bit of binary to another with a carry in and carry out. The carry in of a full adder is like a third input for the addition process. They are used to chain multiple full-adders together. The carry out of a full-adder occurs when there is a pair of ones in the addition process. The carry out of a full adder is fed into the carry in to add multiple bits of binary. To construct a full adder you need two XOR gates, two AND gates and an OR gate.

To subtract binary we need to convert a number to its negative counterpart and add it to the number we are subtracting from. To do this we use what is called 2's compliment. To take the 2's compliment of a binary word you invert each bit (change every 0 to a 1 and every 1 to a 0) and add one.

5 = 0101, -5 = 1010+1 = 1011

         Not used-->1    1   
   10                           1010
+(-5)                        +1011
  5                               0101

To control the inversion of bits we use XOR gates with one normally low input. With one normally low input, the output is equivalent to the other input. When you set the control input high you invert the other input. If we couple this inversion with a bit sent to the carry in of the full adders a subtraction operation is the result.

Step 8: Program Memory and RAM

Picture of Program Memory and RAM
The program memory of your computer will store the instructions to be executed. It will also act as RAM that can store values during the operation of the computer. The program memory consists of three main parts: the memory, the memory address register (MAR) and the multiplexer. The memory is a chip that has 16 bytes of storage. There is a four bit address that is fed into the memory that tells it what byte it should read or write. The MAR stores the current address for the byte to be read or written from the memory. It is constantly feeding into the memory chip unless the computer is in its programming state. A multiplexer allows you to choose between two inputs and output the given input. The multiplexer used in my computer allows you to select from two four bit inputs (the MAR and a manual input). When the computer is in its programming state the manual address is fed into the memory and allows you to program bytes into the computers memory at the address that you define.

Step 9: Instruction Register

Picture of Instruction Register
The instruction register of a computer stores the current instruction as well as an address that the instruction will operate on. It is a very simple component with a very important purpose. During the operation of the computer, the content of a given address in memory is transfered into the instruction register. In my computer the leftmost fout bits are the OP code or current instruction to be carried out. The right four bits, or lowest four bits, tell the computer what address to use for the operation. The first four bits constantly feed the OP code into the control matrix which tells the computer what to do for a given instruction. The rightmost four bits feed back into the computer so that the address can be transferred into the MAR or program counter.

Step 10: Output Register

Picture of Output Register
DSC01809.JPG
If a computer were to just feed the output of the bus to the operator, the readout would make little to no sense. This is why there is an output register whose purpose is to store values meant for output. The output for your computer can either be simple LED's that display raw binary, or you could have a display that reads out actual numbers on seven-segment displays. It all depends how much work you want to put into your computer. For my computer I am using some IV-9 Russian Numitron tubes for the output of my computer coupled with an Arduino to do the conversion from binary to decimal.

Step 11: Clock

Picture of Clock
Every part in the computer has to be completely synchronized in order to function correctly. In order to do this your computer needs a clock or a circuit that has an output that turns on and off at a constant rate. The easiest way to do this is to use a 555 timer. The 555 timer is an extremely popular timer that was invented in the era of the emergence of the computer that is stille extremely popular with hobbyists today. To build the 555 circuit you need to know how one operates.

The clock for your computer should be relatively slow at first. 1Hz, or one cycle per second, is a good starting value. This allows you to view the operation of your computer and check for any errors. The 555 chip needs two resistors and a capacitor for operation. The two resistors determine how long the high and low pulses are as well as the overall frequency. The capacitor changes the pulse length for both. If you do not have any experience with 555 timers I recommend experimenting with them.

Useful Links:

http://en.wikipedia.org/wiki/555_timer_IC

Step 12: Architecture

Picture of Architecture
DSC01850.JPG
SAP1Architecture.jpeg
This is the step where everything comes together. It is time to design the architecture of your computer. The architecture is how the registers and different components of your computer are organized. The design aspect is completely up to you, although it helps to keep a goal in mind (what you want your computer to do) and a model to go off of. If you want to design your computer after mine it is completely fine. I modified the architecture of the SAP-1 found in Digital Computer Electronics for my 8-bit computer.

One design aspect to always keep in mind is how data is transferred between the various components of your computer. The most common method is to have a common "bus" for all of the data on the computer. The inputs and outputs of the registers, ALU, program counter and RAM all are connected to the computer's bus. The wires are arranged in order from least significant bit (1) to highest significant bit (128).

Any and all outputs that are connected to the bus have to be completely disconnected while inactive or else they would merge with each other and result in erroneous output. To do this we use Tri-state buffers to control the output of certain elements that output by default like the accumulator, ALU and actual input for the programming of the computer.

Step 13: Control Matrix

Picture of Control Matrix
The control matrix of a computer tells each individual part when to take input and output its value. There are multiple states of each operation in a computer. These states are triggered by a type of counter called a ring counter. A ring counter only has one bit high at a time and cycles through its outputs consecutively. For instance, if a ring counter has 4 outputs it will first have its first output active. At the next clock pulse it will set its second output high (and the first low). The next clock pulse will advance the bit one output higher and so on. These stages are called T states. The computer in this Instructable uses 6 T states for the operation of one command. The first three T states are what is called the fetch cycle in which the current instruction is fetched and placed into the instruction register. The program counter is also incremented by one. The second set of three T states depends on what OP code is fed into the control matrix from the instruction register. The T states are as follows:

T1: The contents of the program counter are transferred into the memory address register. (Address State)
T
2: The program counter is incremented by one. (Increment State)
T3: The addressed byte in the program memory is transfered into the instruction register. (Memory State)
T4: Dependent on what command is being executed.
T5: Dependent on what command is being executed.
T6: Dependent on what command is being executed.

There are two primary ways to create a control matrix: using discrete logic and using ROM's. The ROM method is the easiest and most efficient. Using discrete logic involves designing a massive logic schematic that will output the correct control words for your computer based on an OP code input. ROM stands for read-only-memory. There are several types of ROM's that you can consider for use in your build. For my computer I originally used EEPROM (electronically erasable programmable ROM) but then shifted to NVRAM (non-volatile random access memory) after the EEPROM chips failed to write. I do not recommend NVRAM as it is meant for random access memory and not permanent storage. EEPROM is the most efficient solution in my opinion.

The control matrix will have three ROM chips each having at least 32 addresses of 8 bit storage (as well as the timing and counting elements). The binary word that is sent out from the control matrix is called the control ROM and contains all of the control bits for every component of your computer. You want to be sure to organize the control bits and know their order. For no operation you want a control word that renders every part of the computer inactive (except the clock of course). The control word for the computer described in this Instructable is 16 bits in length and is stored in two of the control ROM chips. The first three addresses of the control ROM chips hold the control words for the fetch cycle. The rest of the addresses on the chip hold the control words in pairs of three for each OP code. The third ROM chip holds the memory location for the start of the control word sequence for each OP code and is addressed by the OP code itself. For instance, in my computer if you give the control the OP code 0110 it will output binary 21, which is the address of the start of the JMP command. There is an 8-bit counter in between the OP ROM and the control ROM's that counts from 0-2 (first three T states) then on the third T state loads the address outputted by the OP ROM and counts from that position until the T1 state clears the counter again. The ring and binary counter for the control matrix are controlled by an inversion of the clock pulse so that control words are present when the rising clock pulse goes to the elements of the computer. The entire process in order is as follows:

1.) T1 state clears the counter to 0, the control word stored at 0 is sent out
2.) The clock goes high and the address state takes place
3.) The clock goes low and in turn the control counter increments and control word 1 is sent out
4.) The clock goes high and the increment cycle takes place
5.) The clock goes low and the control counter increments to 2, control word 2 is sent out
6.) The clock goes high and the memory state takes place and the OP code arrives at the instruction register, T3 is also active which means on the next low clock pulse the OP control address will be loaded
7.) The clock goes low and loads the counter with the address for the first of the three control words for the given OP code
8.) T4, T5 and T6 execute the OP code
9.) T1 resets the counter, the process continues until a HLT OP is received. The HLT command stops the clock.

Step 14: Microprogramming

Picture of Microprogramming
DSC01805.JPG
DSC01824.JPG
Now is the part where you decide what commands you want your computer to be capable of. I gave my computer 6 unique operations that would give it the basic programming functions that I would need. The commands that you will program into your computer are what is called Assembly language. Assembly is one of the earliest programming languages and can still be used on computers today. Commands in the language include loading the accumulator, adding, moving, outputting and storing variables. Each command has its own 4-bit OP code in this 8-bit computer. The commands that I chose for my computer are:

NOP: No operation. (0000)
LDA: Load the accumulator with the value at this address. (0001)
ADD: Add the value at the specified address to the value in the accumulator. (0010)
SUB: Subtract the value at the specified address from the value in the accumulator. (0011)
STO: Store the accumulator's contents at the specified address. (0100)
OUT: Store the accumulator's contents in the output register so that the operator can see it. (0101)
JMP: Jump to a certain instruction in memory at the specified address. (0110)
HLT: Stop the operation of the computer. (0111)

To determine what control words need to be sent out for each OP you need to know what bits have to be active during each T state. For my computer I organized the bits as follows (an underline denotes an active-low bit):

CE CO J MI RO II IO OI BI EO SU AI AO RI HLT X

CE - Count Enable (enables the program counter's clock input)
CO - Clock out enable
J - Jump enable
MI - MAR Input
RO - Program memory out
II - Instruction register in
IO - Instruction register out
OI - Output register in
BI - B register in
EO - ALU output enable
SU - Subtract
AI - Accumulator in
AO - Accumulator output enable
RI - Program memory in
HLT - Halt
X - Not used

Here are what bits should be active for each T state for a given instruction as well as the address that they should be in the control ROM:

Fetch:
0: CO, MI - The program counter outputs into the MAR
1: CE - The counter is enabled for the next clock pulse
2: RO, II - The addressed byte is outputted from RAM into the instruction register

NOP:
3: X
4: X
5: X

LDA:
6: IO, MI - The address in the instruction register is transfered to the MAR (lowest four bits)
7: RO, AI - The addressed byte is outputted from memory into the accumulator
8: X

ADD:
9: IO, MI - The address in the instruction register is transfered to the MAR (lowest four bits)
10: RO, BI - The addressed byte is outputted from memory into the accumulator
11: EO, AI - The sum of the accumulator and the B register is loaded into the accumulator

SUB:
12: IO, MI - The address in the instruction register is transfered to the MAR (lowest four bits)
13: RO, BI - The addressed byte is outputted from memory into the accumulator
14: AI, SU, EO - The difference of the accumulator and the B register is loaded into the accumulator

STO:
15: IO, MI - The address in the instruction register is transfered to the MAR (lowest four bits)
16: AO, RO, RI - The accumulator outputs into the program memory at the addressed location (RO and RI have to be active for a write on the chip that I used)
17: X

OUT:
18: OI, AO - The accumulator outputs into the output register
19: X
20: X

JMP:
21: J, IO - The instruction register loads the program counter with its lowest four bits
22: X
23: X

HLT:
24: HLT - A halt signal is sent to the clock
25: X
26: X

Your OP ROM contains multiples of three at each memory location. This is of course because each cycle takes three execution states. Therefore the addressed data for your OP ROM will be:
0 - 3
1 - 6
2 - 9
3 - 12
4 - 15
5 - 18
6 - 21
7 - 24

To program your choice of chip you have many different options. You could buy an EEPROM and EPROM programmer, but they usually cost a considerable amount of money. I built a breadboard programmer for my ROM that is operated by moving wires around and controlling the write and read enable pins by push buttons. Later I simplified the process and designed an Arduino programmer for my NVRAM specifically. I'll attach the code as it can be easily modified to program almost any parallel memory chip that you would use for this project.

Step 15: Buying Parts

Picture of Buying Parts

The great thing about building an 8-bit computer is that most parts will cost you less than a dollar a piece if you buy them from the correct place. I purchased 90% of my parts from Jameco Electronics and I have been completely satisfied with their services. The only parts I have really bought from anywhere else are the breadboards and breadboard wires (and the Numitron tubes). These can be found considerably cheaper on sites like Amazon. Always be sure to make sure the parts that you are ordering are the correct ones. Every part that you buy should have a datasheet available online that explains all of the functions and limitations of the item that you are buying. Make sure to keep these organized as you will be using many datasheets in the construction of your computer. To help you with your computer I will list the parts that I used for mine:

4-Bit Counter:
74161 - http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?freeText=74161&langId=-1&storeId=10001&productId=49664&search_type=jamecoall&catalogId=10001&ddkey=http:StoreCatalogDrillDownView

4-Bit Register (I use two for each 8-bit register):
74LS173 - http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?freeText=74LS173&langId=-1&storeId=10001&productId=46922&search_type=jamecoall&catalogId=10001&ddkey=http:StoreCatalogDrillDownView

2-1 Multiplexer:
74LS157 -http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_46771_-1

16x8 RAM (output needs to be inverted):
74189 - http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?freeText=74189&langId=-1&storeId=10001&productId=49883&search_type=jamecoall&catalogId=10001&ddkey=http:StoreCatalogDrillDownView

Full Adders:
74LS283 - http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?freeText=74LS283&langId=-1&storeId=10001&productId=47423&search_type=all&catalogId=10001&ddkey=http:StoreCatalogDrillDownView

Tri-State Buffers:
74S244 -http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_910750_-1


XOR Gates:
74LS86 -http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_295751_-1

AND Gates:
74LS08 -http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_295401_-1

NOR Gates:
74LS02 -http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_283741_-1

Inverters:
74LS04 -http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_283792_-1

Ring Counter:
CD4029 - http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?freeText=4029&langId=-1&storeId=10001&productId=12925&search_type=jamecoall&catalogId=10001&ddkey=http:StoreCatalogDrillDownView

JK Flip-Flops:
74LS10 -http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_295427_-1

Step 16: Construction

Picture of Construction
control logic.jpg
Here is where the patience really comes in. I chose using a breadboard for the actual computer, but there are many other methods out there (such as wire-wrapping) that will work just as well. To make things a lot more simple I included a block diagram for the actual schematic of my computer. I did not however include part numbers or pin numbers. I believe that this will make things more simple and open for creativity. The 4-bit program counter output, MAR input and instruction register output are all connected to the four least significant bits of the computer's bus.

The second diagram shown is the control logic for the operation end of the computer. The controls are designed so that toggles can be an input for the computer. RS_NOR latches are placed in front of the toggle switches to debounce them. Toggle switches often have dirty connections that may bounce from an on to an off state and provide more pulses than you want. Adding a flip-flop to the output of a toggle eliminates the extra pulses. This would be extremely useful when using the manual clock option. You would not want to flip the switch and initiate 8 clock pulses. The read/write button writes the active input byte to the addressed memory. By changing the default control word input to RAM to two low RO and RI bits initiating a write cycle. The run/program switch changes which input is active on the memory address multiplexer. The JK flip flop after the 555 means that when the computer is run, it will not start on the middle of a clock pulse. A low HLT signal will stop the clock from passing on either the manual clock or 555. And finally, the run/clear switch is connected to all of the clear pins on the computer such as those on the registers and counters.

Step 17: Programming

Picture of Programming
Now that the computer is done, it can be programmed to carry out instructions. To do this you first have to put the computer into its program setting by flipping the run/program toggle switch into the program position. After that you select addresses starting at 0 and going to 15 and insert the needed data for your program. For instance, to start with 5 and add 4 with every output the program would be as follows:

Address - Data:
0000 - 00010111   LDA 7: Load the accumulator with the value stored at memory address 7 (5)
0001 - 00101000   ADD 8: Add value stored at memory address 8 (4)
0010 - 01010000   OUT: Output the accumulator
0011 - 01100001   JMP 1: Jump to instruction 1
0100 - X
0101 - X
0110 - X
0111 - 00000101   5
1000 - 00000100   4
1001 - X
1010 - X
1011 - X
1100 - X
1101 - X
1110 - X
1111 - X

Step 18: Going Further

Picture of Going Further
I hope you enjoyed this Instructable and, most of all, I hope that you got something out of it. You can consider all of this hard work an incredibly valuable learning experience that will give you a better understanding of electronics, computers and programming. In the end you will also have something very cool to show for all of your hard work as well.

After constructing your first 8-bit computer you can go further and add more functionality. The ALU used in this computer is very simplistic in operation and true ALU's today have a myriad of functions such as bit-shifting and logical comparisons. Another important aspect to move onto is conditional branching. Conditional branching means that an instruction depends on the current state of flags set by the ALU. These flags change as the accumulator's contents become negative or are equal to zero. This allows for a much more expansive possibility for application of your computer.

If you have any questions about this project feel free to comment on this Instructable, comment on my website at http://8bitspaghetti.com or shoot me an email at sudokyle@gmail.com. I wish you the best of luck with this project.


'Hardware' 카테고리의 다른 글

SPI(Serial Peripheral Interface Bus)  (0) 2015.08.04
I2C(Inter Integrated Circuit)  (0) 2015.08.04
UART란?  (0) 2015.08.04
led는 안다리가 짧은게 vcc  (0) 2015.01.03
간단한 레귤레이터 만들기 11V->5V  (0) 2014.12.30

led는 안다리가 짧은게 vcc

'Hardware' 카테고리의 다른 글

SPI(Serial Peripheral Interface Bus)  (0) 2015.08.04
I2C(Inter Integrated Circuit)  (0) 2015.08.04
UART란?  (0) 2015.08.04
How to Build an 8-Bit Computer by spel3o  (0) 2015.03.14
간단한 레귤레이터 만들기 11V->5V  (0) 2014.12.30

+ Recent posts