2. Deferred Interrupt Processing A. Binary Semaphores를이용한동기 (Synchronization) i. Binary Semaphores는 Interrupt가발생하였을때특정한 를 Unblock 하는데사용할수있다. 이러한기능은 In

Size: px
Start display at page:

Download "2. Deferred Interrupt Processing A. Binary Semaphores를이용한동기 (Synchronization) i. Binary Semaphores는 Interrupt가발생하였을때특정한 를 Unblock 하는데사용할수있다. 이러한기능은 In"

Transcription

1 AVR FreeRTOS : Interrupt Management 1. 이장의개요 Embedded Real Time 시스템은주변장치로부터발생하는 Event 에실시간으로응답하여야하는응용분야에많이이용된다. 응용분야에따라서는여러개의 Interrupt Source로부터발생하는 Event를실시간으로처리하여야하고, 각각의 Interrupt 처리는서로다른처리시간과속도를필요로하기때문에최적의 Event 처리를위한전략이필요하다 A. 효과적인 Event 처리를위하여고려하여야할사항 i. 어떻게 Event를 Detect 할것인가? : Interrupt 가일반적으로 Event 발생에사용되지만경우에따라서는 Polling이필요할수있다. ii. Interrupt를사용할때 Interrupt Service Routine(ISR) 내에서처리하는부분과, ISR 외에서는처리하는부분을어떻게할당하여처리할것인가? : 가능하면 ISR 내에서처리하는부분을짧게하는것이좋다. iii. 어떻게 Event 가 Non-ISR code와통신하도록할것인가. FreeRTOS는특별히 Event 처리를위한 API와 Macros를별도로가지고있지는않다. 그러나일부 API와 Macros를 ISR 내에서사용할경우에는끝에 FromISR 이포함된 API 함수와 FROM_ISR 이포함된 Macros를사용하여야한다. B. 이장의중요목표 i. ISR에서사용되는 API 함수에대한이해 ii. iii. iv. Interrupt를사용하는시스템의구현에대한이해 Binary Semaphores( 세마포어 ) 와 Counting Semaphores를 Create 하고사용하는방법에대한이해 Binary Semaphores와 Counting Semaphores의차이 v. Queue( 큐 ) 를이용한 ISR 과 non-isr 사이의 Data Passing vi. Interrupt Nesting Model

2 2. Deferred Interrupt Processing A. Binary Semaphores를이용한동기 (Synchronization) i. Binary Semaphores는 Interrupt가발생하였을때특정한 를 Unblock 하는데사용할수있다. 이러한기능은 Interrupt과 를동기시키데효과적으로이용할수이고, 또한 ISR을매우빠르고적은량의프로그램코드만으로구성할수있게한다. ii. Time Critical 한 Interrupt 처리가필요한경우에는 Handler 의 Priority를다른 보다높게설정하여 (Pre-empts) ISR에서직접 Handler 로 Return 하여 Handler 가바로실행되도록한다. 현재실행중인 가 Interrupt 되고 Handler 에 Return 되는예. 2.ISR이실행된다. ISR에서 Semaphore를사용하여 Handler 를 Unblock 한다. ISR Handler 1 3.Handler 는가장높은 Priority를갖고있고, ISR이 Context Switch를수행하기때문에 ISR은직접 Handler 로 Return 한다. 1은 Ready 상태가된다. 4. Handler 는 Event 처리를완료하고, 다음 Event를기다리기위하여 Semaphore에의하여 Block 된다. 보다낮은 Priority를갖고있는 1이다시시작된다. 1.1 이실행중 일때 Interrupt 가발 생하였다. t1 t2 t3 t4 iii. iv. Handler 는 Event 가발생하는것을기다리기위하여 Take 를 Call 하여 Blocking 상태에있게되고, Event 가발생하면 ISR 에서 Give Operation 으로 Handler 가

3 Unblock 상태가되게한다. v. 위에서설명한 Interrupt 와 를동기시키는시나리오에서사용한 Binary Semaphore는길이가 1인 Queue로생각할수있다. 위예에서 Queue는하나의 Item만저장할수있기때문에 Empty 상태아니면 Full 상태 ( Binary ) 에있다. vi. vii. viii. Handler 에서 를 Call 하였을때 Queue가비어있으면 는 Blocked State가된다. 이상태에서 Event가발생하면 ISR에서 xsemaphoregiveisr() 함수를사용하여 Token을 Queue에놓게되고 Queue는 Full 상태가된다. 그결과 Handler 는 Token 을제거함과동시에 Blocked State를벗어나서 Interrupt에동기하여실행하여야할 Process를처리하게된다. 그리고, Queue는다시 Empty 상태가되어다음 Event를기다리게된다. Binary Semaphore 를이용한 Interrupt 와 동기 Semaphore가 Not Available 한상태임. 는 Blocked 되고 Semaphore 를기다림 Interrupt xsemaphoregivefromisr() Interrupt 이발생하고 Token 을 Give 한다.

4 Interrupt xsemaphoregivefromisr() 는 Unblock 상태이고, Semaphore가 Available 한상태임. 성공적으로 Semaphore 를 Take 하여 Process 를처리함. Queue 는다시 Empty 상태가됨. 는처리를완료하고다시 Semaphore Take 를시도함. 그결과다시 Blocked 상태가되었다.

5 B. vsemaphorecreatebinary() API Function Semaphore는사용되기전에 Create되어야한다. xsemaphorecreatebinary() API Function의 Prototype void xsemaphorecreatebinary ( xsemaphorehandle xsemaphore); Parameter Name xsemaphore Description Semaphore Handle C. API Function Taking Semaphore의의미는 Semaphore를 Receive 또는 Obtain 의의미이다. 는사용되기전에 Create되어야한다. 는 Interrupt Service Routine에서사용할수없다. API Function의 Prototype portbase_type xsemaphoretake ( xsemaphorehandle xsemaphore, portticktype xticktowait ); Parameter Name/ Returned value xsemaphore Semaphore Handle Description xticktowait 가 Blocked State에서 Semaphore를사용할수있을때까지기다리는최대 Tick 수만약 xtickstowait가 0 이면 Semaphore를회득할수없으면 는즉시 Return 된다. FreeRTOSConfig.h에서 INCLUDE_vSuspend 가 1로 Set되고, xtickstowait 가 portmax_delay로설정된경우 는 Timing out 없이무한이기다린다. Returned value 2가지가능한값을갖는다. pdpass: 가성공적으로 Semaphore를획득한경우 pdfalse: Semaphpre를획득할수없는경우

6 D. xsemaphoregivefromisr() API 함수 xsemaphoregivefromisr() 는 ISR 에서사용하는 xsemaphoregive() 함수의특별한형태이다. xsemaphoregivefromisr() API Function 의 Prototype portbase_type xsemaphoregivefromisr ( xsemaphorehandle xsemaphore, portbasetype *pxhigherprioritywoken ); Parameter Name/ Returned value xsemaphore Semaphore Handle Description pxhigherprioritywoken Semaphore 를사용할수있을때까지기다리는 가하나또는여러개일수있다. 만약 xsemaphoregivefromisr() 에의하여 unblocked 되는 의 Priority 가 Interrupt 에의하여실행이중단된 보다높거나같은경우 xsemaphoregivefromisr() 함수는 *pxhigherprioritywoken 을 pdtrue 로 Set 한다. *pxhigherprioritywoken pdtrue 로 Set 된경우 Interrupt ISR 에서직접가장 Priority 가높은 로직접 Context Switching 할수있다. Returned value 2 가지가능한값을갖는다. pdpass: xsemaphoregivefromisr() 이성공한경우 pdfalse: Semaphpre 가이미획득가능한상태이기때문에 Semaphpre 를 Give 할수없는경우 E. Interrupt 와 동기에 Binary Semaphpre 를사용하는예 : RT_SW_Interrupt_binary_semaphore // 실험목표 // Binary Semaphore 를이용하여 Interrupt 와 를동기방법에 // 대한이해 // // 실험방법

7 // Interrupt 입력장치로 SW PD0 를사용한다. // 출력장치로 LED 를사용한다. // 프로그램이처음시작하면 LED 가 1 회점멸한다. // SW 가 Push 되는순간 Interrupt 가발생하고, 이 Interrupt 에동기하여 // SW 가 Push 된회수가 LED 에표시된다. //#define TICK_INTERRUPT_TIMER0 #include <stdlib.h> #include <stdio.h> #include <avr/io.h> #include <avr/interrupt.h> #include <compat/deprecated.h> //FreeRTOS include files #include "FreeRTOS.h" #include "task.h" #include "croutine.h" #include "semphr.h" //User include files #define SW_DEBOUNCE_TIME 20 static void vsw_counterhandler(); static void vled_display(); static void init_port_setting(void); // xsemaphorehandle 변수를선언한다. // Semaphore 는 와 Interrupt 의동기에사용한다. xsemaphorehandle xbinarysemaphore = NULL; static char sw_counter; static void vsw_counterhandler() sw_counter = 0x00; for(;;) // Semaphore 를획득하지못하면 는 Blocked 상태가된다. // 외부 SW 의 Interrupt 에의하여 Semaphore 을획득할때까지 // 이상태가지속된다.

8 if(xsemaphoretake(xbinarysemaphore, portmax_delay ) == pdtrue) vdelay(sw_debounce_time); // 만약 SW PD0 가눌렸으면 if((pind & 0x01) == 0) sw_counter++; EIMSK = 0x01; // External Interrupt 0 enable // SW PD0 의누르면 SW 가 Push 된수를 LED 에표시한다. static void vled_display() PORTF = 0xff; // LED 가 1 회깜박인다. vdelay(500); PORTF = 0x00; vdelay(500); for(;;) PORTF = sw_counter; vdelay(20); portshort main(void) init_port_setting(); // Semaphore 는사용하기전에 Create 되어야한다. vsemaphorecreatebinary(xbinarysemaphore ); if(xbinarysemaphore!= NULL) // Interrupt 와동기를위하여 vsw_counterhandler 에 // 가장높은 Priority 를설정하였다. xcreate(vsw_counterhandler, (signed portchar *)"vsw_counterhandler", configminimal_stack_size*3, NULL, tskidle_priority + 3, NULL ); xcreate(vled_display, (signed portchar *)"vled_display", configminimal_stack_size,

9 NULL, tskidle_priority + 1, NULL ); // RunSchedular vstartscheduler(); for(;;) return 0; static void init_port_setting(void) cli(); //Disable all interrupts outp(0x00,ddrd); // PORTD 를 Input Port 로설정한다. outp(0xff,portd); // Pull up resistor 설정 outp(0xff,ddrf); // PORTF 를 Output Port 로설정한다. outp(0x00,portf); // clear LED. EICRA = 0x02; EIMSK = 0x01; sei(); // External Interrupt 0, Falling Edge // Asynchronously Interrupt // External Interrupt 0 enable // Re-enable interrupts // static void interrupt far SIG_INTERRUPT0( void ) SIGNAL (INT0_vect) static portbase_type xhigherprioritywoken; portbase_type xsemastatus; EIMSK &= ~0x01; // External Interrupt 0 Disable xhigherprioritywoken = pdfalse; // 'Give' the semaphore to unblock the task. xsemastatus = xsemaphoregivefromisr(xbinarysemaphore, &xhigherprioritywoken ); if((xsemastatus == pdtrue) && (xhigherprioritywoken == pdtrue )) // Semaphore 를획득한 가 Unblocked 상태가된다. // 그리고이 의 Priority 가 Interrupt 에의하여중단된

10 // 보다높은경우이 로직접 Return 을한다. taskyield(); 3. Counting Semaphores A. RT_SW_Interrupt_binary_semaphore 예제프로그램에서 Binary Semaphore가 Interrupt와 를동기시키는데사용되었다. Interrupt와 를동기시키는순서는다음과같다. i. Interrupt가발생한다. ii. Interrupt service Routine이실행되고, Semaphore Giving 에의하여 Handler 가 Unblock 상태로된다.. iii. Interrupt 가완료되자마자 Handler 가실행된다. Handler 는 Semaphore를 Take 한다. iv. Handler 는 Event 처리프로그램을실행하고, 다시 Semaphore Take 를시도한다. 만약 Semaphore 가즉시유효하지않으면다시 Blocked 상태가된다. 위의실행순서는 Interrupt의발생주기가 Event 처리속도보다느린경우에는잘실행된다. B. 만약다른 Interrupt가 Handler 가먼저발생한 Event를처리하는도중에발생한다면 Semaphore는 Event를 Latch(Semaphore 가다시유효한상태가됨 ) 한상태가되고, Handler 가앞에발생한 Event를처리하고 Semaphore Take 를시도하면, Handler 는 Block 상태에놓이지않고바로새로 Latch된 Event를처리한다. C. 그러나, 만약, Handler 가먼저발생한 Event를처리하는도중에 Semaphore에 Event 가 Latch 되고이것이 Take 되기전에또새로운 Interrupt 가발생한다면, 이후에발생하는 Event 정보는상실된다. D. 이러한문제를해결하기위하여 Counting Semaphore가필요하다. E. Binary Semaphores 는길이가 1인 Queue 와같이생각할수있고, Counting Semaphores는 1보다큰길이를갖는 Queue로생각할수있다. 단이경우 는 Queue의 Data에는관심이없고 Queue가 Empty 인가아닌가에만관심이있다. F. Counting Semaphores를사용하는경우에는 FreeRTOS.h 파일의 configuse_counting_semaphores 가 1로 Set 되어야한다.

11 Binary Semaphore 를이용한 Interrupt 와 의동기예에서앞서발생한 Event 를처리중에새로운 Interrupt 가발생하는경우의처리순서 Semaphore가 Not Available 한상태임. 는 Blocked 되고 Semaphore 를기다림 Interrupt xsemaphoregivefromisr() Interrupt 이발생하고 Token 을 Give 한다. Interrupt xsemaphoregivefromisr() 는 Unblock 상태이고, Semaphore가 Available 한상태임.

12 성공적으로 Semaphore 를 Take 하여 Process 를처리함. Queue 는다시 Empty 상태가됨. Interrupt xsemaphoregivefromisr() 가첫번째발생한 Event를처리하는중에 Interrupt가발생하고, ISR이실행되어 Event 가 Semaphore에 Latch 됨 는아직첫번째 Event 를처리하는중임. 가첫번째발생한 Event 를처리를완료하고 를 Call 한다. Semaphore 가이미유용한상태이기때문에 는 Blocked 상태에놓이지않고, 바로 Semaphore 를 Take 한다.

13 G. Counting Semaphores 의대표적인용도는다음과같다. i. Counting Semaphore 를 Event Counting 에사용하는경우 Event Handler(ISR) 은 Event 가발생할때마다 Semaphore 를 Give 한고, Semaphore 의 Count 는 1 씩증가한다. Handler 각 Event 의처리가끝날때마다 Semaphore 를 Take 한다. 이때마다 Semaphore count 는 1 씩감소한다. Counting Semaphore 를 Event Counting 에사용하는경우 Count Value 의초기값을 0 로하여 Counting Semaphore 를 Create 한다. Counting Semaphore 를이용한 Events Count 의처리과정 [Semaphore count 0] 는 Blocked 되고 Semaphore 를기다림 Interrupt xsemaphoregivefromisr() [Semaphore count 1] Interrupt 이발생하고 Token 을 Give 한다. Interrupt xsemaphoregivefromisr() [Semaphore count 1] 는 Unblock 상태이고, Semaphore가 Available 한상태임.

14 [Semaphore count 0] 성공적으로 Semaphore 를 Take 하여 Process 를처리함. Queue 는다시 Empty 상태가됨. Interrupt xsemaphoregivefromisr() [Semaphore count 2] 가첫번째발생한 Event 를처리하는중에다른 2 개의 Interrupt 가발생하고, ISR 이실행되어 2 개의 Event 가 Semaphore 에 Latch 됨 는아직첫번째 Event 를처리하는중임. Interrupt xsemaphoregivefromisr() [Semaphore count 1] 가첫번째발생한 Event 를처리를완료하고 를 Call 한다. Semaphore 가이미유용한상태이기때문에 는 Blocked 상태에놓이지않고, 바로하나의 Semaphore 를 Take 한다. 다른또하나의 Semaphore 는 Latch 되어유용한상태가된다.

15 ii. Counting Semaphore 를 Resource Management 에사용하는경우이경우 Semaphore 의 Count Value 는사용가능한자원의수를표시한다. Resource 의사용권을획득하기위하여 는먼저 Semaphore 를 Take 하여야한다. 가 Semaphore 를 Take 할때마다 Semaphore 의 Count Value 는 1 씩감소하고 Count Value 가 0 가되면사용할수있는 Resource 가없게된다. 의 Resource 의사용이완료될경우 는 Semaphore 를 Give 하고 Count Value 는 1 증가한다. 그러면다른 가자원을하나더사용할수있게된다. Counting Semaphore 를자원관리에사용하는경우 Count Value 의초기값을사용가능한자원의개수로하여 Counting Semaphore 를 Create 한다. H. xsemaphorecreatecounting() API 함수 FreeRTOS Semaphore 의 Handle 은 xsemaphorehandle 형태의변수에저장된다. Semaphore 는사용하기전에 Create 되어야한다. Counting Semaphore 는 xsemaphorecreatecounting() API 함수에의하여 Create 된다. xsemaphorecreatecounting() API 함수의 Prototype xsemaphorehandle xsemaphorecreatecounting ( unsigned portbase_type uxmaxcount, unsigned portbase_type uxinitialcount) Parameter Name/ Description Returned value uxmaxcount Count 할 Semaphore의최대값. Semaphore가 Count 나 Events Latch로사용될경우 uxmaxcount는 Latch 되는 Event의최대값 uxinitialcount Semaphore 가 Create 될때 Count Value의초기값 Semaphore가 Event counting에사용될경우아직 Event 가발생하지않은경우에 0로설정한다. Semaphore가자원관리에사용될경우사용가능한자원의최대수 (uxmaxcount) 로설정한다. Returned value NULL이 Return 되는경우에는 Semaphore가 Create 되지못한경우이다. Non-NULL이 Return 된경우이값이 Create 된 Semaphore의 Handle로저장된다.

16 I. 와 Interrupt 의동기에 Counting Semaphore 를사용하는예 프로그램예 : RT_SW_Interrupt_counting_semaphore 참고요 4. Interrupt Service Routine 에서 Queue 의사용 Interrupt 와 간의동기및 Data Transfer 에 Queue 를이용한다. ISR 에서는 xqueuesendtofrontfromisr(), xqueuesendtobackfromisr(), xqueuereceivefromisr() API 함수를사용한다. xqueuesendtofrontfromisr() API 함수의 Prototype portbase_type xqueuesendtofrontfromisr ( xqueuhandle xqueue, void *pvitemtoqueue, portbase_type *pxhigherprioritywoken); xqueuesendtobackfromisr() API 함수의 Prototype portbase_type xqueuesendtofrontfromisr ( xqueuhandle xqueue, void *pvitemtoqueue, portbase_type *pxhigherprioritywoken); Parameter Name/ Returned value xqueue pvitemtoqueue Description Data를보낼 (Written) Queue의 Handle, Queue Handle은 Queue가생성될때 Return 된다. Queue에복사될 Data의 Pointer 각 Item의 Size는 Queue 가생성될때결정된다. pxhigherprioritywoken Semaphore 를사용할수있을때까지기다리는 가하나또는여러개일수있다. 만약 xqueuesendtofrontfromisr() 나 xqueuesendtobackfromisr() 에의하여 unblocked 되는 의 Priority 가 Interrupt 에의하여실행이중단된 보다높거나같은경우함수는 *pxhigherprioritywoken 을 pdtrue 로 Set 한다. *pxhigherprioritywoken 이 pdtrue

17 로 Set 된경우 Interrupt ISR 에서직접가장 Priority 가높은 로직접 Context Switching 할수있다. Returned value 2 가지가능한값을갖는다. pdpass: Data 가성공적으로 Queue 에보내진경우 errqueue_full: Queue 가 Full 상태라 Data 가 Queue 에보내지지못한경우 A. Interrupt 와 Queue 를이용한 Serial 통신프로그램예 Serial 통신에사용하는 UART Driver 는 Interrupt 와 Queue 를이용하는대표적인예이다. Serial 통신예에서 Transmit Interrupt Handler 와 Receive Interrupt Handler 는 Queue 를통하여문자를주고받는다. Serial.c 프로그램예 : RT_serial_comm 참고요 // USART0 를사용하도록설정함 /* BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER. */ static xqueuehandle xrxedchars; static xqueuehandle xcharsfortx; /* */ xcomporthandle xserialportinitminimal( unsigned long ulwantedbaud, unsigned portbase_type uxqueuelength ) unsigned long ulbaudratecounter; unsigned char ucbyte; portenter_critical(); /* Create the queues used by the com test task. */ xrxedchars = xqueuecreate( uxqueuelength, ( unsigned portbase_type ) sizeof( signed char ) ); xcharsfortx = xqueuecreate( uxqueuelength, ( unsigned portbase_type ) sizeof( signed char ) ); // Calculate the baud rate register value from the equation // in the data sheet. ulbaudratecounter = ( configcpu_clock_hz /

18 ( serbaud_div_constant * ulwantedbaud ) ) ( unsigned long ) 1; /* Set the baud rate. */ ucbyte = ( unsigned char ) ( ulbaudratecounter & ( unsigned long ) 0xff ); UBRR0L = ucbyte; ulbaudratecounter >>= ( unsigned long ) 8; ucbyte = ( unsigned char ) ( ulbaudratecounter & ( unsigned long ) 0xff ); UBRR0H = ucbyte; // Enable the Rx interrupt. The Tx interrupt will get enabled // later. Also enable the Rx and Tx. UCSR0B = ( serrx_int_enable serrx_enable sertx_enable ); /* Set the data bits to 8. */ // UCSR0C = ( serucsrc_select sereight_data_bits ); UCSR0C = ( sereight_data_bits ); portexit_critical(); // Unlike other ports, this serial code does not allow for more // than one com port. We therefore don't return a pointer to a // port structure and can instead just return NULL. return NULL; // signed portbase_type xserialgetchar( xcomporthandle pxport, signed char *pcrxedchar, portticktype xblocktime ) /* Only one port is supported. */ ( void ) pxport; // Get the next character from the buffer. Return false if no // characters are available, or arrive before xblocktime expires. if( xqueuereceive( xrxedchars, pcrxedchar, xblocktime ) ) return pdtrue; else

19 return pdfalse; // signed portbase_type xserialputchar( xcomporthandle pxport, signed char coutchar, portticktype xblocktime ) /* Only one port is supported. */ ( void ) pxport; // Return false if after the block time there is no room on the // Tx queue. if( xqueuesend( xcharsfortx, &coutchar, xblocktime )!= pdpass ) return pdfail; vinterrupton(); return pdpass; // SIGNAL( SIG_UART0_RECV ) signed char cchar; signed portbase_type xhigherprioritywoken = pdfalse; // Get the character and post it on the queue of Rxed characters. // If the post causes a task to wake force a context switch as the // woken task may have a higher priority than the task we // have interrupted. cchar = UDR0; xqueuesendfromisr( xrxedchars, &cchar, xhigherprioritywoken ); if( xhigherprioritywoken!= pdfalse ) taskyield();

20 /* */ SIGNAL( SIG_UART0_DATA ) signed char cchar, cwoken; if( xqueuereceivefromisr( xcharsfortx, &cchar, &cwoken ) == pdtrue ) /* Send the next character queued for Tx. */ UDR0 = cchar; else /* Queue empty, nothing to send. */ vinterruptoff(); 5. Interrupt Nesting 최근의 FreeRTOS Ports 는 Interrupt Nest 를허용한다. 이경우아래에서설명하는하나또는두개의상수를 FreeRTOSConfig.h 에서정의하여주어야한다. configkernel_interrupt_priority Tick Interrupt 에서사용하는 Interrupt Priority 를설정한다. 만약 configmax_syscall_interrupt_priority 상수를사용하지않는경우에는 interrupt-safe FreeRTOS API 를사용하는 Interrupt 는이 Priority 에서실행된다. configmax_syscall_interrupt_priority interrupt-safe FreeRTOS API 를 Call 할수있는가장높은 Interrupt Priority 를설정한다. Full Interrupt Nesting Model 은 configkernel_interrupt_priority 보다더높은값으로 configmax_syscall_interrupt_priority 를설정함으로서구현된다. FreeRTOS 에서는일반적으로아래의예와같이 Interrupt 를사용할수있다. 그러나특정한프로세서에적용하는경우프로세서에서제공하는 Interrupt 에대하여이해하고응용하여야한다.

21 configmax_syscall_interrupt_priority = 3 configkernel_interrupt_priority = 1 API 함수를사용하지않는 Interrupt는어떤 Priority에서도사용할수있고 Nesting 할수있다. Priority 7 Priority 6 Priority 5 Priority 4 Priority 3 Priority 2 Priority 1 이영역 Priority의 Interrupt는 Kernel에의한지연없이실행되고 Nesting 할수있다. 그러나 API 함수는사용할수없다. 이영역의 Interrupt는 API 함수를사용할수있고, Nesting 할수있다. 그러나 Critical Section으로 Mask 되어야한다.

ori r24, 0x03 ; Modify 하고, out PORTD, r24 ; Write 한다. 위예는명령이하나실행된다음, 나머지명령이실행되기전에 Interrupt가발생할수있기때문에 non-atomic Operation 이다. 다음의시나리오는 2개의 Task가 PORT

ori r24, 0x03 ; Modify 하고, out PORTD, r24 ; Write 한다. 위예는명령이하나실행된다음, 나머지명령이실행되기전에 Interrupt가발생할수있기때문에 non-atomic Operation 이다. 다음의시나리오는 2개의 Task가 PORT AVR FreeRTOS : Resource Management 1. 이장의개요 Multitasking System에서한 Task가어떤 Resource를사용하고있는도중에 Running State에서벗어나는일이생길수있고, 이상태에서다른 Task나 Interrupt가동일한 Resource를사용하려고시도할수있다. 이경우 Data 가충돌하거나손상될수있다. 다음은이러한경우가발생할수있는예이다.

More information

슬라이드 1

슬라이드 1 마이크로컨트롤러 2 (MicroController2) 2 강 ATmega128 의 external interrupt 이귀형교수님 학습목표 interrupt 란무엇인가? 기본개념을알아본다. interrupt 중에서가장사용하기쉬운 external interrupt 의사용방법을학습한다. 1. Interrupt 는왜필요할까? 함수동작을추가하여실행시키려면? //***

More information

untitled

untitled Embedded System Lab. II Embedded System Lab. II 2 RTOS Hard Real-Time vs Soft Real-Time RTOS Real-Time, Real-Time RTOS General purpose system OS H/W RTOS H/W task Hard Real-Time Real-Time System, Hard

More information

UART.h #ifndef _UART_H_ #define _UART_H_ #define DIR_TXD #define DIR_RXD sbi(portd,4) cbi(portd,4) #define CPU_CLOCK_HZ UL UART PORT1 void UAR

UART.h #ifndef _UART_H_ #define _UART_H_ #define DIR_TXD #define DIR_RXD sbi(portd,4) cbi(portd,4) #define CPU_CLOCK_HZ UL UART PORT1 void UAR IMC-V0.1 예제소스파일 1. UART 소스코드 (page 1-3) 2. Encoder 소스코드 (page 4-7) 3. ADC 소스코드 (page 8-10) UART.h #ifndef _UART_H_ #define _UART_H_ #define DIR_TXD #define DIR_RXD sbi(portd,4) cbi(portd,4) #define CPU_CLOCK_HZ

More information

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 -

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - (Asynchronous Mode) - - - ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - UART (Univ ers al As y nchronous Receiver / T rans mitter) 8250A 8250A { COM1(3F8H). - Line Control Register

More information

2. GCC Assembler와 AVR Assembler의차이 A. GCC Assembler 를사용하는경우 i. Assembly Language Program은.S Extension 을갖는다. ii. C Language Program은.c Extension 을갖는다.

2. GCC Assembler와 AVR Assembler의차이 A. GCC Assembler 를사용하는경우 i. Assembly Language Program은.S Extension 을갖는다. ii. C Language Program은.c Extension 을갖는다. C 언어와 Assembly Language 을사용한 Programming 20011.9 경희대학교조원경 1. AVR Studio 에서사용하는 Assembler AVR Studio에서는 GCC Assembler와 AVR Assmbler를사용한다. A. GCC Assembler : GCC를사용하는경우 (WinAVR 등을사용하는경우 ) 사용할수있다. New Project

More information

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202834C1D6C2F7207E2038C1D6C2F729>

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202834C1D6C2F7207E2038C1D6C2F729> 8주차중간고사 ( 인터럽트및 A/D 변환기문제및풀이 ) Next-Generation Networks Lab. 외부입력인터럽트예제 문제 1 포트 A 의 7-segment 에초시계를구현한다. Tact 스위치 SW3 을 CPU 보드의 PE4 에연결한다. 그리고, SW3 을누르면하강 에지에서초시계가 00 으로초기화된다. 동시에 Tact 스위치 SW4 를 CPU 보드의

More information

10주차.key

10주차.key 10, Process synchronization (concurrently) ( ) => critical section ( ) / =>, A, B / Race condition int counter; Process A { counter++; } Process B { counter ;.. } counter++ register1 = counter register1

More information

6주차.key

6주차.key 6, Process concept A program in execution Program code PCB (process control block) Program counter, registers, etc. Stack Heap Data section => global variable Process in memory Process state New Running

More information

슬라이드 1

슬라이드 1 AVR(Atmega128) Interrupt 1 Interrupt Polling 사용자가명령어를사용하여입력핀의값을계속읽어서변화를알아냄 모든경우의입력또는값의변화에대응하여처리가가능 Interrupt MCU 자체가하드웨어적으로그변화를체크하여변화시에만일정한동작 하드웨어적으로지원되는몇개의입력또는값의변화에만대응처리가가능 처리속도는일반적인경우인터럽트가빠름 인터럽트발생시

More information

K&R2 Reference Manual 번역본

K&R2 Reference Manual 번역본 typewriter structunion struct union if-else if if else if if else if if if if else else ; auto register static extern typedef void char short int long float double signed unsigned const volatile { } struct

More information

슬라이드 1

슬라이드 1 / 유닉스시스템개요 / 파일 / 프로세스 01 File Descriptor file file descriptor file type unix 에서의파일은단지바이트들의나열임 operating system 은파일에어떤포맷도부과하지않음 파일의내용은바이트단위로주소를줄수있음 file descriptor 는 0 이나양수임 file 은 open 이나 creat 로 file

More information

인터럽트 * 인터럽트처리메커니즘 ATmega128 인터럽트 2

인터럽트 * 인터럽트처리메커니즘 ATmega128 인터럽트 2 ATmega128 인터럽트 1 제 04 강 인터럽트 (Interrupt) 인터럽트개요외부인터럽트참고 ) FND 회로실습및과제 인터럽트 * 인터럽트처리메커니즘 ATmega128 인터럽트 2 인터럽트 ( 계속 ) ATmega128 인터럽트 3 * 인터럽트벡터 (P.104 표 7.1 참조 ) : 35 개 인터럽트 ( 계속 ) * 인터럽트허용 / 금지메커니즘 ATmega128

More information

CANTUS Evaluation Board Ap. Note

CANTUS Evaluation Board Ap. Note Preliminary CANTUS - UART - 32bits EISC Microprocessor CANTUS Ver 1. October 8, 29 Advanced Digital Chips Inc. Ver 1. PRELIMINARY CANTUS Application Note( EVM B d ) History 29-1-8 Created Preliminary Specification

More information

경제통상 내지.PS

경제통상 내지.PS CONTENTS I 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 II 38 39 40 41 42 43 III 46 47 48 49 50 51 52 53 54 55 56 57 58 59 IV 62 63 64 65 66 67 68 69 V

More information

°æÁ¦Åë»ó³»Áö.PDF

°æÁ¦Åë»ó³»Áö.PDF CONTENTS I 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 II 38 39 40 41 42 43 III 46 47 48 49 50 51 52 53 54 55 56 57 58 59 IV 62 63 64 65 66 67 68 69 V

More information

우루과이 내지-1

우루과이 내지-1 U R U G U A Y U r u g u a y 1. 2 Part I Part II Part III Part IV Part V Part VI Part VII Part VIII 3 U r u g u a y 2. 4 Part I Part II Part III Part IV Part V Part VI Part VII Part VIII 5 U r u g u a

More information

세계 비지니스 정보

세계 비지니스 정보 - i - ii - iii - iv - v - vi - vii - viii - ix - 1 - 2 - 3 - - - - - - - - - - 4 - - - - - - 5 - - - - - - - - - - - 6 - - - - - - - - - 7 - - - - 8 - 9 - 10 - - - - - - - - - - - - 11 - - - 12 - 13 -

More information

chap 5: Trees

chap 5: Trees 5. Threaded Binary Tree 기본개념 n 개의노드를갖는이진트리에는 2n 개의링크가존재 2n 개의링크중에 n + 1 개의링크값은 null Null 링크를다른노드에대한포인터로대체 Threads Thread 의이용 ptr left_child = NULL 일경우, ptr left_child 를 ptr 의 inorder predecessor 를가리키도록변경

More information

[96_RE11]LMOs(......).HWP

[96_RE11]LMOs(......).HWP - i - - ii - - iii - - iv - - v - - vi - - vii - 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54

More information

영암군 관광종합개발계획 제6장 관광(단)지 개발계획 제7장 관광브랜드 강화사업 1. 월출산 기( 氣 )체험촌 조성사업 167 (바둑테마파크 기본 계획 변경) 2. 성기동 관광지 명소화 사업 201 3. 마한문화공원 명소화 사업 219 4. 기찬랜드 명소화 사업 240

영암군 관광종합개발계획 제6장 관광(단)지 개발계획 제7장 관광브랜드 강화사업 1. 월출산 기( 氣 )체험촌 조성사업 167 (바둑테마파크 기본 계획 변경) 2. 성기동 관광지 명소화 사업 201 3. 마한문화공원 명소화 사업 219 4. 기찬랜드 명소화 사업 240 목 차 제1장 과업의 개요 1. 과업의 배경 및 목적 3 2. 과업의 성격 5 3. 과업의 범위 6 4. 과업수행체계 7 제2장 지역현황분석 1. 지역 일반현황 분석 11 2. 관광환경 분석 25 3. 이미지조사 분석 45 4. 이해관계자 의견조사 분석 54 제3장 사업환경분석 1. 국내 외 관광여건분석 69 2. 관련계획 및 법규 검토 78 3. 국내 외

More information

untitled

untitled Step Motor Device Driver Embedded System Lab. II Step Motor Step Motor Step Motor source Embedded System Lab. II 2 open loop, : : Pulse, 1 Pulse,, -, 1 +5%, step Step Motor (2),, Embedded System Lab. II

More information

<4D F736F F F696E74202D20BBB7BBB7C7D15F FBEDFB0A3B1B3C0B05FC1A636C0CFC2F72E BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20BBB7BBB7C7D15F FBEDFB0A3B1B3C0B05FC1A636C0CFC2F72E BC8A3C8AF20B8F0B5E55D> 뻔뻔한 AVR 프로그래밍 The 6 th Lecture 유명환 ( yoo@netplug.co.kr) 1 2 통신 관련이야기 시리얼통신 관련이야기 INDEX 3 ATmega128 시리얼통신회로도분석 4 ATmega128 시리얼통신컨트롤러 (USART) 분석 5 ATmega128 시리얼통신관련레지스터분석 6 ATmega128 시리얼통신실습 1 통신 관련이야기 동기

More information

<4D6963726F736F667420576F7264202D20B4EBBFF5203230303520BFB5BEF7BAB8B0EDBCAD2E646F63>

<4D6963726F736F667420576F7264202D20B4EBBFF5203230303520BFB5BEF7BAB8B0EDBCAD2E646F63> 第 46 期 定 期 柱 主 總 會 日 時 : 2006. 5. 26 午 前 11 時 場 所 : 大 熊 本 社 講 堂 株 式 會 社 大 熊 회 순 Ⅰ. 개회선언 Ⅱ. 국민의례 Ⅲ. 출석주주 및 출석주식수 보고 Ⅳ. 의장인사 Ⅴ. 회의의 목적사항 1. 보고사항 감사의 감사보고 영업보고 외부감사인 선임 보고 2. 의결사항 제1호 의안 : 제4기 대차대조표, 손익계산서

More information

<4D F736F F F696E74202D20BBB7BBB7C7D15F FBEDFB0A3B1B3C0B05FC1A638C0CFC2F72E BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20BBB7BBB7C7D15F FBEDFB0A3B1B3C0B05FC1A638C0CFC2F72E BC8A3C8AF20B8F0B5E55D> 뻔뻔한 AVR 프로그래밍 The Last(8 th ) Lecture 유명환 ( yoo@netplug.co.kr) INDEX 1 I 2 C 통신이야기 2 ATmega128 TWI(I 2 C) 구조분석 4 ATmega128 TWI(I 2 C) 실습 : AT24C16 1 I 2 C 통신이야기 I 2 C Inter IC Bus 어떤 IC들간에도공통적으로통할수있는 ex)

More information

i ii iii iv v vi vii viii 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 XXXXXXXX 22 24 25 26 27 28 29 30 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61

More information

KEY 디바이스 드라이버

KEY 디바이스 드라이버 KEY 디바이스드라이버 임베디드시스템소프트웨어 I (http://et.smu.ac.kr et.smu.ac.kr) 차례 GPIO 및 Control Registers KEY 하드웨어구성 KEY Driver 프로그램 key-driver.c 시험응용프로그램 key-app.c KEY 디바이스드라이버 11-2 GPIO(General-Purpose Purpose I/O)

More information

- i - - ii - - i - - ii - - i - - ii - - iii - - iv - - v - - vi - - vii - - viii - - ix - - x - - xi - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - - 8 - - 9 - - 10 - - 11 - - 12 - - 13 - - 14 - - 15 -

More information

CONTENTS.HWP

CONTENTS.HWP i ii iii iv v vi vii viii ix x xi - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - - 8 - - 9 - - 10 - - 11 - - 12 - - 13 - - 14 - - 15 - - 16 - - 17 - - 18 - - 19 - - 20 - - 21 - - 22 - - 23 - - 24 - - 25 -

More information

INDUS-8.HWP

INDUS-8.HWP i iii iv v vi vii viii ix x xi 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64

More information

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx #include int main(void) { int num; printf( Please enter an integer "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; } 1 학습목표 을 작성하면서 C 프로그램의

More information

SRC PLUS 제어기 MANUAL

SRC PLUS 제어기 MANUAL ,,,, DE FIN E I N T R E A L L O C E N D SU B E N D S U B M O TIO

More information

Microsoft Word - FunctionCall

Microsoft Word - FunctionCall Function all Mechanism /* Simple Program */ #define get_int() IN KEYOARD #define put_int(val) LD A val \ OUT MONITOR int add_two(int a, int b) { int tmp; tmp = a+b; return tmp; } local auto variable stack

More information

Microsoft PowerPoint - es-arduino-lecture-03

Microsoft PowerPoint - es-arduino-lecture-03 임베디드시스템개론 : Arduino 활용 Lecture #3: Button Input & FND Control 2012. 3. 25 by 김영주 강의목차 디지털입력 Button switch 입력 Button Debounce 7-Segment FND : 직접제어 7-Segment FND : IC 제어 2 디지털입력 : Switch 입력 (1) 실습목표 아두이노디지털입력처리실습

More information

lecture4(6.범용IO).hwp

lecture4(6.범용IO).hwp 제 2 부 C-언어를 사용한 마이크로컨트롤러 활용기초 66 C-언어는 수학계산을 위해 개발된 FORTRAN 같은 고급언어들과는 달 리 Unix 운영체제를 개발하면서 같이 개발된 고급언어이다. 운영체제의 특성상 C-언어는 다른 고급언어에 비해 컴퓨터의 하드웨어를 직접 제어할 수 있는 능력이 탁월하여 마이크로프로세서의 프로그램에 있어서 어셈블 리와 더불어 가장

More information

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F >

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F > 10주차 문자 LCD 의인터페이스회로및구동함수 Next-Generation Networks Lab. 5. 16x2 CLCD 모듈 (HY-1602H-803) 그림 11-18 19 핀설명표 11-11 번호 분류 핀이름 레벨 (V) 기능 1 V SS or GND 0 GND 전원 2 V Power DD or V CC +5 CLCD 구동전원 3 V 0 - CLCD 명암조절

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Verilog: Finite State Machines CSED311 Lab03 Joonsung Kim, joonsung90@postech.ac.kr Finite State Machines Digital system design 시간에배운것과같습니다. Moore / Mealy machines Verilog 를이용해서어떻게구현할까? 2 Finite State

More information

ATmega128

ATmega128 ATmega128 외부인터럽트실습 Prof. Jae Young Choi ( 최재영교수 ) (2015 Spring) Prof. Jae Young Choi 외부인터럽트실험 외부인터럽트를사용하기위해관렦레지스터를설정 일반적으로 I/O 포트에대한설정이끝난후에외부인터럽트나타이머 / 카운터설정 PE4~7 번까지 4 개의외부인터럽트 INT4~INT7 까지사용 외부인터럽트사용법요약

More information

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다.

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다. Eclipse 개발환경에서 WindowBuilder 를이용한 Java 프로그램개발 이예는 Java 프로그램의기초를이해하고있는사람을대상으로 Embedded Microcomputer 를이용한제어시스템을 PC 에서 Serial 통신으로제어 (Graphical User Interface (GUI) 환경에서 ) 하는프로그램개발예를설명한다. WindowBuilder:

More information

CONTENTS C U B A I C U B A 8 Part I Part II Part III Part IV Part V Part VI Part VII Part VIII Part IX 9 C U B A 10 Part I Part II Part III Part IV Part V Part VI Part VII Part VIII Part IX 11 C U B

More information

Chapter #01 Subject

Chapter #01  Subject Device Driver March 24, 2004 Kim, ki-hyeon 목차 1. 인터럽트처리복습 1. 인터럽트복습 입력검출방법 인터럽트방식, 폴링 (polling) 방식 인터럽트서비스등록함수 ( 커널에등록 ) int request_irq(unsigned int irq, void(*handler)(int,void*,struct pt_regs*), unsigned

More information

hd1300_k_v1r2_Final_.PDF

hd1300_k_v1r2_Final_.PDF Starter's Kit for HelloDevice 1300 Version 11 1 2 1 2 3 31 32 33 34 35 36 4 41 42 43 5 51 52 6 61 62 Appendix A (cross-over) IP 3 Starter's Kit for HelloDevice 1300 1 HelloDevice 1300 Starter's Kit HelloDevice

More information

Chap06(Interprocess Communication).PDF

Chap06(Interprocess Communication).PDF Interprocess Communication 2002 2 Hyun-Ju Park Introduction (interprocess communication; IPC) IPC data transfer sharing data event notification resource sharing process control Interprocess Communication

More information

<4D F736F F D20BDBAC5D7C7CE20B6F3C0CEC6AEB7B9C0CCBCADB0ADC1C2202D203420C7C1B7CEB1D7B7A1B9D62E646F63>

<4D F736F F D20BDBAC5D7C7CE20B6F3C0CEC6AEB7B9C0CCBCADB0ADC1C2202D203420C7C1B7CEB1D7B7A1B9D62E646F63> 라인트레이서강좌 4. 프로그래밍 2005년 8월 1일류대우 (davidryu@newtc.co.kr) 1. 라인트레이서란? 라인트레이서는정해진주행선을따라움직이는자율이동로봇이다. 현재공장자동화부분에서이용되고있는무인반송차가라인트레이서이다. 라인트레이서의기본적인원리는주어진주행선을센서로검출하여이것에따라목적위치까지이동하는것이다. 라인트레이서는크게 3부분 - 컨트롤러부,

More information

Microsoft PowerPoint - polling.pptx

Microsoft PowerPoint - polling.pptx 지현석 (binish@home.cnu.ac.kr) http://binish.or.kr Index 이슈화된키보드해킹 최근키보드해킹이슈의배경지식 Interrupt VS polling What is polling? Polling pseudo code Polling 을이용한키로거분석 방어기법연구 이슈화된키보드해킹 키보드해킹은연일상한가! 주식, 펀드투자의시기?! 최근키보드해킹이슈의배경지식

More information

C++-¿Ïº®Çؼ³10Àå

C++-¿Ïº®Çؼ³10Àå C C++. (preprocessor directives), C C++ C/C++... C++, C. C++ C. C C++. C,, C++, C++., C++.,.. #define #elif #else #error #if #itdef #ifndef #include #line #pragma #undef #.,.,. #include #include

More information

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202834C1D6C2F7207E2038C1D6C2F729>

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202834C1D6C2F7207E2038C1D6C2F729> 7주차 AVR의 A/D 변환기제어레지스터및관련실습 Next-Generation Networks Lab. 3. 관련레지스터 표 9-4 레지스터 ADMUX ADCSRA ADCH ADCL 설명 ADC Multiplexer Selection Register ADC 의입력채널선택및기준전압선택외 ADC Control and Status Register A ADC 의동작을설정하거나동작상태를표시함

More information

00-1표지

00-1표지 summary _I II_ summary _III 1 1 2 2 5 5 5 8 10 12 13 14 18 24 28 29 29 33 41 45 45 45 45 47 IV_ contents 48 48 48 49 50 51 52 55 60 60 61 62 63 63 64 64 65 65 65 69 69 69 74 76 76 77 78 _V 78 79 79 81

More information

chap01_time_complexity.key

chap01_time_complexity.key 1 : (resource),,, 2 (time complexity),,, (worst-case analysis) (average-case analysis) 3 (Asymptotic) n growth rate Θ-, Ο- ( ) 4 : n data, n/2. int sample( int data[], int n ) { int k = n/2 ; return data[k]

More information

인터럽트 (Interrupt) 범용입출력포트에서입출력의내용을처리하기위해매번입출력을요구하는플래그를검사하는일 (Pollong) 에대하여마이크로컨트롤러에게는상당한시간을소비하게만든다. 인터럽트란 CPU가현재처리하고있는일보다급하게처리해야할사건이발생했을때, 현재수행중인일을중단하고

인터럽트 (Interrupt) 범용입출력포트에서입출력의내용을처리하기위해매번입출력을요구하는플래그를검사하는일 (Pollong) 에대하여마이크로컨트롤러에게는상당한시간을소비하게만든다. 인터럽트란 CPU가현재처리하고있는일보다급하게처리해야할사건이발생했을때, 현재수행중인일을중단하고 CHAPTER 7 인터럽트 가. 레지스터구조이해하기 나. 엔코더제어하기 인터럽트 (Interrupt) 범용입출력포트에서입출력의내용을처리하기위해매번입출력을요구하는플래그를검사하는일 (Pollong) 에대하여마이크로컨트롤러에게는상당한시간을소비하게만든다. 인터럽트란 CPU가현재처리하고있는일보다급하게처리해야할사건이발생했을때, 현재수행중인일을중단하고급한일을처리한후에본래의일을다시수행하는것을말한다.

More information

*통신1802_01-도비라및목차1~11

*통신1802_01-도비라및목차1~11 ISSN 25-2693 218. 2 218. 2 214 215 216 217 2.6 2.9 1.5 1.8 1.2 3.1 3.2 1.3 2.1 1.8 2.6 2.5 2.8 2.4.4 1.4.9 1.4 1.5 2.9 2.5 7.3 6.9 6.7 6.8 6.9 6.9 6.8 2.8 14 2.6 13 2.4 12 2.2 2. 11 1.8 1.6 1.4

More information

Microsoft Word - PEB08_USER_GUIDE.doc

Microsoft Word - PEB08_USER_GUIDE.doc 0. PEB08 이란? PEB08(PIC EVALUATION BOARD 8bits) 은 Microchip 8bit Device 개발을쉽고편리하게할수있는보드입니다. 1. 다양한 8bit Device 지원 기존대부분의 8bit 보드의경우일부 Pin-Count만지원을하였지만, PEB08은 PIC10, PIC12, PIC16, PIC18의 DIP Type Package의모든

More information

Microsoft Word - FS_ZigBee_Manual_V1.3.docx

Microsoft Word - FS_ZigBee_Manual_V1.3.docx FirmSYS Zigbee etworks Kit User Manual FS-ZK500 Rev. 2008/05 Page 1 of 26 Version 1.3 목 차 1. 제품구성... 3 2. 개요... 4 3. 네트워크 설명... 5 4. 호스트/노드 설명... 6 네트워크 구성... 6 5. 모바일 태그 설명... 8 6. 프로토콜 설명... 9 프로토콜 목록...

More information

Here is a "PLDWorld.com"... // EXCALIBUR... // Additional Resources // µc/os-ii... Page 1 of 23 Additional Resources: µc/os-ii Author: Source: HiTEL D

Here is a PLDWorld.com... // EXCALIBUR... // Additional Resources // µc/os-ii... Page 1 of 23 Additional Resources: µc/os-ii Author: Source: HiTEL D Page 1 of 23 Additional Resources: µc/os-ii Author: Source: HiTEL Digital Sig Date: 2004929 µ (1) uc/os-ii RTOS uc/os-ii EP7209 uc/os-ii, EP7209 EP7209,, CPU ARM720 Core CPU ARM7 CPU wwwnanowitcom10 '

More information

<4D F736F F F696E74202D20BBB7BBB7C7D15F FBEDFB0A3B1B3C0B05FC1A634C0CFC2F72E BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20BBB7BBB7C7D15F FBEDFB0A3B1B3C0B05FC1A634C0CFC2F72E BC8A3C8AF20B8F0B5E55D> 뻔뻔한 AVR 프로그래밍 The 4 th Lecture 유명환 ( yoo@netplug.co.kr) 1 시간 (Time) 에대한정의 INDEX 2 왜타이머 (Timer) 와카운터 (Counter) 인가? 3 ATmega128 타이머 / 카운터동작구조 4 ATmega128 타이머 / 카운터관련레지스터 5 뻔뻔한노하우 : 레지스터비트설정방법 6 ATmega128

More information

Chapter 4. LISTS

Chapter 4. LISTS C 언어에서리스트구현 리스트의생성 struct node { int data; struct node *link; ; struct node *ptr = NULL; ptr = (struct node *) malloc(sizeof(struct node)); Self-referential structure NULL: defined in stdio.h(k&r C) or

More information

crazyflie2 code reading subak.io

crazyflie2 code reading subak.io crazyflie2 code reading subak.io 2015-06-04 Drone Drone? : D.Camp 5F C : 2015. 6. 4 ( ) 7 ~ 8 Drone Drone SW Drone SW 5 OpenSource Drone 5 Drone Source Code Review 35 10 5 OpenSource Drone 5 ArduPilot

More information

Microsoft PowerPoint - ch03ysk2012.ppt [호환 모드]

Microsoft PowerPoint - ch03ysk2012.ppt [호환 모드] 전자회로 Ch3 iode Models and Circuits 김영석 충북대학교전자정보대학 2012.3.1 Email: kimys@cbu.ac.kr k Ch3-1 Ch3 iode Models and Circuits 3.1 Ideal iode 3.2 PN Junction as a iode 3.4 Large Signal and Small-Signal Operation

More information

Chap04(Signals and Sessions).PDF

Chap04(Signals and Sessions).PDF Signals and Session Management 2002 2 Hyun-Ju Park (Signal)? Introduction (1) mechanism events : asynchronous events - interrupt signal from users : synchronous events - exceptions (accessing an illegal

More information

untitled

untitled CAN BUS RS232 Line CAN H/W FIFO RS232 FIFO CAN S/W FIFO TERMINAL Emulator COMMAND Interpreter PROTOCOL Converter CAN2RS232 Converter Block Diagram > +- syntax

More information

ATmega128 교재 - 8장 EEPROM.hwp

ATmega128 교재 - 8장 EEPROM.hwp 8.1 EEPROM 과 Flash Memory ATmega128에는프로그램메모리로서 128KB의플래시메모리를내장하고있고데이터메모리로서 4KB의 EEPROM을내장하고있다. EEPROM과플래시메모리는하나의뿌리에서발전해온매우유사한메모리이지만사용방법이서로다르다. 이것들은오늘날독립된메모리소자로서도널리사용되고있으므로충분히알아둘필요가있다. EEPROM(Electrically

More information

표1

표1 i ii Korean System of National Accounts iii iv Korean System of National Accounts v vi Korean System of National Accounts vii viii Korean System of National Accounts 3 4 KOREAN SYSTEM OF NATIONAL ACCOUNTS

More information

[8051] 강의자료.PDF

[8051] 강의자료.PDF CY AC F0 RS1 RS0 OV - P 0xFF 0x80 0x7F 0x30 0x2F 0x20 0x1F 0x18 0x17 0x10 0x0F 0x08 0x07 0x00 0x0000 0x0FFF 0x1000 0xFFFF 0x0000 0xFFFF RAM SFR SMOD - - - GF1 GF0 PD IDL 31 19 18 9 12 13 14 15 1 2 3 4

More information

예제 1.1 ( 관계연산자 ) >> A=1:9, B=9-A A = B = >> tf = A>4 % 4 보다큰 A 의원소들을찾을경우 tf = >> tf = (A==B) % A

예제 1.1 ( 관계연산자 ) >> A=1:9, B=9-A A = B = >> tf = A>4 % 4 보다큰 A 의원소들을찾을경우 tf = >> tf = (A==B) % A 예제 1.1 ( 관계연산자 ) >> A=1:9, B=9-A A = 1 2 3 4 5 6 7 8 9 B = 8 7 6 5 4 3 2 1 0 >> tf = A>4 % 4 보다큰 A 의원소들을찾을경우 tf = 0 0 0 0 1 1 1 1 1 >> tf = (A==B) % A 의원소와 B 의원소가똑같은경우를찾을때 tf = 0 0 0 0 0 0 0 0 0 >> tf

More information

untitled

untitled - -, (insert) (delete) - - (insert) (delete) (top ) - - (insert) (rear) (delete) (front) A A B top A B C top push(a) push(b) push(c) A B top pop() top A B D push(d) top #define MAX_STACK_SIZE 100 int

More information

untitled

untitled CAN BUS RS232 Line Ethernet CAN H/W FIFO RS232 FIFO IP ARP CAN S/W FIFO TERMINAL Emulator COMMAND Interpreter ICMP TCP UDP PROTOCOL Converter TELNET DHCP C2E SW1 CAN RS232 RJ45 Power

More information

israel-내지-1-4

israel-내지-1-4 israel-내지-1-4 1904.1.1 12:49 AM 페이지1 mac2 2015. 11 Contents S T A T E O F I S R A E L 8 Part I Part II Part III Part IV Part V Part VI Part VII Part VIII 9 S T A T E O F I S R A E L 10 Part I Part

More information

(SW3704) Gingerbread Source Build & Working Guide

(SW3704) Gingerbread Source Build & Working Guide (Mango-M32F4) Test Guide http://www.mangoboard.com/ http://cafe.naver.com/embeddedcrazyboys Crazy Embedded Laboratory www.mangoboard.com cafe.naver.com/embeddedcrazyboys CRZ Technology 1 Document History

More information

5 167 Python Jon Franklin Python Python Python Python USB USB RS485 C Python DLL Python Python dll Python Python ctypes dll ctypes Python C Linux Wind

5 167 Python Jon Franklin Python Python Python Python USB USB RS485 C Python DLL Python Python dll Python Python ctypes dll ctypes Python C Linux Wind 5 167 Python Jon Franklin Python Python Python Python USB USB RS485 C Python DLL Python Python dll Python Python ctypes dll ctypes Python C Linux Windows Python C ctypes dll C dll C 168 159 168 DLL Windows

More information

61 62 63 64 234 235 p r i n t f ( % 5 d :, i+1); g e t s ( s t u d e n t _ n a m e [ i ] ) ; if (student_name[i][0] == \ 0 ) i = MAX; p r i n t f (\ n :\ n ); 6 1 for (i = 0; student_name[i][0]!= \ 0&&

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 System Software Experiment 1 Lecture 5 - Array Spring 2019 Hwansoo Han (hhan@skku.edu) Advanced Research on Compilers and Systems, ARCS LAB Sungkyunkwan University http://arcs.skku.edu/ 1 배열 (Array) 동일한타입의데이터가여러개저장되어있는저장장소

More information

1. What is AX1 AX1 Program은 WIZnet 사의 Hardwired TCP/IP Chip인 iinchip 들의성능평가및 Test를위해제작된 Windows 기반의 PC Program이다. AX1은 Internet을통해 iinchip Evaluation

1. What is AX1 AX1 Program은 WIZnet 사의 Hardwired TCP/IP Chip인 iinchip 들의성능평가및 Test를위해제작된 Windows 기반의 PC Program이다. AX1은 Internet을통해 iinchip Evaluation 1. What is AX1 AX1 Program은 WIZnet 사의 Hardwired TCP/IP Chip인 iinchip 들의성능평가및 Test를위해제작된 Windows 기반의 PC Program이다. AX1은 Internet을통해 iinchip Evaluation Board(EVB B/D) 들과 TCP/IP Protocol로연결되며, 연결된 TCP/IP

More information

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C D616E2E637070>

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C D616E2E637070> #include "stdafx.h" #include "Huffman.h" 1 /* 비트의부분을뽑아내는함수 */ unsigned HF::bits(unsigned x, int k, int j) return (x >> k) & ~(~0

More information

T100MD+

T100MD+ User s Manual 100% ) ( x b a a + 1 RX+ TX+ DTR GND TX+ RX+ DTR GND RX+ TX+ DTR GND DSR RX+ TX+ DTR GND DSR [ DCE TYPE ] [ DCE TYPE ] RS232 Format Baud 1 T100MD+

More information

[ 융합과학 ] 과학고 R&E 결과보고서 뇌파를이용한곤충제어 연구기간 : ~ 연구책임자 : 최홍수 ( 대구경북과학기술원 ) 지도교사 : 박경희 ( 부산일과학고 ) 참여학생 : 김남호 ( 부산일과학고 ) 안진웅 ( 부산일과학고 )

[ 융합과학 ] 과학고 R&E 결과보고서 뇌파를이용한곤충제어 연구기간 : ~ 연구책임자 : 최홍수 ( 대구경북과학기술원 ) 지도교사 : 박경희 ( 부산일과학고 ) 참여학생 : 김남호 ( 부산일과학고 ) 안진웅 ( 부산일과학고 ) [ 융합과학 ] 과학고 R&E 결과보고서 뇌파를이용한곤충제어 연구기간 : 2013. 3. 1 ~ 2014. 2. 28 연구책임자 : 최홍수 ( 대구경북과학기술원 ) 지도교사 : 박경희 ( 부산일과학고 ) 참여학생 : 김남호 ( 부산일과학고 ) 안진웅 ( 부산일과학고 ) 장은영 ( 부산일과학고 ) 정우현 ( 부산일과학고 ) 조아현 ( 부산일과학고 ) 1 -

More information

hlogin7

hlogin7 0x07. Return Oriented Programming ROP? , (DEP, ASLR). ROP (Return Oriented Programming) (excutable memory) rop. plt, got got overwrite RTL RTL Chain DEP, ASLR gadget Basic knowledge plt, got call function

More information

Microsoft PowerPoint - AVR 시리얼 통신.ppt [호환 모드]

Microsoft PowerPoint - AVR 시리얼 통신.ppt [호환 모드] AVR UART 통신 류대우 davidryu@newtc.co.kr 시리얼 (Serial) 통신이란? Serial 통신은하나의신호선을이용해서데이터를비트단위로보내는방식 8 비트비동기식통신콘트롤러 (UART : Universal Asynchronous Receiver Transmitter) 데이터는 LSB 부터 MSB 순으로데이터전송 Serial interface

More information

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어 개나리 연구소 C 언어 노트 (tyback.egloos.com) 프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어먹고 하더라구요. 그래서,

More information

4 CD Construct Special Model VI 2 nd Order Model VI 2 Note: Hands-on 1, 2 RC 1 RLC mass-spring-damper 2 2 ζ ω n (rad/sec) 2 ( ζ < 1), 1 (ζ = 1), ( ) 1

4 CD Construct Special Model VI 2 nd Order Model VI 2 Note: Hands-on 1, 2 RC 1 RLC mass-spring-damper 2 2 ζ ω n (rad/sec) 2 ( ζ < 1), 1 (ζ = 1), ( ) 1 : LabVIEW Control Design, Simulation, & System Identification LabVIEW Control Design Toolkit, Simulation Module, System Identification Toolkit 2 (RLC Spring-Mass-Damper) Control Design toolkit LabVIEW

More information

Section 03 인터럽트활성화와인터럽트서비스루틴연결 34/82 장치에대한인터럽트설정과활성화 내부장치에대한특수레지스터존재 장치의특성을반영한동작설정용또는상태관찰용비트로구성 인터럽트사건의발생패턴을설정해야함 인터럽트활성화비트를 1 로셋하여, 인터럽트발생을허락» 전제, 전역

Section 03 인터럽트활성화와인터럽트서비스루틴연결 34/82 장치에대한인터럽트설정과활성화 내부장치에대한특수레지스터존재 장치의특성을반영한동작설정용또는상태관찰용비트로구성 인터럽트사건의발생패턴을설정해야함 인터럽트활성화비트를 1 로셋하여, 인터럽트발생을허락» 전제, 전역 Section 03 인터럽트활성화와인터럽트서비스루틴연결 33/82 Section 03 인터럽트활성화와인터럽트서비스루틴연결 34/82 장치에대한인터럽트설정과활성화 내부장치에대한특수레지스터존재 장치의특성을반영한동작설정용또는상태관찰용비트로구성 인터럽트사건의발생패턴을설정해야함 인터럽트활성화비트를 1 로셋하여, 인터럽트발생을허락» 전제, 전역인터럽트활성화비트가 1 로셋되었을때

More information

<4D F736F F F696E74202D20B8AEB4AABDBA20BFC0B7F920C3B3B8AEC7CFB1E22E BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20B8AEB4AABDBA20BFC0B7F920C3B3B8AEC7CFB1E22E BC8A3C8AF20B8F0B5E55D> 리눅스 오류처리하기 2007. 11. 28 안효창 라이브러리함수의오류번호얻기 errno 변수기능오류번호를저장한다. 기본형 extern int errno; 헤더파일 라이브러리함수호출에실패했을때함수예 정수값을반환하는함수 -1 반환 open 함수 포인터를반환하는함수 NULL 반환 fopen 함수 2 유닉스 / 리눅스 라이브러리함수의오류번호얻기 19-1

More information

Embeddedsystem(8).PDF

Embeddedsystem(8).PDF insmod init_module() register_blkdev() blk_init_queue() blk_dev[] request() default queue blkdevs[] block_device_ops rmmod cleanup_module() unregister_blkdev() blk_cleanup_queue() static struct { const

More information

C# Programming Guide - Types

C# Programming Guide - Types C# Programming Guide - Types 최도경 lifeisforu@wemade.com 이문서는 MSDN 의 Types 를요약하고보충한것입니다. http://msdn.microsoft.com/enus/library/ms173104(v=vs.100).aspx Types, Variables, and Values C# 은 type 에민감한언어이다. 모든

More information

임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과

임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 System call table and linkage v Ref. http://www.ibm.com/developerworks/linux/library/l-system-calls/ - 2 - Young-Jin Kim SYSCALL_DEFINE 함수

More information

Motor

Motor Interactive Workshop for Artists & Designers Earl Park Motor Servo Motor Control #include Servo myservo; // create servo object to control a servo int potpin = 0; // analog pin used to connect

More information

Microsoft Word - ASG AT90CAN128 모듈.doc

Microsoft Word - ASG AT90CAN128 모듈.doc ASG AT90128 Project 3 rd Team Author Cho Chang yeon Date 2006-07-31 Contents 1 Introduction... 3 2 Schematic Revision... 4 3 Library... 5 3.1 1: 1 Communication... 5 iprinceps - 2-2006/07/31

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 KeyPad Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 에는 16 개의 Tack Switch 를사용하여 4 행 4 열의 Keypad 가장착 4x4 Keypad 2 KeyPad 를제어하기위하여 FPGA 내부에 KeyPad controller 가구현 KeyPad controller 16bit 로구성된

More information

AVR-GCC SRAM 에서의변수및상수특별히속성을정하지않고변수를정의하면 SRAM 영역에저장된다. 이것들은외부메모리에저장되는경우에비하여빠르게엑세스할수있다. 축약표현은 <stdio.h> 에정의되어있다. 그러나, <io.h> 를인클루드하면내부적으로 <stdio.h> 파일을자

AVR-GCC SRAM 에서의변수및상수특별히속성을정하지않고변수를정의하면 SRAM 영역에저장된다. 이것들은외부메모리에저장되는경우에비하여빠르게엑세스할수있다. 축약표현은 <stdio.h> 에정의되어있다. 그러나, <io.h> 를인클루드하면내부적으로 <stdio.h> 파일을자 AVR-GCC SRAM 에서의변수및상수특별히속성을정하지않고변수를정의하면 SRAM 영역에저장된다. 이것들은외부메모리에저장되는경우에비하여빠르게엑세스할수있다. 축약표현은 에정의되어있다. 그러나, 를인클루드하면내부적으로 파일을자동인클루드하도록연결되어있다. - AVR-GCC 에서데이터의형및이름축약하여표현방법 일반적인데이터형의표현

More information

AN_0005B_UART

AN_0005B_UART CANTUS-CAN - UART - 32bits EISC Microprocessor CANTUS Ver 1.1 April 24, 213 Advanced Digital Chips Inc. Ver 1.1 CANTUS Application Note History 213-2-19 Released 213-4-24 Modified CANTUS-CAN CANTUS-CAN

More information

슬라이드 1

슬라이드 1 -Part3- 제 4 장동적메모리할당과가변인 자 학습목차 4.1 동적메모리할당 4.1 동적메모리할당 4.1 동적메모리할당 배울내용 1 프로세스의메모리공간 2 동적메모리할당의필요성 4.1 동적메모리할당 (1/6) 프로세스의메모리구조 코드영역 : 프로그램실행코드, 함수들이저장되는영역 스택영역 : 매개변수, 지역변수, 중괄호 ( 블록 ) 내부에정의된변수들이저장되는영역

More information

MicrocontrollerAcademy_Lab_ST_040709

MicrocontrollerAcademy_Lab_ST_040709 Micro-Controller Academy Program Lab Materials STMicroelectronics ST72F324J6B5 Seung Jun Sang Sa Ltd. Seung Jun Sang Sa Ltd. Seung Jun Sang Sa Ltd. Seung Jun Sang Sa Ltd. Seung Jun Sang Sa Ltd. Seung Jun

More information

1

1 - - - Data Sheet Copyright2002, SystemBase Co, Ltd - 1 - A0 A1 A2 CS0#, CS1# CS2#, CS3# CTS0#, CTS1# CTS2, CTS3# D7~D3, D2~D0 DCD0#, DCD1# DCD2#, DCD3# DSR0#, DSR1# DSR2#, DSR3# DTR0#, DTR1# DTR2#, DTR3#

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Web server porting 2 Jo, Heeseung Web 을이용한 LED 제어 Web 을이용한 LED 제어프로그램 web 에서데이터를전송받아타겟보드의 LED 를조작하는프로그램을작성하기위해다음과같은소스파일을생성 2 Web 을이용한 LED 제어 LED 제어프로그램작성 8bitled.html 파일을작성 root@ubuntu:/working/web# vi

More information

ez-md+_manual01

ez-md+_manual01 ez-md+ HDMI/SDI Cross Converter with Audio Mux/Demux Operation manual REVISION NUMBER: 1.0.0 DISTRIBUTION DATE: NOVEMBER. 2018 저작권 알림 Copyright 2006~2018 LUMANTEK Co., Ltd. All Rights Reserved 루먼텍 사에서

More information

UI TASK & KEY EVENT

UI TASK & KEY EVENT KEY EVENT & STATE 구현 2007. 1. 25 PLATFORM TEAM 정용학 차례 Key Event HS TASK UI TASK LONG KEY STATE 구현 소스코드및실행화면 질의응답및토의 2 KEY EVENT - HS TASK hs_task keypad_scan_keypad hs_init keypad_pass_key_code keypad_init

More information

Microsoft Word - KPMC-400,401 SW 사용 설명서

Microsoft Word - KPMC-400,401 SW 사용 설명서 LKP Ethernet Card SW 사용설명서 Version Information Tornado 2.0, 2.2 알 림 여기에실린내용은제품의성능향상과신뢰도의증대를위하여예고없이변경될수도있습니다. 여기에실린내용의일부라도엘케이일레븐의사전허락없이어떠한유형의매체에복사되거나저장될수없으며전기적, 기계적, 광학적, 화학적인어떤방법으로도전송될수없습니다. 엘케이일레븐경기도성남시중원구상대원동

More information

*통신1604_01-도비라및목차1~12

*통신1604_01-도비라및목차1~12 ISSN 25-2693 216. 4 216. 4 213 214 215 1.5 2.4 2.4.6 3.9 2. 1.4 -.3.9 1.6 2.3 1.6 1.2 1.3 1.4..5 4.6-1.4 1.4-1.1 7.7 7.3 6.9 7. 7. 6.9 6.8 14 13 12 11 1 9 8 7 5 4 3 2 1 i 4 4 3 3 2. 1.5 1. 2.

More information

0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4

0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4 Introduction to software design 2012-1 Final 2012.06.13 16:00-18:00 Student ID: Name: - 1 - 0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x

More information

chap7.key

chap7.key 1 7 C 2 7.1 C (System Calls) Unix UNIX man Section 2 C. C (Library Functions) C 1975 Dennis Ritchie ANSI C Standard Library 3 (system call). 4 C?... 5 C (text file), C. (binary file). 6 C 1. : fopen( )

More information