Microsoft PowerPoint - lab15.pptx

Size: px
Start display at page:

Download "Microsoft PowerPoint - lab15.pptx"

Transcription

1 Mobile & Embedded System Lab. Dept. of Computer Engineering Kyung Hee Univ.

2 TextLCD Device Control in Embedded Linux M3 모듈에장착되어있는 Tedxt LCD 장치를제어하는 App을개발 TextLCD는영문자와숫자일본어, 특수문자를표현하는데사용되는디바이스 HBE-SM5-S4210의 TextLCD는 16문자 *2라인을 Display 할수있으며, 이 TextLCD를제어하기위하여 FPGA 내부에 Controller가설계되어있다. 2

3 TextLCD Device Control in Embedded Linux TextLCD 모듈은 8bit 의 micro-processor 와 2 개의레지스터 (DR, IR) 로구성되어있다. LCD 화면 RS HD R/W E DB0-DB7 입출력버퍼 IR DR DR CG HD 44100

4 TextLCD Device Control in Embedded Linux IR(Instruction Register) CPU 로부터받은데이터를써넣기만할수있다. LCD 화면클리어, 커서시프트, 글자 ON/OFF 등의 LCD 제어와관련된명령정보만을저장한다. 표시데이터 RAM(D.D.RAM) 과문자생성 RAM(C.G.RAM) 표시를위한 Address 정보를저장한다. P.5~P.12 까지 instruction 에대해설명 DR(Data Register) D.D.RAM 혹은 C.G.RAM 에써넣을데이터를저장하거나, D.D.RAM 혹은 C.G.RAM 으로부터읽혀진데이터가일시적으로저장되는레지스터이다. 또, CPU 로부터 DR 에써넣은데이터는 LCD 의내부동작으로 D.D.RAM 혹은 C.G.RAM 에자동으로써넣어진다.

5 TextLCD Device Control in Embedded Linux BIT TextLCD Control Register(read/write) Reserved CLCD_RS CLCD_RW CLCD_E CLCD_D7 CLCD_D6 CLCD_D5 CLCD_D4 CLCD_D3 CLCD_D2 CLCD_D1 CLCD_D0 Reset x x x x x Bits Name Description 0 CLCD_D0 CLCD Data Bit 0 1 CLCD_D1 CLCD Data Bit 1 2 CLCD_D2 CLCD Data Bit 2 3 CLCD_D3 CLCD Data Bit 3 4 CLCD_D4 CLCD Data Bit 4 5 CLCD_D5 CLCD Data Bit 5 6 CLCD_D6 CLCD Data Bit 6 7 CLCD_D7 CLCD Data Bit 7 8 CLCD_E CLCD Enable Bit (Active High) 9 CLCD_RW CLCD Read/Write Control Bit ( 1 read, 0 Write) 10 CLCD_RS CLCD Data Instruction Register Set

6 TextLCD Device Control in Embedded Linux TextLCD 모듈의제어명령표 기능 제어신호제어명령 (D0 ~ D7) 실행시간 RS R/W Clear Display ms Return Home us Entry Mode Set I/D S 40us Display on/off control Cursor or Display Shift D C S 40us S/C R/L us Function Set D/L N F us Set CG RAM Address CG RAM Address 40us Set DD RAM Address Read Busy Flag and Address Data Write to CG RAM or DD RAM Data Read to CG RAM or DD RAM DD RAM Address 40us 0 1 BF Address Counter 40us 1 0 Write Address 40us 1 1 Read Address 40us

7 TextLCD Device Control in Embedded Linux D.D.RAM Address Set DR 의문자가표시될커서위치 DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 1 A6 A5 A4 A3 A2 A1 A0 열 행 A 0B 0C 0D 0E 0F 행 A 4B 4C 4D 4E 4F

8 TextLCD Device Control in Embedded Linux C.G.RAM Address Set DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 1 A5 A4 A3 A2 A1 A0

9 TextLCD Device Control in Embedded Linux Function Set DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB DL N F x x DL=1: 8 비트 (DB7~DB0) 인터페이스세트 DL=0: 4 비트 (DB7~DB4) 인터페이스세트상위 4 비트전송후하위 4 비트전송 N: 표시행수를설정 F: 문자폰트를설정 N F 표시행수 문자폰트 듀티비 x7 도트 1/ x10 도트 1/11 1 x 2 5x7 도트 1/16

10 TextLCD Device Control in Embedded Linux Cursor/Display Shift DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB S/C R/L x x D.D.RAM 의내용은변경하지않고커서이동과표시쉬프트를한다. 커서의이동은 1 행의 40 번째에서 2 행의처음으로온다. 그러나표시쉬프트는두행이동시에수행된다. S/C R/L 동작 0 0 커서위치를좌로이동 (AC -= 1) 0 1 커서위치를우로이동 (AC += 1) 1 0 표시전체를좌로이동. 표시는커서에따라움직인다. 1 1 표시전체를우로이동. 커서는움직이지않는다.

11 TextLCD Device Control in Embedded Linux Display ON/OFF control DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB D C B 표시 ON/OFF, 커서 ON/OFF, 커서위치에있는문자의 blink ON/OFF 를설정한다. 비트 1 0 D 표시 ON 표시 OFF C 커서 ON 커서 OFF B 문자 blink ON 문자 blink OFF

12 TextLCD Device Control in Embedded Linux Entry mode DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB I/D S 커서의진행방향이나표시된문자를시프트시킬것인지를설정한다. I/D(Increment/Decrement): I/D = 1 (Address + 1 ) I/D = 0 (Address 1 ) S(Shift): S=1 일때표시된문자전체를좌 / 우로이동 ID=1, S=1 : 왼쪽으로 shift ID=0, S=1 : 오른쪽으로 shift S = 0 : 표시된문자는 shift 되지않는다.

13 TextLCD Device Control in Embedded Linux Cursor Home DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB x 커서를 LCD 맨처음으로돌아가게한다. 이때 AC 에 D.D.RAM 의 address 에 0 번지가 set 된다. x : 보통무효비트라고하며, 0 값이든 1 값이든상관없다.

14 TextLCD Device Control in Embedded Linux Display clear DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB 화면클리어후커서는홈위치로돌아간다. 그리고 D.D.RAM 의모든어드레스에스페이스코드인 0x20 이들어가고 AC(Address Counter) 에 D.D.RAM 어드레스 0 번지가세트된다. AC 는 D.D./C.G.RAM 으로데이터를쓰거나기억된데이터를읽을때목적지가되는 RAM 의어드레스를지정한다. IR 에어드레스세트인스트럭션을써넣으면 IR 에서 AC 로어드레스정보가전송되는것이다.

15 TextLCD Device Driver Device Driver Version 소스파일작성 TextLcd 리눅스디바이스드라이버는커널에포함되어있다. menuconfig 실행 Device Drivers -> [*] Misc devices -> [*] Hanback Electronics M3(FPGA) Device Support -> <*>TEXT LCD make menuconfig 15

16 TextLCD Device Driver 소스파일확인 소스코드는 ~/working/linux s4210/drivers/misc/hanback 에있다. cd drivers/misc/hanback vi textlcd.c 001: #include <linux/init.h> 002: #include <linux/module.h> 003: #include <linux/kernel.h> 004: #include <linux/fs.h> 005: #include <linux/errno.h> 006: #include <linux/types.h> 007: #include <linux/ioport.h> 008: #include <asm/io.h> 009: #include <asm/ioctl.h> 010: #include <asm/uaccess.h> 011: #include <linux/delay.h> 012: #include <linux/miscdevice.h> 013: #include <linux/platform_device.h> 014: #include <linux/mm.h> 015: #include <asm/cacheflush.h> 016: #include "textlcd.h" 017: 16

17 TextLCD Device Driver 018: void setcommand(unsigned short command) 019: { 020: command &= 0x00FF; 022: *textlcd_ioremap = command 0x0000; 023: mdelay(1); 024: *textlcd_ioremap = command 0x0100; 025: mdelay(1); 026: *textlcd_ioremap = command 0x0000; 027: mdelay(1); 028: } 030: void writebyte(char ch) 031: { 032: unsigned short data; 033: data = ch & 0x00FF; 034: 035: *textlcd_ioremap = data & 0x400; 036: mdelay(1); 037: *textlcd_ioremap = data 0x500; 038: mdelay(1); 039: *textlcd_ioremap = data 0x400; 040: mdelay(1); 041: } 17

18 TextLCD Device Driver 043: void initialize_textlcd() 044: { 045: function_set(2,0); //Function Set:8bit,display 2lines,5x7mode 046: display_control(1,0,0); // Display on, Cursor off 047: clear_display(); // Display clear 048: entry_mode_set(1,0); // Entry Mode Set : shift right cursor 049: return_home(); // go home 050: } 051: 052: int function_set(int rows, int nfonts) 053: { 054: unsigned short command = 0x30; 055: 056: if(rows == 2) command = 0x08; 057: else if(rows == 1) command &= 0xf7; 058: else return -1; 059: 060: command = nfonts? (command 0x04) : command; 061: setcommand(command); 062: return 1; 063: } 18

19 TextLCD Device Driver 065: int display_control(int display_enable, int cursor_enable, int n blink) 066: { 067: unsigned short command = 0x08; 068: command = display_enable? (command 0x04) : command; 069: command = cursor_enable? (command 0x02) : command; 070: command = nblink? (command 0x01) : command; 071: setcommand(command); 072: return 1; 073: } 074: 075: int cursor_shift(int set_screen, int set_rightshit) 076: { 077: unsigned short command = 0x10; 078: command = set_screen? (command 0x08) : command; 079: command = set_rightshit? (command 0x04) : command; 080: setcommand(command); 081: return 1; 082: } 19

20 TextLCD Device Driver 084: int entry_mode_set(int increase, int nshift) 085: { 086: unsigned short command = 0x04; 087: command = increase? (command 0x2) : command; 088: command = nshift? ( command 0x1) : command; 089: setcommand(command); 090: return 1; 091: } 092: 093: int return_home() 094: { 095: unsigned short command = 0x02; 096: setcommand(command); 097: return 1; 098: } 099: 100: int clear_display() 101: { 102: unsigned short command = 0x01; 103: setcommand(command); 104: return 1; 105: } 20

21 TextLCD Device Driver 107: int set_ddram_address(int pos) 108: { 109: unsigned short command = 0x80; 110: command += pos; 111: setcommand(command); 112: return 1; 113: } 115: static int textlcd_open(struct inode *minode, struct file *mfile ) 116: { 117: if(textlcd_usage!= 0) return -EBUSY; 118: 119: textlcd_ioremap= (unsigned short *)ioremap(textlcd_address,tex TLCD_ADDRESS_RANGE); 120: 121: if(!check_mem_region((unsigned long)textlcd_ioremap,textlcd_a DDRESS_RANGE)) 122: { 123: request_mem_region((unsigned long)textlcd_ioremap,textlcd _ADDRESS_RANGE,TEXTLCD_NAME); 124: } 21

22 TextLCD Device Driver 125: else printk(kern_warning"can't get IO Region 0x%x\n",TEXTLC D_ADDRESS); 126: 127: textlcd_usage = 1; 128: initialize_textlcd(); 129: return 0; 130: } 131: 132: static int textlcd_release(struct inode *minode, struct file *mf ile) 133: { 134: iounmap(textlcd_ioremap); 135: 136: release_mem_region((unsigned long)textlcd_ioremap,textlcd_a DDRESS_RANGE); 137: 138: textlcd_usage = 0; 139: return 0; 140: } 22

23 TextLCD Device Driver 142: static ssize_t textlcd_write(struct file *inode, const char*gdat a, size_t length, loff_t *off_what) 143: { 144: int i,ret; 145: char buf[100]; 146: 147: ret=copy_from_user(buf,gdata,length); 148: 149: if(ret < 0) return -1; 150: 151: for(i=0;i<length;i++) { 152: writebyte(buf[i]); 153: } 154: return length; 155: } 156: 157: static int textlcd_ioctl(struct inode *inode, struct file *file, unsigned int cmd,unsigned long gdata) 158: { 159: struct strcommand_varible strcommand; 160: int ret; 23

24 TextLCD Device Driver 161: 162: ret=copy_from_user(&strcommand,(char *)gdata,32); 163: if(ret<0) return -1; 164: 165: switch(cmd){ 166: case TEXTLCD_COMMAND_SET: 167: setcommand(strcommand.command); 168: break; 169: case TEXTLCD_FUNCTION_SET: 170: function_set((int)(strcommand.rows+1),(int)(strcommand. nfonts)); 171: break; 172: case TEXTLCD_DISPLAY_CONTROL: 173: display_control((int)strcommand.display_enable, 174: (int)strcommand.cursor_enable,(int)strcommand.nblink); 175: break; 176: case TEXTLCD_CURSOR_SHIFT: 177: cursor_shift((int)strcommand.set_screen,(int)strcommand.set_rightshit); 178: break; 24

25 TextLCD Device Driver 179: case TEXTLCD_ENTRY_MODE_SET: 180: entry_mode_set((int)strcommand.increase,(int)strc ommand.nshift); 181: break; 182: case TEXTLCD_RETURN_HOME: 183: return_home(); 184: break; 185: case TEXTLCD_CLEAR: 186: clear_display(); 187: break; 188: case TEXTLCD_DD_ADDRESS: 189: set_ddram_address((int)strcommand.pos); 190: break; 191: case TEXTLCD_WRITE_BYTE: 192: writebyte(strcommand.buf[0]); 193: break; 194: default: 195: printk("driver : no such command!\n"); 196: return -ENOTTY; 197: } 198: return 0; 199: } 25

26 TextLCD Device Driver 201: static struct file_operations textlcd_fops = { 202:.owner = THIS_MODULE, 203:.open = textlcd_open, 204:.write = textlcd_write, 205:.ioctl = textlcd_ioctl, 206:.release = textlcd_release, 207: }; 208: 209: static struct miscdevice text_driver = { 210:.fops = &textlcd_fops, 211:.name = TEXTLCD_NAME, 212:.minor = MISC_DYNAMIC_MINOR, 213: }; 214: 215: int textlcd_init(void) 216: { 217: misc_register(&text_driver); 218: return 0; 219: } 26

27 TextLCD Device Driver 221: void textlcd_exit(void) 222: { 223: misc_deregister(&text_driver); 224: printk("driver: %s DRIVER EXIT\n", TEXTLCD_NAME); 225: } 226: 227: module_init(textlcd_init); 228: module_exit(textlcd_exit); 229: 230: MODULE_AUTHOR(DRIVER_AUTHOR); 231: MODULE_DESCRIPTION(DRIVER_DESC); 232: MODULE_LICENSE("Dual BSD/GPL"); 27

28 TextLCD Application Program 테스트프로그램작성 소스코드는 [CD3]/source/application_peri/device_driver/textlcd_driver에있다. ( 밑에작성하는 Makefile도동일한위치에있다.) root@ubuntu:~/working/device_driver/textlcd_driver# vi textlcd_test.c 001: #include <stdio.h> 002: #include <stdlib.h> 003: #include <string.h> 004: #include <unistd.h> 005: #include <sys/types.h> 006: #include <sys/stat.h> 007: #include <fcntl.h> 008: #include <sys/ioctl.h> 009: 010: #define TEXTLCD_BASE 0xbc 011: #define TEXTLCD_COMMAND_SET _IOW(TEXTLCD_BASE,0,int) 012: #define TEXTLCD_FUNCTION_SET _IOW(TEXTLCD_BASE,1,int) 28

29 TextLCD Application Program 013: #define TEXTLCD_DISPLAY_CONTROL _IOW(TEXTLCD_BASE,2,int) 014: #define TEXTLCD_CURSOR_SHIFT _IOW(TEXTLCD_BASE,3,int) 015: #define TEXTLCD_ENTRY_MODE_SET _IOW(TEXTLCD_BASE,4,int) 016: #define TEXTLCD_RETURN_HOME _IOW(TEXTLCD_BASE,5,int) 017: #define TEXTLCD_CLEAR _IOW(TEXTLCD_BASE,6,int) 018: #define TEXTLCD_DD_ADDRESS _IOW(TEXTLCD_BASE,7,int) 019: #define TEXTLCD_WRITE_BYTE _IOW(TEXTLCD_BASE,8,int) 020: 021: struct strcommand_varible { 022: char rows; 023: char nfonts; 024: char display_enable; 025: char cursor_enable; 026: char nblink; 027: char set_screen; 028: char set_rightshit; 029: char increase; 030: char nshift; 031: char pos; 032: char command; 033: char strlength; 034: char buf[16]; 035: }; 29

30 TextLCD Application Program 037: int main(int argc, char **argv) 038: { 039: int i,dev; 040: char buf0[16] = "Welcome to the "; 041: char buf1[16] = "Embedded World!!"; 042: char buf2[16] = " HANBACK "; 043: char buf3[16] = " Electronics "; 044: 045: struct strcommand_varible strcommand; 046: strcommand.rows = 0; 047: strcommand.nfonts = 0; 048: strcommand.display_enable = 1; 049: strcommand.cursor_enable = 0; 050: strcommand.nblink = 0; 051: strcommand.set_screen = 0; 052: strcommand.set_rightshit = 1; 053: strcommand.increase = 1; 054: strcommand.nshift = 0; 055: strcommand.pos = 10; 056: strcommand.command = 1; 057: strcommand.strlength = 16; 30

31 TextLCD Application Program 059: dev = open("/dev/textlcd", O_WRONLY O_NDELAY ); 060: 061: if (dev!= -1) { 062: write(dev,buf0,16); 063: strcommand.pos = 40; 064: ioctl(dev,textlcd_dd_address,&strcommand,32); 065: write(dev,buf1,16); 066: sleep(1); 067: 068: ioctl(dev,textlcd_clear,&strcommand,32); 069: 070: strcommand.pos = 0; 071: ioctl(dev,textlcd_dd_address,&strcommand,32); 072: for(i=0;i<16;i++) { 073: strcommand.buf[0]=buf2[i]; 074: ioctl(dev,textlcd_write_byte,&strcommand,32); 075: } 31

32 TextLCD Application Program 076: 077: strcommand.pos = 40; 078: ioctl(dev,textlcd_dd_address,&strcommand,32); 079: for(i=0;i<16;i++) { 080: strcommand.buf[0]=buf3[i]; 081: ioctl(dev,textlcd_write_byte,&strcommand,32); 082: } 083: 084: if(argc>=2) { 085: sleep(1); 086: ioctl(dev,textlcd_clear,&strcommand,32); 087: write(dev,argv[1],strlen(argv[1])); 088: if(argc==3) { 089: strcommand.pos = 40; 090: ioctl(dev,textlcd_dd_address,&strcomman d,32); 091: write(dev,argv[2],strlen(argv[2])); 092: } 093: } 094: 095: close(dev); 32

33 TextLCD Application Program 096: } else { 097: printf( "application : Device Open ERROR!\n"); 098: exit(1); 099: } 100: return 0; 101: } 33

34 TextLCD Application Program vi Makefile CC = arm-linux-gcc CFLAGS = -DNO_DEBUG EXEC=textlcd_test OBJS=$(EXEC).o ####### Implicit rules.suffixes:.cpp.cxx.cc.c.c.cpp.o: $(CXX) -c $(CXXFLAGS) -o $@ $<.cxx.o: $(CXX) -c $(CXXFLAGS) -o $@ $<.cc.o: $(CXX) -c $(CXXFLAGS) -o $@ $<.C.o: $(CXX) -c $(CXXFLAGS) -o $@ $<.c.o: $(CC) -c $(CFLAGS) -o $@ $< all: $(EXEC) $(EXEC): $(OBJS) $(CC) -o $@ $^ clean: rm -f $(OBJS) $(EXEC) 34

35 TextLCD Application Program 컴파일 ls Makefile textlcd_test.c make clean;make 다음과같은메시지가출력된다 rm f textlcd_test.o textlcd_test arm-linux-gcc c DNO_DEBUG o textlcd_test.o textlcd_test.c arm-linux-gcc o textlcd_test textlcd_test.o root@ubuntu:~/working/device_driver/textlcd_driver# ls Makefile textlcd_test textlcd_test.c textlcd_test.o 타겟보드에다운받기및실행 타겟보드에서 tftp 로다운받기위해 textlcd_test 파일을 /var/lib/tftpboot 에복사 root@ubuntu:~/working/device_driver/textlcd_driver# cp tex tlcd _test /var/lib/tftpboot 35

36 TextLCD Application Program /var/lib/tftpboot로복사가완료되면타겟보드에서아래와같이명령어를입력 textlcd_test를다운받고 chmod 명령어를사용하여실행권한부여 ~]$ cd /root/device_driver device_driver]$ tftp -r textlcd_test -g device_driver]$ ll -rw-r--r-- 1 root root 7250 Sep :19 textlcd_test [root@sm5s4210 device_driver]$ chmod +x textlcd_test [root@sm5s4210 device_driver]$ ll -rwxr-xr-x 1 root root 7250 Sep :19 textlcd_test 36

37 TextLCD Application Program (mmap) mmap Version ~/working/mmap/textlcd 디렉터리에서 textlcd.c 작성 소스코드는 [CD3]/source/application_peri/mmap/textlcd에있다. ( 밑에작성하는 Makefile도동일한위치에있다.) root@ubuntu:# mkdir -p ~/working/mmap/textlcd root@ubuntu:# cd ~/working/mmap/textlcd/ root@ubuntu:~/working/mmap/textlcd# vi textlcd.c 001: #include <stdio.h> 002: #include <string.h> 003: #include <stdlib.h> 004: #include <unistd.h> 005: #include <sys/mman.h> 006: #include <fcntl.h> 007: 008: #define FPGA_BASEADDRESS 0x : #define TEXTLCD_OFFSET 0x10 010: 011: void setcommand(unsigned short command); 012: void writebyte(char ch); 013: void initialize_textlcd(); 014: int function_set(int rows, int nfonts); 37

38 TextLCD Application Program (mmap) 015: int display_control(int display_enable, int cursor_enable, int nblink); 016: int cursor_shift(int set_screen, int set_rightshit); 017: int entry_mode_set(int increase, int nshift); 018: int return_home(); 019: int clear_display(); 020: int set_ddram_address(int pos); 021: 022: unsigned short *addr_fpga, *ptextlcd; 023: 024: int main(int argc, char **argv) 025: { 026: int fd; 027: int i, len1=17,len2=17; 028: char buf1[17] = "Welcome to the "; 029: char buf2[17] = "Embedded World!!"; 030: 031: if ((fd=open("/dev/mem", O_RDWR O_SYNC)) < 0) { 032: printf("mem open fail\n"); 033: exit(1); 034: } 38

39 TextLCD Application Program (mmap) 035: 036: addr_fpga= (unsigned short *)mmap(null, 4096, PROT_READ PROT_WRITE, MAP_SHARED, fd, FPGA_BASEADDRESS); 037: ptextlcd = addr_fpga + TEXTLCD_OFFSET/sizeof(unsigned short); 038: 039: if(*ptextlcd == (unsigned short)-1) { 040: close(fd); 041: printf("mmap error\n"); 042: exit(1); 043: } 044: 045: if(argc == 2) { 046: len1 = strlen(argv[1]); 047: len2 = 0; 048: strcpy(buf1,argv[1]); 049: }else if(argc >= 3) { 050: len1 = strlen(argv[1]); 051: len2 = strlen(argv[2]); 052: strcpy(buf1,argv[1]); 053: strcpy(buf2,argv[2]); 054: } 39

40 TextLCD Application Program (mmap) 056: initialize_textlcd(); 057: 058: for(i=0;i<len1;i++) writebyte(buf1[i]); 059: set_ddram_address(0x40); 060: for(i=0;i<len2;i++) writebyte(buf2[i]); 061: 062: printf("- Textlcd\n"); 063: printf("line 1 : "); 064: for(i=0;i<len1;i++) printf("%c", buf1[i]); 065: printf("\nline 2 : "); 066: for(i=0;i<len2;i++) printf("%c", buf2[i]); 067: printf("\n"); 068: 069: munmap(ptextlcd,4096); 070: close(fd); 071: return 0; 072: } 40

41 TextLCD Application Program (mmap) 074: void setcommand(unsigned short command) 075: { 076: command &= 0x00FF; 077: *ptextlcd = command 0x0000; 078: usleep(1000); 079: *ptextlcd = command 0x0100; 080: usleep(1000); 081: *ptextlcd = command 0x0000; 082: usleep(1000); 083: } 41

42 TextLCD Application Program (mmap) 085: void writebyte(char ch) 086: { 087: unsigned short data; 088: data = ch & 0x00FF; 089: *ptextlcd = data&0x400; 090: usleep(1000); 091: *ptextlcd = data 0x500; 092: usleep(1000); 093: *ptextlcd = data 0x400; 094: usleep(1000); 095: 096: } 42

43 TextLCD Application Program (mmap) 098: void initialize_textlcd() { 099: function_set(2,0); 100: display_control(1,0,0); 101: clear_display(); 102: entry_mode_set(1,0); 103: return_home(); 104: } 105: 106: int function_set(int rows, int nfonts) { 107: unsigned short command = 0x30; 108: 109: if(rows == 2) command = 0x08; 110: else if(rows == 1) command &= 0xf7; 111: else return -1; 112: 113: command = nfonts? (command 0x04) : command; 114: setcommand(command); 115: return 1; 116: } 43

44 TextLCD Application Program (mmap) 118: int display_control(int display_enable, int cursor_enable, int nblink) { 119: unsigned short command = 0x08; 120: command = display_enable? (command 0x04) : command; 121: command = cursor_enable? (command 0x02) : command; 122: command = nblink? (command 0x01) : command; 123: setcommand(command); 124: return 1; 125: } 126: 127: int cursor_shift(int set_screen, int set_rightshit) { 128: unsigned short command = 0x10; 129: command = set_screen? (command 0x08) : command; 130: command = set_rightshit? (command 0x04) : command; 131: setcommand(command); 132: return 1; 133: } 44

45 TextLCD Application Program (mmap) 135: int entry_mode_set(int increase, int nshift) { 136: unsigned short command = 0x04; 137: command = increase? (command 0x2) : command; 138: command = nshift? ( command 0x1) : command; 139: setcommand(command); 140: return 1; 141: } 142: 143: int return_home() { 144: unsigned short command = 0x02; 145: setcommand(command); 146: return 1; 147: } 148: 149: int clear_display() { 150: unsigned short command = 0x01; 151: setcommand(command); 152: return 1; 153: } 45

46 TextLCD Application Program (mmap) 155: int set_ddram_address(int pos) { 156: unsigned short command = 0x80; 157: command += pos; 158: setcommand(command); 159: return 1; 160: } 46

47 TextLCD Application Program (mmap) 소스를컴파일하기위한 Makefile 을작성 vi Makefile CC = arm-linux-gcc CFLAGS = -DNO_DEBUG EXEC=textlcd OBJS=$(EXEC).o ####### Implicit rules.suffixes:.cpp.cxx.cc.c.c.cpp.o: $(CXX) -c $(CXXFLAGS) -o $@ $<.cxx.o: $(CXX) -c $(CXXFLAGS) -o $@ $<.cc.o: $(CXX) -c $(CXXFLAGS) -o $@ $<.C.o: $(CXX) -c $(CXXFLAGS) -o $@ $<.c.o: $(CC) -c $(CFLAGS) -o $@ $< all: $(EXEC) $(EXEC): $(OBJS) $(CC) -o $@ $^ clean: rm -f $(OBJS) $(EXEC) 47

48 TextLCD Application Program (mmap) make 명령어를실행하여소스를컴파일하고, 실행파일 (textlcd) 를 /var/lib/tftpboot 에복사 make arm-linux-gcc -c -DNO_DEBUG -o textlcd.o textlcd.c arm-linux-gcc -o textlcd textlcd.o ls Makefile textlcd textlcd.c textlcd.o cp textlcd /var/lib/tftpboot/ 타겟보드에서실행파일 (textlcd) 를다운받고, 권한을변경한후실행 ~]$ tftp -r textlcd -g ~]$ ls -l -rw-r--r-- 1 root root 9365 Aug 1 11:46 textlcd [root@sm5s4210 ~]$ chmod 777 textlcd [root@sm5s4210 ~]$./textlcd - Textlcd LINE 1 : Welcome to the LINE 2 : Embedded World!! [root@sm5s4210 ~]$./textlcd HBE-SM5-S4210 hanback.co.kr - Textlcd LINE 1 : HBE-SM5-S4210 LINE 2 : hanback.co.kr 48

49

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Text-LCD Device Control - Device driver Jo, Heeseung M3 모듈에장착되어있는 Tedxt LCD 장치를제어하는 App 을개발 TextLCD 는영문자와숫자일본어, 특수문자를표현하는데사용되는디바이스 HBE-SM5-S4210 의 TextLCD 는 16 문자 *2 라인을 Display 할수있으며, 이 TextLCD 를제어하기위하여

More information

Microsoft PowerPoint - lab14.pptx

Microsoft PowerPoint - lab14.pptx Mobile & Embedded System Lab. Dept. of Computer Engineering Kyung Hee Univ. Keypad Device Control in Embedded Linux HBE-SM5-S4210 에는 16 개의 Tack Switch 를사용하여 4 행 4 열의 Keypad 가장착되어있다. 2 Keypad Device Driver

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

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 7-Segment Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2 6-Digit 7-Segment LED Controller 16비트로구성된 2개의레지스터에의해제어 SEG_Sel_Reg(Segment

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 7-Segment Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2 6-Digit 7-Segment LED controller 16비트로구성된 2개의레지스터에의해제어 SEG_Sel_Reg(Segment

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 LED Device Control - mmap() Jo, Heeseung 디바이스제어 디바이스제어 HBE-SM5-S4210 에장착된 Peripheral 들은다양한인터페이스로연결되어있음 베이스보드에있는 LED 와 7-Segment 는 GPIO 로직접 CPU 에연결 M3 모듈인 FPGA 모듈은 FPGA 에의해서제어되며 CPU 와호스트버스로연결되어있어서프로그램에서는메모리인터페이스로인식

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 7-SEGMENT DEVICE CONTROL - DEVICE DRIVER Jo, Heeseung 디바이스드라이버구현 : 7-SEGMENT HBE-SM5-S4210 의 M3 Module 에는 6 자리를가지는 7-Segment 모듈이아래그림처럼실장 6 Digit 7-Segment 2 디바이스드라이버구현 : 7-SEGMENT 6-Digit 7-Segment LED

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

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

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

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Sensor Device Jo, Heeseung Sensor 실습 HBE-SM5-S4210 에는근접 / 가속도 / 컴파스센서가장착 각센서들을사용하기위한디바이스드라이버와어플리케이션을작성 2 근접 (Proximity) 센서 HBE-SM5-S4210 Camera Module 근접센서디바이스 근접센서는사물이다른사물에접촉되기이전에가까이접근하였는지를검출할목적으로사용 일반적으로생활에서자동문이나엘리베이터,

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Network Programming Jo, Heeseung Network 실습 네트워크프로그래밍 멀리떨어져있는호스트들이서로데이터를주고받을수있도록프로그램을구현하는것 파일과는달리데이터를주고받을대상이멀리떨어져있기때문에소프트웨어차원에서호스트들간에연결을해주는장치가필요 이러한기능을해주는장치로소켓이라는인터페이스를많이사용 소켓프로그래밍이란용어와네트워크프로그래밍이랑용어가같은의미로사용

More information

교육지원 IT시스템 선진화

교육지원 IT시스템 선진화 Module 16: ioctl 을활용한 LED 제어디바이스드라이버 ESP30076 임베디드시스템프로그래밍 (Embedded System Programming) 조윤석 전산전자공학부 주차별목표 ioctl() 을활용법배우기 커널타이머와 ioctl 을활용하여 LED 제어용디바이스드라이브작성하기 2 IOCTL 을이용한드라이버제어 ioctl() 함수활용 어떤경우에는읽는용도로만쓰고,

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

// 변수선언 unsigned char i; unsigned char FONT[]={0xC0, 0xF9, 0xA4, 0xB0, 0x99, 0x92, 0x82, 0xD8, 0x80, 0x98}; //PORTA 를출력으로설정하고초기값은모두 0 PORTA = 0x00; DD

// 변수선언 unsigned char i; unsigned char FONT[]={0xC0, 0xF9, 0xA4, 0xB0, 0x99, 0x92, 0x82, 0xD8, 0x80, 0x98}; //PORTA 를출력으로설정하고초기값은모두 0 PORTA = 0x00; DD Code Vison AVR C ATmega8535 ATmega8535 제어실습 Chapter 1 I / O 포트제어하기 FND 제어 FND에는 Vcc를이용하는애노드 (anode) 형과 Gnd를이용하는 cathode형이있다. LED가여러개모여있다생각하고 LED선택에따라문자와숫자를만들어낼수있다. 최대한많은영문자를만들기위해대문자와소문자를혼합한다. ( 표현가능한문자

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Linux Kernel and Device Driver Jo, Heeseung 커널과의관계 시스템이지원하는하드웨어를응용프로그램에서사용할수있도록커널에서제공하는라이브러리 응용프로그램이하드웨어를제어하려면커널에자원을요청 - 응용프로그램에서는 C 라이브러리같은함수를호출 - 라이브러리내부에서는커널에게시스템콜을호출 - 커널로제어가넘어가게되면 ( 커널모드 ) 를통해서하드웨어를제어

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

Chap 7

Chap 7 Chap 7 FPGA 디바이스 1. FPGA 디바이스 1.1. External FPGA Device Driver FPGA 모듈을제어하는디바이스드라이버를작성하는방법에대해서알아보도록한다. 이모듈은 Achro-i.MX6Q의 External Connector에연결된다. 본교재에는 FGPA 펌웨어소스코드가포함되어있지않지만 VHDL로작성할수있다. FGPA 관련소스는패키지에포함되어있는바이너리를이용하면된다.

More information

ECE30076 Embedded System Programming - LED Device Driver

ECE30076 Embedded System Programming - LED Device Driver Module 12: LED 제어디바이스드라이버 ESP30076 임베디드시스템프로그래밍 (Embedded System Programming) 조윤석 전산전자공학부 주차별목표 하드웨어제어를위한디바이스드라이버작성방법알아보기 LED 제어용디바이스드라이버작성하기 ioremap 을이용한 LED 제어디바이스드라이버 mmap 을이용한 LED 제어디바이스드라이버 2 디바이스구분

More information

04디바이스드라이버

04디바이스드라이버 Linux Device Drivers ETRI ETRI 2 ETRI 3 File operation special file(=device file) (Character Device Driver) (Block Device Driver) (Network Device Driver) ETRI 4 Ex. (/dev/console), (/dev/ttys0) open, close,

More information

Microsoft PowerPoint - lab16.pptx

Microsoft PowerPoint - lab16.pptx Mobile & Embedded System Lab. Dept. of Computer Engineering Kyung Hee Univ. GoAhead Porting Goahead 웹서버를포팅하기위하여 CD 안의소스를사용 경로 : [CD3]\source\webserver\webs218.tar.gz GoAhead 소스복사및압축해제 ~/working 디렉터리에배포

More information

Microsoft PowerPoint - IOControl [호환 모드]

Microsoft PowerPoint - IOControl [호환 모드] 목차 Input/Output Control I/O Control Mechanism mmap function munmap function RAM Area Access LED Control 4 digits 7 Segment Control Text LCD Control 1 2 I/O Control Mechanism (1) I/O Control Mechanism (2)

More information

제1장 Unix란 무엇인가?

제1장  Unix란 무엇인가? 1 12 장파이프 2 12.1 파이프 파이프원리 $ who sort 파이프 3 물을보내는수도파이프와비슷 한프로세스는쓰기용파일디스크립터를이용하여파이프에데이터를보내고 ( 쓰고 ) 다른프로세스는읽기용파일디스크립터를이용하여그파이프에서데이터를받는다 ( 읽는다 ). 한방향 (one way) 통신 파이프생성 파이프는두개의파일디스크립터를갖는다. 하나는쓰기용이고다른하나는읽기용이다.

More information

Sena Technologies, Inc. HelloDevice Super 1.1.0

Sena Technologies, Inc. HelloDevice Super 1.1.0 HelloDevice Super 110 Copyright 1998-2005, All rights reserved HelloDevice 210 ()137-130 Tel: (02) 573-5422 Fax: (02) 573-7710 E-Mail: support@senacom Website: http://wwwsenacom Revision history Revision

More information

/chroot/lib/ /chroot/etc/

/chroot/lib/ /chroot/etc/ 구축 환경 VirtualBox - Fedora 15 (kernel : 2.6.40.4-5.fc15.i686.PAE) 작동 원리 chroot유저 ssh 접속 -> 접속유저의 홈디렉토리 밑.ssh의 rc 파일 실행 -> daemonstart실행 -> daemon 작동 -> 접속 유저만의 Jail 디렉토리 생성 -> 접속 유저의.bashrc 의 chroot 명령어

More information

Microsoft Word doc

Microsoft Word doc 1. 디바이스드라이버 [ GPIO ] 1.1. GPIO 란 GPIO(General Purpose Input/Output) 란일반적인용도로사용가능한디지털입출력기능의 Port pins 이다. S3C2410의 GPIO는총 117개이며각각이 pin 들은 input/output으로프로그램되거나인터럽트 source로사용될수있다. S3C2410의대부분의 GPIO는단순히디지털입출력뿐만아니라부가적인기능을갖고있다.

More information

Microsoft Word doc

Microsoft Word doc 2. 디바이스드라이버 [ DIO ] 2.1. 개요 타겟보드의데이터버스를이용하여 LED 및스위치동작을제어하는방법을설명하겠다. 2.2. 회로도 2.3. 준비조건 ARM 용크로스컴파일러가설치되어있어야한다. 하드웨어적인점검을하여정상적인동작을한다고가정한다. NFS(Network File System) 를사용할경우에는 NFS가마운트되어있어야한다. 여기서는소스전문을포함하지않았다.

More information

슬라이드 1

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

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

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

vi 사용법

vi 사용법 네트워크프로그래밍 6 장과제샘플코드 - 1:1 채팅 (udp 버전 ) 과제 서버에서먼저 bind 하고그포트를다른사람에게알려줄것 클라이언트에서알려준포트로접속 서로간에키보드입력을받아상대방에게메시지전송 2 Makefile 1 SRC_DIR =../../common 2 COM_OBJS = $(SRC_DIR)/addressUtility.o $(SRC_DIR)/dieWithMessage.o

More information

제1장 Unix란 무엇인가?

제1장  Unix란 무엇인가? 4 장파일 컴퓨터과학과박환수 1 2 4.1 시스템호출 컴퓨터시스템구조 유닉스커널 (kernel) 하드웨어를운영관리하여다음과같은서비스를제공 파일관리 (File management) 프로세스관리 (Process management) 메모리관리 (Memory management) 통신관리 (Communication management) 주변장치관리 (Device

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

Microsoft Word - MPC850 SPI Driver.doc

Microsoft Word - MPC850 SPI Driver.doc MPC850 SPI Driver 네트워크보드에서구현한 SPI Device Driver 제작및이용방법입니다. 문서작성 : 이재훈 (kingseft.lee@samsung.com) 이용한 SPI EEPROM - X5043/X5045 512 x 8 bit SPI EEPROM (4Kbits = 512bytes) - 제조사 : XICOR (www.xicor.com) -

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

(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

제12장 파일 입출력

제12장 파일 입출력 제 4 장파일입출력 리눅스시스템프로그래밍 청주대학교전자공학과 한철수 1 시스템호출 (system call) 파일 (file) 임의접근 (random access) 주요학습내용 2 4.1 절 커널의역할 (kernel) 커널 (kernel) 은운영체제의핵심부분으로서, 하드웨어를운영관리하는여러가지서비스를제공함 파일관리 (File management) 디스크 프로세스관리

More information

슬라이드 1

슬라이드 1 / 임베디드시스템개요 / 임베디드운영체제 / 디바이스드라이버 01 Linux System Architecture Application Area Application System Call Interface BSD Socket Virtual File System INET(AF_INET) Kernel Area Buffer Cache Network Subsystem

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Web server porting 1 Jo, Heeseung 웹서버포팅 HBE-SM5-S4210 를임베디드웹서버로사용할수있도록웹서버를올리는작업 임베디드서버에널리쓰이는웹서버들중 GoAhead 라는웹서버를포팅 CGI 프로그램을이용하여웹에서 HBE-SM5-S4210 의 LED, 7- Segment, TextLCD 를제어실습 2 Goahead webserver 소스를다운받거나제공된

More information

본 강의에 들어가기 전

본 강의에 들어가기 전 C 기초특강 종합과제 과제내용 구조체를이용하여교과목이름과코드를파일로부터입력받아관리 구조체를이용하여학생들의이름, 학번과이수한교과목의코드와점수를파일로부터입력 학생개인별총점, 평균계산 교과목별이수학생수, 총점및평균을계산 결과를파일에저장하는프로그램을작성 2 Makefile OBJS = score_main.o score_input.o score_calc.o score_print.o

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

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

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

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 WEB SERVER PORTING 1 Jo, Heeseung 웹서버포팅 HBE-SM5-S4210 를임베디드웹서버로사용할수있도록웹서버를올리는작업 임베디드서버에널리쓰이는웹서버들중 GoAhead 라는웹서버를포팅 CGI 프로그램을이용하여웹에서 HBE-SM5-S4210 의 LED, 7- Segment, TextLCD 를제어실습 2 Goahead webserver 소스를다운받거나제공된

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

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

2009년 상반기 사업계획

2009년 상반기 사업계획 메모리매핑 IT CookBook, 유닉스시스템프로그래밍 학습목표 통신프로그램이무엇인지이해한다. 메모리매핑을이용한 IPC 기법을이해한다. 메모리매핑함수를사용해프로그램을작성할수있다. 2/20 목차 메모리매핑의개념 메모리매핑함수 메모리매핑해제함수 메모리매핑의보호모드변경 파일의크기확장 매핑된메모리동기화 데이터교환하기 3/20 메모리매핑의개념 메모리매핑 파일을프로세스의메모리에매핑

More information

10.

10. 10. 10.1 10.2 Library Routine: void perror (char* str) perror( ) str Error 0 10.3 10.3 int fd; /* */ fd = open (filename, ) /*, */ if (fd = = -1) { /* */ } fcnt1 (fd, ); /* */ read (fd, ); /* */ write

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

untitled

untitled Block Device Driver in Linux Embedded System Lab. II Embedded System Lab. II 2 Define objective of applications using device Study Hardware manual (Registers) (vector number) Understand interface to related

More information

Adding a New Dev file

Adding a New Dev file Adding a New Dev file - 김성영, 이재혁, 김남현 - 발표자 : 김남현 목차 01 Progress 02 Device file 03 How create dev file 04 Example Progress 4 월 1 일 프로젝트방향설정 4 월 8 일 device file 추가방법조사 mem.c 파일분석 4 월 10 일 알고리즘제시필요한함수분석

More information

교육지원 IT시스템 선진화

교육지원 IT시스템 선진화 Module 11: 가상디바이스드라이버작성 ESP30076 임베디드시스템프로그래밍 (Embedded System Programming) 조윤석 전산전자공학부 주차별목표 디바이스드라이버의실행과정이해하기 크로스컴파일러를이용하여가상의디바이스드라이버생성하기 Kbuild 에대해이해하기 2 file_operations 구조체 struct file_operations {

More information

13주-14주proc.PDF

13주-14주proc.PDF 12 : Pro*C/C++ 1 2 Embeded SQL 3 PRO *C 31 C/C++ PRO *C NOT! NOT AND && AND OR OR EQUAL == = SQL,,, Embeded SQL SQL 32 Pro*C C SQL Pro*C C, C Pro*C, C C 321, C char : char[n] : n int, short, long : float

More information

untitled

untitled if( ) ; if( sales > 2000 ) bonus = 200; if( score >= 60 ) printf(".\n"); if( height >= 130 && age >= 10 ) printf(".\n"); if ( temperature < 0 ) printf(".\n"); // printf(" %.\n \n", temperature); // if(

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

디바이스드라이버 (Device Driver) Driver is literally a subject which drive a object. 응용프로그램에서하드웨어장치를이용해서데이터를직접읽고쓰거나제어해야하는경우에디바이스드라이버를이용 하드웨어를제어하는프로그램과애플리케이션에서

디바이스드라이버 (Device Driver) Driver is literally a subject which drive a object. 응용프로그램에서하드웨어장치를이용해서데이터를직접읽고쓰거나제어해야하는경우에디바이스드라이버를이용 하드웨어를제어하는프로그램과애플리케이션에서 임베디드시스템설계강의자료 7 Device Driver (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 디바이스드라이버 (Device Driver) Driver is literally a subject which drive a object. 응용프로그램에서하드웨어장치를이용해서데이터를직접읽고쓰거나제어해야하는경우에디바이스드라이버를이용 하드웨어를제어하는프로그램과애플리케이션에서디바이스를제어하기위한자료구조와함수의집합

More information

<4D F736F F F696E74202D FB8DEB8F0B8AE20B8C5C7CE205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D FB8DEB8F0B8AE20B8C5C7CE205BC8A3C8AF20B8F0B5E55D> 학습목표 통신프로그램이무엇인지이해한다. 을이용한 IPC 기법을이해한다. 함수를사용해프로그램을작성할수있다. IT CookBook, 유닉스시스템프로그래밍 2/20 목차 의개념 함수 해제함수 의보호모드변경 파일의크기확장 매핑된메모리동기화 데이터교환하기 의개념 파일을프로세스의메모리에매핑 프로세스에전달할데이터를저장한파일을직접프로세스의가상주소공간으로매핑 read, write

More information

< E20C6DFBFFEBEEE20C0DBBCBAC0BB20C0A7C7D12043BEF0BEEE20492E707074>

< E20C6DFBFFEBEEE20C0DBBCBAC0BB20C0A7C7D12043BEF0BEEE20492E707074> Chap #2 펌웨어작성을위한 C 언어 I http://www.smartdisplay.co.kr 강의계획 Chap1. 강의계획및디지털논리이론 Chap2. 펌웨어작성을위한 C 언어 I Chap3. 펌웨어작성을위한 C 언어 II Chap4. AT89S52 메모리구조 Chap5. SD-52 보드구성과코드메모리프로그래밍방법 Chap6. 어드레스디코딩 ( 매핑 ) 과어셈블리어코딩방법

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 BOOTLOADER Jo, Heeseung 부트로더컴파일 부트로더소스복사및압축해제 부트로더소스는웹페이지에서다운로드 /working 디렉터리로이동한후, wget으로다운로드 이후작업은모두 /working 디렉터리에서진행 root@ubuntu:# cp /media/sm5-linux-111031/source/platform/uboot-s4210.tar.bz2 /working

More information

Microsoft PowerPoint - [2009] 02.pptx

Microsoft PowerPoint - [2009] 02.pptx 원시데이터유형과연산 원시데이터유형과연산 원시데이터유형과연산 숫자데이터유형 - 숫자데이터유형 원시데이터유형과연산 표준입출력함수 - printf 문 가장기본적인출력함수. (stdio.h) 문법 ) printf( Test printf. a = %d \n, a); printf( %d, %f, %c \n, a, b, c); #include #include

More information

학번 : 이름 : 1. 다음파일트리구조를가진유닉스시스템이있다고가정하자. / /bin/ /home/ /home/taesoo/ /usr/ /usr/lib/ /usr/local/lib /media 모든폴더에파일이하나도없다고가정했을때사용자가터미널에서다음 ls 명령입력시화면출력

학번 : 이름 : 1. 다음파일트리구조를가진유닉스시스템이있다고가정하자. / /bin/ /home/ /home/taesoo/ /usr/ /usr/lib/ /usr/local/lib /media 모든폴더에파일이하나도없다고가정했을때사용자가터미널에서다음 ls 명령입력시화면출력 학번 : 이름 : 1. 다음파일트리구조를가진유닉스시스템이있다고가정하자. / /bin/ /home/ /home/taesoo/ /usr/ /usr/lib/ /usr/local/lib /media 모든폴더에파일이하나도없다고가정했을때사용자가터미널에서다음 ls 명령입력시화면출력을예측하시오. $ cd /usr $ ls..? $ ls.? 2. 다음그림은어떤프로세스가다음코드를수행했다는가정에서도시되었다.

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

<4D F736F F F696E74202D205BBAB0C3B75D20B8AEB4AABDBA20B5F0B9D9C0CCBDBA20B5E5B6F3C0CCB9F620B8F0B5A82E >

<4D F736F F F696E74202D205BBAB0C3B75D20B8AEB4AABDBA20B5F0B9D9C0CCBDBA20B5E5B6F3C0CCB9F620B8F0B5A82E > 안드로이드환경에서의 리눅스디바이스드라이버 문자디바이스드라이버설명 Table of contents 디바이스드라이버구조 시스템구조 모듈의기본골격 드라이버 IO 제어 안드로이드환경에서의 한백전자교육사업부 리눅스디바이스드라이버 시스템구조 쉘 응용프로그램 표준라이브러리 시스템콜 가상파일시스템 (VFS) 버퍼캐시 네트워크시스템 문자디바이스드라이버 블럭디바이스드라이버 네트워크디바이스드라이버

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

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 (Host) set up : Linux Backend RS-232, Ethernet, parallel(jtag) Host terminal Target terminal : monitor (Minicom) JTAG Cross compiler Boot loader Pentium Redhat 9.0 Serial port Serial cross cable Ethernet

More information

Microsoft PowerPoint APUE(File InO)

Microsoft PowerPoint APUE(File InO) Linux/UNIX Programming 문양세강원대학교 IT특성화대학컴퓨터과학전공 강의목표및내용 강의목표 파일의특성을이해한다. 파일을열고닫는다. 파일로부터데이터를읽고쓴다. 기타파일제어함수를익힌다. 강의내용 파일구조 (UNIX 파일은어떤구조일까?) 파일관련시스템호출 시스템호출의효율과구조 Page 2 What is a File? A file is a contiguous

More information

슬라이드 1

슬라이드 1 Chap7. LED, LCD 와 7- 세그먼트 켜기및 IIC 통신 LED 를켜기위한순서 1. 프로그램코딩및빌드 ( 헥사파일만들기 ) 2. 프로그램메모리라이팅 M-IDE 빌드해서핵사파일만들기 강의계획 Chap1. 강의계획및디지털논리이론 Chap2. 펌웨어작성을위한 C 언어 I Chap3. 펌웨어작성을위한 C 언어 II Chap4. AT89S52 메모리구조 Chap5.

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 DEVELOPMENT ENVIRONMENT 2 MAKE Jo, Heeseung MAKE Definition make is utility to maintain groups of programs Object If some file is modified, make detects it and update files related with modified one 2

More information

Microsoft PowerPoint - ch09_파이프 [호환 모드]

Microsoft PowerPoint - ch09_파이프 [호환 모드] 학습목표 파이프를이용한 IPC 기법을이해한다. 이름없는파이프를이용해통신프로그램을작성할수있다. 이름있는파이프를이용해통신프로그램을작성할수있다. 파이프 IT CookBook, 유닉스시스템프로그래밍 2/20 목차 파이프의개념 이름없는파이프만들기 복잡한파이프생성 양방향파이프활용 이름있는파이프만들기 파이프의개념 파이프 두프로세스간에통신할수있도록해주는특수파일 그냥파이프라고하면일반적으로이름없는파이프를의미

More information

2009년 상반기 사업계획

2009년 상반기 사업계획 파이프 IT CookBook, 유닉스시스템프로그래밍 학습목표 파이프를이용한 IPC 기법을이해한다. 이름없는파이프를이용해통신프로그램을작성할수있다. 이름있는파이프를이용해통신프로그램을작성할수있다. 2/20 목차 파이프의개념 이름없는파이프만들기 복잡한파이프생성 양방향파이프활용 이름있는파이프만들기 3/20 파이프의개념 파이프 두프로세스간에통신할수있도록해주는특수파일 그냥파이프라고하면일반적으로이름없는파이프를의미

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Development Environment 2 Jo, Heeseung make make Definition make is utility to maintain groups of programs Object If some file is modified, make detects it and update files related with modified one It

More information

Microsoft PowerPoint APUE(File InO).pptx

Microsoft PowerPoint APUE(File InO).pptx Linux/UNIX Programming 문양세강원대학교 IT대학컴퓨터과학전공 강의목표및내용 강의목표 파일의특성을이해한다. 파일을열고닫는다. 파일로부터데이터를읽고쓴다. 기타파일제어함수를익힌다. 강의내용 파일구조 (UNIX 파일은어떤구조일까?) 파일관련시스템호출 시스템호출의효율과구조 Page 2 What is a File? A file is a contiguous

More information

Getting Started 1 st Edition March 2004 Contents 1.EMPOS II QUICK START... 1 1.1. 1.2. 1.3. 1.4. 1.5. 1.6. 1.7. 1.8. 1.9....1...1...2 TextLcd...5 7 Segment...6 Led I/O...7 IP DEFAULT GATEWAY...8 WEB

More information

Microsoft PowerPoint - chap13-입출력라이브러리.pptx

Microsoft PowerPoint - chap13-입출력라이브러리.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 학습목표 스트림의 기본 개념을 알아보고,

More information

Microsoft PowerPoint APUE(File InO).ppt

Microsoft PowerPoint APUE(File InO).ppt 컴퓨터특강 () [Ch. 3] 2006 년봄학기 문양세강원대학교컴퓨터과학과 강의목표및내용 강의목표 파일의특성을이해한다. 파일을열고닫는다. 파일로부터데이터를읽고쓴다. 기타파일제어함수를익힌다. 강의내용 파일구조 (UNIX 파일은어떤구조일까?) 파일관련시스템호출 시스템호출의효율과구조 Page 2 1 What is a File? A file is a contiguous

More information

Microsoft PowerPoint - chap12 [호환 모드]

Microsoft PowerPoint - chap12 [호환 모드] 제 12 장고급입출력 Nov 2007 숙대창병모 1 Contents 1. Nonblocking I/O 2. Record Locking 3. Memory Mapped I/O Nov 2007 숙대창병모 2 12.1 Nonblocking I/O Nov 2007 숙대창병모 3 Nonblocking I/O Blocking I/O I/O 작업완료를기다리며영원히리턴안할수있다

More information

Microsoft PowerPoint - 09-Pipe

Microsoft PowerPoint - 09-Pipe 9. 파이프 상명대학교소프트웨어학부 파이프 시그널은이상한사건이나오류를처리하는데는이용하지만, 한프로세스로부터다른프로세스로대량의정보를전송하는데는부적합하다. 파이프 한프로세스를다른관련된프로세스에연결시켜주는단방향의통신채널 2 pipe() Usage #include int pipe(int filedes[2]); 3 < ex_1.c > #include

More information

Microsoft Word ARM_ver2_0a.docx

Microsoft Word ARM_ver2_0a.docx [Smart]0703-ARM 프로그램설치 _ver1_0a 목차 1 윈도우기반으로리눅스컴파일하기 (Cygwin, GNU ARM 설치 )... 2 1.1 ARM datasheet 받기... 2 1.2 Cygwin GCC-4.0 4.1 4.2 toolchain 파일받기... 2 1.3 Cygwin 다운로드... 3 1.4 Cygwin Setup... 5 2 Cygwin

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 임베디드리눅스개발환경실습 Jo, Heeseung 타겟보드모니터링동작실습 호스트 PC 에서시리얼포트를통해서타겟보드를모니터링 타겟보드가프로그램을실행하는동안일어나는일을시리얼포트로메시지를출력하면호스트 PC 에서는시리얼포트를통해메시지를수신하여이를화면에출력 minicom 프로그램사용 - minicom 이정상적으로설정이되고, 타겟보드에최소한부트로더가올라간상태라면 minicom

More information

À©µµ³×Æ®¿÷ÇÁ·Î±×·¡¹Ö4Àå_ÃÖÁ¾

À©µµ³×Æ®¿÷ÇÁ·Î±×·¡¹Ö4Àå_ÃÖÁ¾ P a 02 r t Chapter 4 TCP Chapter 5 Chapter 6 UDP Chapter 7 Chapter 8 GUI C h a p t e r 04 TCP 1 3 1 2 3 TCP TCP TCP [ 4 2] listen connect send accept recv send recv [ 4 1] PC Internet Explorer HTTP HTTP

More information

歯9장.PDF

歯9장.PDF 9 Hello!! C printf() scanf() getchar() putchar() gets() puts() fopen() fclose() fprintf() fscant() fgetc() fputs() fgets() gputs() fread() fwrite() fseek() ftell() I/O 2 (stream) C (text stream) : `/n'

More information

Mango-AM335x LCD Type 커널 Module Parameter에서 변경하기

Mango-AM335x LCD Type 커널 Module Parameter에서 변경하기 Mango-AM335x LCD Type 커널 Module Parameter 에서 변경하기 http://www.mangoboard.com/ http://cafe.naver.com/embeddedcrazyboys Crazy Embedded Laboratory www.mangoboard.com cafe.naver.com/embeddedcrazyboys CRZ Technology

More information

RaspberryPi 커널컴파일및커널모듈 1 제 13 강 커널컴파일및커널모듈 커널컴파일가상주소 (mmap() 함수 ) 에의한디바이스제어커널모듈및커널모듈테스트커널모듈에의한입출력디바이스제어 (LED, BTN) 커널모듈을커널에포함하기

RaspberryPi 커널컴파일및커널모듈 1 제 13 강 커널컴파일및커널모듈 커널컴파일가상주소 (mmap() 함수 ) 에의한디바이스제어커널모듈및커널모듈테스트커널모듈에의한입출력디바이스제어 (LED, BTN) 커널모듈을커널에포함하기 RaspberryPi 커널컴파일및커널모듈 1 제 13 강 커널컴파일및커널모듈 커널컴파일가상주소 (mmap() 함수 ) 에의한디바이스제어커널모듈및커널모듈테스트커널모듈에의한입출력디바이스제어 (LED, BTN) 커널모듈을커널에포함하기 RaspberryPi 커널컴파일및커널모듈 2 커널컴파일 * 커널소스컴파일 : 가상머신에서 10여분소요 : 라즈베리파이보드에서 90여분소요

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

Mango220 Android How to compile and Transfer image to Target

Mango220 Android How to compile and Transfer image to Target Mango220 Android How to compile and Transfer image to Target http://www.mangoboard.com/ http://cafe.naver.com/embeddedcrazyboys Crazy Embedded Laboratory www.mangoboard.com cafe.naver.com/embeddedcrazyboys

More information

Microsoft PowerPoint - chap2

Microsoft PowerPoint - chap2 제 2 장. 파일입출력 (File I/O) 숙대창병모 1 목표 파일의구조및특성을이해한다. 파일을열고닫는다. 파일로부터데이터를읽고쓴다. 파일현재위치변경 기타파일제어 숙대창병모 2 2.1 파일구조 숙대창병모 3 What is a file? a file is a contiguous sequence of bytes no format imposed by the operating

More information

5.스택(강의자료).key

5.스택(강의자료).key CHP 5: https://www.youtube.com/watch?v=ns-r91557ds ? (stack): (LIFO:Last-In First-Out):. D C B C B C B C B (element) C (top) B (bottom) (DT) : n element : create() ::=. is_empty(s) ::=. is_full(s) ::=.

More information

슬라이드 1

슬라이드 1 임베디드시스템개론 : Arduino 활용 Lecture #5: Text LCD 출력하기 2012. 4. 6 by 김영주 강의목차 Text LCD 장치개요 간단한 Text LCD 출력테스트 Text LCD 인터페이스신호줄이기 아두이노라이브러리개요 LiquidCrystal 라이브러리 2 Text LCD 출력장치 (1) Text LCD 출력장치 ASCII 코드를입력받아영문자를출력하는장치주로

More information

로봇SW교육원 강의자료

로봇SW교육원 강의자료 UNIT 05 make 광운대학교로봇 SW 교육원 최상훈 학습목표 2 Makefile 을작성핛수있다. make 3 make 프로젝트관리유틸리티 컴파일시갂단축 파일의종속구조를빠르게파악핛수있음 기술파일 (Makefile) 에기술된대로컴파일명령또는셸 (shell) 명령을순차적으로수행 make 를사용하지않을경우 $ gcc c main.c $ gcc c test_a.c

More information

Microsoft Word doc

Microsoft Word doc 1. 임베디드리눅스장비에서램디스크를이용하여루트파일시스템을구현하였을경우에는보드동작중에파일로기록된내용이전원이꺼짐과동시에소실된다. 기록된내용을영구저장하기위해서는일반적으로플래시메모리에기록하여야한다. 플래시메모리를리눅스의루트파일시스템으로사용하기위해서는 MTD (Memory Technology Device ) 블록디바이스드라이버를사용하여야한다. 타겟보드는 NAND 플래시기반의보드이다.

More information

BMP 파일 처리

BMP 파일 처리 BMP 파일처리 김성영교수 금오공과대학교 컴퓨터공학과 학습내용 영상반전프로그램제작 2 Inverting images out = 255 - in 3 /* 이프로그램은 8bit gray-scale 영상을입력으로사용하여반전한후동일포맷의영상으로저장한다. */ #include #include #define WIDTHBYTES(bytes)

More information

슬라이드 1

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

More information

Microsoft Word - Automap3

Microsoft Word - Automap3 사 용 설 명 서 본 설명서는 뮤직메트로에서 제공합니다. 순 서 소개 -------------------------------------------------------------------------------------------------------------------------------------------- 3 제품 등록 --------------------------------------------------------------------------------------------------------------------------------------

More information

1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 #define _CRT_SECURE_NO_WARNINGS #include #include main() { char ch; printf(" 문자 1개를입력하시오 : "); scanf("%c", &ch); if (isalpha(ch))

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

2009년 상반기 사업계획

2009년 상반기 사업계획 소켓프로그래밍활용 IT CookBook, 유닉스시스템프로그래밍 학습목표 소켓인터페이스를활용한다양한프로그램을작성할수있다. 2/23 목차 TCP 기반프로그래밍 반복서버 동시동작서버 동시동작서버-exec함수사용하기 동시동작서버-명령행인자로소켓기술자전달하기 UDP 프로그래밍 3/23 TCP 기반프로그래밍 반복서버 데몬프로세스가직접모든클라이언트의요청을차례로처리 동시동작서버

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

DE1-SoC Board

DE1-SoC Board 실습 1 개발환경 DE1-SoC Board Design Tools - Installation Download & Install Quartus Prime Lite Edition http://www.altera.com/ Quartus Prime (includes Nios II EDS) Nios II Embedded Design Suite (EDS) is automatically

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

<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

API 매뉴얼

API 매뉴얼 PCI-DIO12 API Programming (Rev 1.0) Windows, Windows2000, Windows NT and Windows XP are trademarks of Microsoft. We acknowledge that the trademarks or service names of all other organizations mentioned

More information