Study 77

[Lecture 06] Polling & Pull-up register

Lecture 06_ Polling & Pull-up register > Memory-mapped I/O : allows I/O registers to be accessed as memory addresses : LOAD, STORE 명령어만 사용 - Load (memory → register) : 메인 메모리의 byte나 word를 register에 복사하여, register의 이전 내용에 overwriting - Store (reigster → memory) : register의 byte나 word를 메인메모리에 복사하여, 해당 위치의 이전내용에 overwriting - Operate : 2개의 registers의 내용을 ALU에 복사하고, 두 words..

[Exercise 03] 두 LED 동시에 깜빡이기

Exercise 03_두 LED 동시에 깜빡이기 > Exercise objective P1.0 LED 는 빨간색 LED 가 켜졌다가 꺼지면서 깜빡이도록 설계한다. P2.0 LED 는 빨간색 , 초록색, 파란색 LED 가 차례대로 켜졌다가 꺼지면서 깜빡이도록 설계한다. 즉, P1.0 에서는 빨간색 , P2.0 에서는 빨간색 , 초록색, 파란색의 차례로 두 LED가 동시에 깜빡이도록 설계하는 것이 이 프로젝트의 목표이다. > 코드 #include "msp.h" void main(void) { // 4개의 포인터 변수로 GPIO 포트 p1, p2의 dir, out 레지스터 주소를 선언 volatile unsigned char *gpio_p1dir, *gpio_p1out, *gpio..

[Lecture 04] LED

Lecture 04_LED > LED: current가 흐를 때 발광하는 semiconductor(diode) light source > Diode: current (primarily)가 한방향으로 흐르는 Two-terminal electronic component - positive side: anode - 긴 다리 - negative side: cathode - 짧은 다리 - 한쪽 방향은 low resistance(거의 0), 다른 한쪽은 high resistance(거의 무한) - If you connect an LED directly to a current source, it will try to dissipate(소멸) as much pow..