Embedded Systems. Prof. Myung-Eui Lee (A-405) 1-1. Embedded Systems KUT

Size: px
Start display at page:

Download "Embedded Systems. Prof. Myung-Eui Lee (A-405) 1-1. Embedded Systems KUT"

Transcription

1 Prof. Myung-Eui Lee (A-) -

2 Device driver Appication Area Appication System Ca Interface Virtua Fie System (VFS) Kerne Area Buffer Cache Network Subsystem BSD socket Inet (AF_INET) Transport(TCP, UDP) Character Device Driver Bock Device Driver Network Device Driver Network (IP) Device Interface Hardware Hardware -

3 Virtua Fie System. process process process n User Mode Virtua Fie System System Mode minix nfs Ext/3 dos. dev proc buffer cache Fie System Device Driver -3

4 VFS Virtua Fie System» Not a fie system on its own but an interface» Kerne software ayer that handes a system cas reated to a standard Unix fie system» Link between the operating system kerne and the different fie systems» Suppies the appications with the system cas for fie management» Passes tasks to the appropriate actua fie system Fie system supported by VFS» Disk-based fie system u Ext/3, dos, vfat, ntfs, hpfs (IBM s OS/), hfs (Appe s Mac OS)» Network fie system u NFS, SMB(SaMBa), NCP(Nove s NetWare Core Protoco)» Specia fie system u /proc/*, /dev/* -

5 VFS VFS objects» superbock object : specific mounted fie system u struct super_bock, struct super_operations (incude/inux/fs.h)» dentry object : represents directory entry u struct dentry, struct dentry_operations (incude/inux/dcache.h)» inode object : represents a specific fie > s -i u struct inode, struct inode_operations (incude/inux/fs.h)» fie object : represents a fie opened by a process u struct fie, struct fie_operations (incude/inux/fs.h) -

6 struct fie Type Fied Description struct fie *f_next Pointer to next fie object struct fie **f_pprev Pointer to previous fie object struct dentry struct fie_operations mode_t *f_dentry *f_op f_mode Pointer to associated dentry object Pointer to fie operation tabe Process access mode off_t unsigned int unsigned int unsigned ong unsigned ong f_pos f_count f_fags f_reada f_ramax Current fie offset (fie pionter) Fie object's usage counter Fags specified when opening the fie Read-ahead fag Maximum number of pages to be read-ahead unsigned ong unsigned ong unsigned ong struct fown_struct unsigned int unsigned int int unsigned ong f_raend f_raen f_rawin f_owner f_uid f_gid f_error f_version Fie pointer after ast read-ahead Number of read-ahead bytes Number of read-ahead pages Data for asynchronous I/O via signas User's UID User's GID Error code for networkwrite operation Version number, automaticay incremented after each use void *private_data Needed for tty driver Understanding the Linux Kerne, O reiy,, Ver.. 초기 -6

7 struct fie -.6 u /pxa7/kerne/inux-.6.-h7-tku_v./incude/ inux/fs.h struct fie { struct ist_head f_ist; struct dentry *f_dentry; struct vfsmount *f_vfsmnt; struct fie_operations *f_op; atomic_t f_count; unsigned int f_fags; mode_t f_mode; int f_error; off_t f_pos; struct fown_struct f_owner; unsigned int f_uid, f_gid; struct fie_ra_state f_ra; size_t f_maxcount; unsigned ong f_version; void *f_security; /* needed for tty driver, and maybe others */ void *private_data; #ifdef CONFIG_EPOLL /* Used by fs/eventpo.c to ink a the hooks to this fie */ struct ist_head f_ep_inks; spinock_t f_ep_ock; #endif /* #ifdef CONFIG_EPOLL */ struct address_space *f_mapping; ; -7

8 struct fie_operations -.6 struct fie_operations { struct modue *owner; off_t (*seek) (struct fie *, off_t, int); ssize_t (*read) (struct fie *, char user *, size_t, off_t *); ssize_t (*aio_read) (struct kiocb *, char user *, size_t, off_t); ssize_t (*write) (struct fie *, const char user *, size_t, off_t *); ssize_t (*aio_write) (struct kiocb *, const char user *, size_t, off_t); int (*readdir) (struct fie *, void *, fidir_t); unsigned int (*po) (struct fie *, struct po_tabe_struct *); int (*ioct) (struct inode *, struct fie *, unsigned int, unsigned ong); ong (*unocked_ioct) (struct fie *, unsigned int, unsigned ong); ong (*compat_ioct) (struct fie *, unsigned int, unsigned ong); int (*mmap) (struct fie *, struct vm_area_struct *); int (*open) (struct inode *, struct fie *); int (*fush) (struct fie *); int (*reease) (struct inode *, struct fie *); int (*fsync) (struct fie *, struct dentry *, int datasync); int (*aio_fsync) (struct kiocb *, int datasync); int (*fasync) (int, struct fie *, int); int (*ock) (struct fie *, int, struct fie_ock *); ssize_t (*readv) (struct fie *, const struct iovec *, unsigned ong, off_t *); ssize_t (*writev) (struct fie *, const struct iovec *, unsigned ong, off_t *); ssize_t (*sendfie) (struct fie *, off_t *, size_t, read_actor_t, void *); ssize_t (*sendpage) (struct fie *, struct page *, int, size_t, off_t *, int); unsigned ong (*get_unmapped_area)(struct fie *, unsigned ong, unsigned ong, unsigned ong, unsigned ong); int (*check_fags)(int); int (*dir_notify)(struct fie *fip, unsigned ong arg); int (*fock) (struct fie *, int, struct fie_ock *); ; -8

9 fie operations seek(fie, offset, int) Updates the fie pointer to given offset read(fie, buf, count, offset) Reads count bytes from a fie starting at position *offset into buf; the vaue *offset (which usuay corresponds to the fie pointer) is then incremented. write(fie, buf, count, offset) Writes count bytes into a fie starting at position *offset from buf; the vaue (which usuay corresponds to the fie pointer) is then incremented. readdir(dir, dirent, fidir) Returns the next directory entry of a directory in dirent; the fidir parameter contains the address of an auxiiary function that extracts the fieds in a directory entry. po(fie, po_tabe) Checks whether there is activity on a fie and goes to seep unti something happens on it. ioct(inode, fie, cmd, arg) Sends a command to an underying hardware device. This method appies ony to device fies. mmap(fie, vma) Performs a memory mapping of the fie into a process address space. open(inode, fie) Opens a fie by creating a new fie object and inking it to the corresponding inode object. -9

10 fie operations fush(fie) Caed when a reference to an open fie is cosed, that is, the data in buff is deeted. reease(inode, fie) = cose Reeases the fie object fsync(fie, dentry) Writes a cached data of the fie to disk. fasync(fie, int) Enabes or disabes asynchronous I/O notification by means of signas. check_media_change(dev) Checks whether there has been a change of media since the ast operation on the device fie (appicabe to bock devices that support removabe media, such as foppies and CD-ROMs). revaidate(dev) Restores the consistency of a device (used by network fie systems after a media change has been recognized on a remote device). ock(fie, cmd, fie_ock) Appies a ock to the fie -

11 Device driver -

12 Device driver Device fie types cd /dev, s -a». character : c u byte (sequentia) process, no buffer cache». bock : b u bock (random) process, buffer cache» 3. network u packet process, socket (protoco stack) brw-r----- root disk 3 Oct 3 6 hda brw-r----- root disk 3 Oct 3 6 hda brw-r----- root disk 3 Oct 3 6 hda brw-r----- root disk 3 3 Oct 3 6 hda3 crw--w--w-- card tty May 6 6 tty crw--w--w-- card tty May 6 6 tty crw--w--w-- card tty May 6 6 tty... -

13 Device driver Device fie» major number u incude/inux/major.h, Documentation/devices.txt, more /proc/devices» minor number Major Character devices Bock devices unnamed unnamed physica memory access(/dev/mem) First RAM disk(dev/ram) Kerne virtua memory(/dev/kmem) foppy (fd*) 3 IDE hard disk (hd* ) termina termina & AUX 6 Parae Interface 7 virtua consoe (vcs*) 8 SCSI hard disk (sd*) 9 SCSI tapes (st*) Bus mice(bm, psaux) SCSI CD-ROM(scd*) 3 Mitsumi CD-ROM (mcd*). -3

14 Device number» Major : device type» Minor : device unit /dev/tty, /dev/hdb /dev/tty, /dev/tty, system /dev/hdb 3,6 /dev/hdb3 3,67 /dev/hdb 3,66 /dev/hda /dev/tty3,3 /dev/hda 3, /dev/hda 3, /dev/hda3 3,3 -

15 Character devices Device Driver-.6 /pxa7/kerne/inux-.6.-h7-tku_v./fs/char_dev.c» insmod register_chrdev() (3, * name, *fops) : auto = Major number MAX_CHRDEV chrdevs[] char_device_struct struct char_device_struct { name; struct fie_operations * fops; ;.. struct char_device_struct chrdevs[max_chrdev] fie_operations seek read, write, readdir po, ioct, mmap, open, fush, reease fsync,.. Refer to side #36 -

16 Bock devices Device Driver -.6 /pxa7/kerne/inux-.6.-h7-tku_v./fs/bock_dev.c» inode function struct fie_operations def_bk_fops = {.open.reease.seek.read.write - -.mmap.fsync.ioct ; struct bdev_inode { struct bock_device bdev; struct inode vfs_inode; ; = bkdev_open, = bkdev_cose, = bock_seek, = generic_fie_read, = bkdev_fie_write, = generic_fie_mmap, = bock_fsync, = bock_ioct /pxa7/kerne/inux-.6.-h7-tku_v./incude/inux/fs.h struct bock_device { dev_t bd_dev; /* not a kdev_t - it's a search key */ struct inode * bd_inode; /* wi die */ int bd_openers;.... ; -6

17 IEB Board Memory Mapped I/O Memory Mapped I/O xffff FFFF xb xac xa8 xa xa xc x8 x x x3 x x8 x x xc x8 x x Reserved(Mbytes) SDRAM BANK 3(6Mbytes) SDRAM BANK (6Mbytes) SDRAM BANK (6Mbytes) SDRAM BANK (6Mbytes) Reserved(3Mbytes) Interna SRAM (C - C3 FFFF) Memory Mapped registers (Memory Ct) (6Mbyte) Memory Mapped registers (LCD) (6Mbyte) Memory Mapped registers (Peripheras) (6MBytes) PCMCIA Socket Space (6Mbyte) PCMCIA Socket Space (6Mbyte) Reserved(8 Mbytes) Static Bank Seect (6Mbytes) Static Bank Seect (6Mbytes) Static Bank Seect 3(6Mbytes) Static Bank Seect (6Mbytes) Static Bank Seect (6Mbytes) Static Bank Seect (6Mbytes) Name Address Size Description FND x x 7-segment FND x x 7-segment FND3 x x 7-segment 3 FND x3 x 7-segment FND x x 7-segment FND6 x x 7-segment 6 FND7 x6 x 7-segment 7 FND8 x7 x 7-segment 8 DOT_ Co x8 x Dot coumn DOT_ Co x9 x Dot coumn DOT_3 Co xa x Dot coumn 3 DOT_ Co xb x Dot coumn DOT_ Co xc x Dot coumn KEY_W xd x Key Write KEY_R xe x Key Read DAC xf x Digita to Anaog Converter ADC x x Anaog to Digita Converter STEP Motor x x Step Motor controer DC Motor x x DC Motor controer Character LCD x3 x Character LCD Contro LED x x LED -7

18 ncs<> -8

19 Address Mapping Address[..] FND ~8 x_ ~ x7_ BULVERDE PXA7 Data[3..] ncs ncs ncs ncs CPLD XCC6 Address[..] Data[3..] ncs FPGA EPC6OPQFP DOT Co~Co KEY W, R STEP MOTOR DC MOTOR x8_ ~ xc_ x_, xe_ x_ x_ CLCD RS, W/R x3_, x38_ LED x_ PXA7 I/O Devices Cache MMU Static mem. Con. Address Data FPGA Cotro FND DOT Key Step motor DC motor CLCD LED Address Decoding Virtua Address Physica Address -9

20 Address Decoder LED» 8 Bit Write [ D~D7 ]» Base Address = x LED-CS D[...7] LED-CS# D D D D3 D D D6 D D Q D Q D Q D3 Q3 D Q D Q D6 Q6 D7 Q7 OC CLK 7LCX LED LED3 LED LED7 LED LED LED6 LED DCV -

21 Device driver Device driver (not using OS)» LED Exampe : boot-ed (microcom)» main.c #incude <config.h> #incude <time.h> #define IEB_LED_CS #define LED_CS x (*((voatie unsigned char *)(IEB_LED_CS))) int main(void) { time_init(); LED_CS = xff; no cache, no optimization Aways Read/Write // Timer Initiaization // LED a off /* 8-Line BUS LEDs Contro */ whie() { LED_CS = xee; mdeay(); // sec LED_CS = xdd; mdeay(); LED_CS = xbb; mdeay(); LED_CS = x77; mdeay(); * I/O Write unsigned char *addr; addr = (unsigned char *)(x); *addr = xaa; * I/O Read unsigned char *addr, char ch; addr = (unsigned char *)(x); ch = *addr; -

22 Test run Fash fusing». Jtag u./jfashmm pxa7x3.dat edtest». boot monitor u u u cp edtest /tftpboot tftp edtest oader (target) fash oader Previous boot-ed (edtest) exampe» MMU is not used mmap() system ca uses MMU» POSIX-compiant system ca : man mmap» Mapping fies or devices into memory» Mapping physica RAM to virtua memory» Used in memory-mapped fie I/O -

23 Physica Address #define ADDRESSDOT x8 #define ADDRESSDOT x9 #define ADDRESSDOT3 xa #define ADDRESSDOT xb #define ADDRESSDOT xc mmap Device driver (using OS with system ca-mmap)» Dot Matrix Exampe : dot (microcom) Virtua Address ped = mmap(null,,prot_write,map_shared,fd,addressdot); Co ped = mmap(null,,prot_write,map_shared,fd,addressdot); Co ped3 = mmap(null,,prot_write,map_shared,fd,addressdot3); Co3 ped = mmap(null,,prot_write,map_shared,fd,addressdot); Co ped = mmap(null,,prot_write,map_shared,fd,addressdot); Co Row7 : data[6] Row6 : data[] Row : data[] Row : data[3] Row3 : data[] Row : data[] Row : data[] * Common cathode * : off / : on Refer to side #6 Number Co : x8 7F Co : x9 Co3 : xa Co : xb Co : xc 7F -3

24 mmap (main.c) unsigned char dot_co[] = {; // Dot Data #define ADDRESSDOT x8 #define ADDRESSDOT x9 #define ADDRESSDOT3 xa #define ADDRESSDOT xb #define ADDRESSDOT xc unsigned short *ped; unsigned short *ped; unsigned short *ped3; unsigned short *ped; unsigned short *ped; void dot_init(void); void dot_reset(void); void asc_to_dot(int); int main() { int count, unsigned int fd; if ((fd=open("/dev/mem",o_rdwr O_SYNC)) < ){ perror("mem open fai\n"); exit(); dot_init(); dot_reset(); for(count = ; count <= 9; count++){ // number 9 dispay asc_to_dot(count); *ped = dot_co[]; Co *ped = dot_co[]; Co *ped3 = dot_co[]; Co3 *ped = dot_co[3]; Co *ped = dot_co[]; Co seep(); return ; -

25 mmap void dot_init(void) { ped = mmap(null,,prot_write,map_shared,fd,addressdot); ped = mmap(null,,prot_write,map_shared,fd,addressdot); ped3 = mmap(null,,prot_write,map_shared,fd,addressdot3); ped = mmap(null,,prot_write,map_shared,fd,addressdot); ped = mmap(null,,prot_write,map_shared,fd,addressdot); return; void dot_reset(void){ // DOT Matrix Cear *ped = x; *ped = x; *ped3 = x; *ped = x; *ped = x; return; // Conversion from ASCII to DOT Data void asc_to_dot(int asc){ switch( asc){ case : dot_co[] = x7f; dot_co[] = x; dot_co[] = x; dot_co[3] = x; dot_co[] = x7f; break; case : dot_co[] = x; dot_co[] = x; dot_co[] = x7f; dot_co[3] = x; dot_co[] = x; break; case : dot_co[] = xf; dot_co[] = x9; dot_co[] = x9; dot_co[3] = x9; dot_co[] = x79; break; case 3 : dot_co[] = x9; dot_co[] = x9; dot_co[] = x9; dot_co[3] = x9; dot_co[] = x7f; break; case : dot_co[] = x78; dot_co[] = x8; dot_co[] = x7f; dot_co[3] = x8; dot_co[] = x8; break; case : dot_co[] = x79; dot_co[] = x9; dot_co[] = x9; dot_co[3] = x9; dot_co[] = xf; break; case 6 : dot_co[] = x7f; dot_co[] = x9; dot_co[] = x9; dot_co[3] = x9; dot_co[] = xf; break; case 7 : dot_co[] = x; dot_co[] = x; dot_co[] = x; dot_co[3] = x; dot_co[] = x7f; break; case 8 : dot_co[] = x7f; dot_co[] = x9; dot_co[] = x9; dot_co[3] = x9; dot_co[] = x7f; break; case 9 : dot_co[] = x78; dot_co[] = x8; dot_co[] = x8; dot_co[3] = x8; dot_co[] = x7f; break; return;» Test run : #./dot -

26 Device driver Device driver (using Modue-LKM)» FND (7-segment) Exampe : fnd (microcom) VCC GND -6

27 Address Mapping data 367 x x x x3 x x x6 x7-7

28 Address Mapping #define FND_MAJOR 3 #define FND_NAME "fnd" #define MAX_FND 8 #define FPGA_FND_CS (x) #define FPGA_FND_CS (x) #define FPGA_FND_CS (x) #define FPGA_FND_CS3 (x3) #define FPGA_FND_CS (x) #define FPGA_FND_CS (x) #define FPGA_FND_CS6 (x6) #define FPGA_FND_CS7 (x7) fnd.c mem_addr_fnd = FPGA_FND_CS; mem_addr_fnd = FPGA_FND_CS; mem_addr_fnd = FPGA_FND_CS; mem_addr_fnd3 = FPGA_FND_CS3; mem_addr_fnd = FPGA_FND_CS; mem_addr_fnd = FPGA_FND_CS; mem_addr_fnd6 = FPGA_FND_CS6; mem_addr_fnd7 = FPGA_FND_CS7; mem_en = x; mem_fnd_cs = ioremap_nocache ( mem_addr_fnd, mem_en); if(!mem_fnd_cs) { printk("error mapping fnd memory"); return -EBUSY; #define FND_CS #define FND_CS #define FND_CS #define FND_CS3 #define FND_CS #define FND_CS #define FND_CS6 #define FND_CS7 (*((voatie unsigned char *)(mem_fnd_cs))) (*((voatie unsigned char *)(mem_fnd_cs))) (*((voatie unsigned char *)(mem_fnd_cs))) (*((voatie unsigned char *)(mem_fnd_cs3))) (*((voatie unsigned char *)(mem_fnd_cs))) (*((voatie unsigned char *)(mem_fnd_cs))) (*((voatie unsigned char *)(mem_fnd_cs6))) (*((voatie unsigned char *)(mem_fnd_cs7))) -8

29 Address Mapping ioremap / iounmap» Remap an arbitrary physica address space into the kerne virtua address space» Virtua address = ioremap_nocache (physica address, size) u /pxa7/kerne/inux-.6.-h7-tku_v./incude/ asm-arm/io.h #define ioremap_nocache(cookie, size) ioremap(cookie, size,, ) u /pxa7/kerne/inux-.6.-h7-tku_v./arch/ arm/mm/ioremap.c ioremap(unsigned ong phys_addr, size_t size, unsigned ong fags, unsigned ong aign) -9

30 System Memory Copy copy_from_user = get_user output device(write)» Copy a memory bock to kerne memory from user memory» Copy_from_user(kerne, user, count) u u /pxa7/kerne/inux-.6.-h7-tku_v./incude /asm-arm/uaccess.h copy_from_user(void *to, const void user *from, unsigned ong n); /pxa7/kerne/inux-.6.-h7-tku_v./arch/ arm/ib/uaccess.s arch_copy_from_user(void *to, const void *from, unsigned ong n); to - kerne memory from - user memory n - number of bytes to copy copy_to_user = put_user input device(read)» Copy a memory bock to user memory from kerne memory -3

31 Bit Position a f FND g b fnd-test.c unsigned char asc_to_fnd(int n){ unsigned char c; e d a : data[] b : data[] c : data[] d : data[3] e : data[] f : data[] g : data[6] dp : data[7] F 3 c dp switch (n) { case : c = x3f; break; case : c = x6; break; case : c = xb; break; case 3: c = xf; break; case : c = x66; break; case : c = x6d; break; case 6: c = x7d; break; case 7: c = x7; break; case 8: c = x7f; break; case 9: c = x67; break; defaut: c = x; break; return c; -3

32 FND Device Driver Device Driver : fnd.c static struct fie_operations device_fops = {.open = fnd_open,.write = fnd_write,.reease = fnd_reease,.ioct = fnd_ioct, ; fnd_open» fnd_cear() -> a off (FND_CS = x;), return fnd_reease : cose» return : reease fie object fnd_write» copy_from_user(disp, buf, count); buf(user), disp(kerne)» number write (case : FND_CS7 = disp[]; break;) -3

33 FND Device Driver fnd_write fnd.c fnd_write (struct fie *fip, const char *buf, size_t count, off_t *f_pos) { int i; write(dev, buf, MAXFND); copy_from_user( disp, buf, count) ; static unsigned char disp[8] = {, buf, count=maxfnd=8 ; buf = user / disp= kerne for(i =; i <= MAX_FND; i++){ switch(i) ; at first ca, a dispay -> disp[] ~ disp[7] = { ; at second ca, a dispay -> disp[] ~ disp[7] = case : FND_CS7 = disp[]; break; case : FND_CS6 = disp[]; break; case 3: FND_CS = disp[]; break; case : FND_CS = disp[3]; break; case : FND_CS3 = disp[]; break; case 6: FND_CS = disp[]; break; case 7: FND_CS = disp[6]; break; case 8: FND_CS = disp[7]; break; defaut : break; return ; -33

34 FND Device Driver fnd_ioct» command process, but do nothing in this case modue_init : fnd_init» register_chrdev» memory mapping : ioremap modue_exit : fnd_exit» unregister_chrdev» memory unmapping : iounmap -3

35 FND Test Program fnd-test.c main(int ac, char *av[]) { int n, count, dev; unsigned char buf[maxfnd+]; MAXFND = 8 dev = open( fnd_dev, O_RDWR); /dev/fnd if (dev < ) { fprintf(stderr, "cannot open FND (%d)", dev); exit(); memset(buf,, sizeof(buf)); for (n = ; n <= 9; n++) { for( count = ; count < MAXFND; count++){ buf[count]= asc_to_fnd(n); buf[] ~ buf[7] = write(dev, buf,maxfnd); useep(); HDD Root fiesystem Memory zimage.edit fnd_test.c fnd.c fnd_test fnd.ko make.cross compie 3.minicom(Zmodem) test fnd.ko 6../fnd_test /dev/fnd.insmod fnd_test.mknod fnd.ko -3

36 Modue Insta/Remove Driver Modue (fnd.ko) Kerne she insmod fnd.ko 커널내함수 Device Driver 배열구조체구조체함수포인터커널함수호츌 fnd.c Init_modue() { register_chrdev(major, fnd,fnd_fops ) fnd_fops fnd_open fnd_reease fnd_write fnd_read fnd_open {kerne function ca or return fnd_reease {kerne function ca or return register_chrdev() (3, * name, *fops) { MAJOR = : chrdevs[] auto assign kerne function ca() { kerne function ca() { device_struct &fnd_fops chrdevs[] MAJOR 데이터포인터 fnd_write { copy_from_user() copy_from_user() { 구조체할당 rmmod fnd fnd_read { copy_to_user() ceanup_modue() { unregister_chrdev(major, fnd ) copy_to_user() { unregister_chrdev(major, * name) { -36

37 Test run Compie modue (o:., ko:.6) : make Downoad to target : minicom / nfs Insta the modue #insmod fnd.ko : /etc/rc.sysinit» Adding a new driver at modue initiaization u int register_chrdev(unsigned int major, const char *name, struct fie_operations *fops);» Remove modue u int unregister_chrdev(unsigned int major, const char *name); List the modue #smod If you et the system pick Major number, you can find the major number (for specia creation) by #more /proc/devices Make a specia fie node character device fie #mknod /dev/fnd c 3-37

38 Appication program #./fnd-test Target booting :» /etc/rc.sysinit : modue oad # ieb modue insmod /data/ccd.ko insmod /data/dc_motor.ko insmod /data/dot.ko insmod /data/fnd.ko insmod /data/key.ko insmod /data/ed.ko insmod /data/st_motor.ko -38

39 LCD LCD Interface Pin No Name Function Description Vss Power GND Vdd Power + V Vss Vdd Vee RS R/W E D D D D3 D D D6 D7 3 Vee Contrast Adj. RS Command R/W Command - V Register Seect contro data Read / Write write read 6 E Command Enabe (Strobe) 7 D I/O Data LSB 8 D I/O Data 9 D I/O Data D3 I/O Data D I/O Data D I/O Data. Direct Contro or Address decoder Contro. bit or 8bit Data Length 3 D6 I/O Data D7 I/O Data MSB -39

40 LCD Instructions Instruction RS RW D7 D6 D D D3 D D D Description time NOP No Operation Cear Dispay Cursor Home x Entry Mode Set I/D S Dispay Contro D C B Cear dispay & set address counter to zero Set adress counter to zero, return shifted dispay to origina position. DD RAM contents remains unchanged. Set cursor move direction (I/D) and specify automatic dispay shift (S). Turn dispay (D), cursor on/off (C), and cursor binking (B)..ms.ms 37us 37us Cursor / Dispay shift S/ C R/ L x x Shift dispay or move cursor (S/C) and specify direction (R/L). 37us Function Set DL N F x x Set CGRAM Address Set DDRAM Address Busy Fag & Address CGRAM Address DDRAM Address BF Address Counter Set interface data width (DL), number of dispay ines (N) and character font (F). Set CGRAM address. CGRAM data is sent afterwards. Set DDRAM address. DDRAM data is sent afterwards. Read busy fag (BF) and address counter 37us 37us 37us Write Data Data Write data into DDRAM or CGRAM 37us Read Data Data Read data from DDRAM or CGRAM 37us -

41 LCD Bit Settings Bit name Settings I/D = Decrement cursor position = Increment cursor position S = No dispay shift = Dispay shift D = Dispay off = Dispay on C = Cursor off = Cursor on B = Cursor bink off = Cursor bink on S/C = Move cursor = Shift dispay R/L = Shift eft = Shift right DL = -bit interface = 8-bit interface N = ine = ines F = x7 dots = x dots BF = Can accept instruction = Interna operation in progress x Don t care DDRAM : Dispay Data RAM CGRAM : Character Generator RAM -

42 - LCD DDRAM DDRAM address usage for a -ine LCD Dispay size Visibe Character positions DDRAM addresses x 6.. h..fh + h..fh x..9 h..3h + h..3h x..3 h..7h + h..7h x 3..3 h..fh + h..fh x..39 h..7h + h..67h. Character position (dec). Row(Line ) DDRAM address (hex) 3. Row(Line ) DDRAM address (hex) A B C D E F A B C D E F A B C D E F A B C D E F

43 LCD Time cyce Write-Cyce V DD.7-.V.-.V.7-.V.-.V Parameter Symbo Min Max Unit Enabe Cyce Time t c - - ns Enabe Puse Width (High) t w ns Enabe Rise/Fa Time t r, t f - - ns Address Setup Time t as ns Address Hod Time t ah - - ns Data Setup Time t ds ns Data Hod Time t h - - ns -3

44 LCD Contro methods» Direct contro : digita I/O (GPIO)» Address decoder contro : I/O address Address decode» Refer to side #» Contro : x3 RS=BA9= (contro) R/W=BA8= (write) mem_base_wr» Data : x38 RS=BA9= (data) R/W=BA8= (write) mem_base_rs -

45 Device Driver LCD device driver : ccd.c» 8 Bit Write [ D~D7 ]» Contro Address = x3, Data Address = x38 #define FPGA_CLCD_WR_ADD (x3) #define FPGA_CLCD_RS_ADD (x38) mem_addr_wr = FPGA_CLCD_WR_ADD; mem_addr_rs = FPGA_CLCD_RS_ADD; mem_base_wr = ioremap_nocache ( mem_addr_wr, mem_en); // modue_init() mem_base_rs = ioremap_nocache ( mem_addr_rs, mem_en); ccd_write static struct fie_operations ccd_fops = {.write = ccd_write,.ioct = ccd_ioct,.open = ccd_open,.reease = ccd_reease, ; static ssize_t ccd_write (struct fie *fip, const char *buf, size_t count, off_t *f_pos) { char data[3]; memset(data,, 3); copy_from_user(data, buf, count); //buf(user), data(kerne) string_out(data); return ; -

46 Device Driver string_out(data); static void string_out(char *str) { char *s; int i=; printk("ccd.o: %s\n", str); cd_init(); for (s=str; *s; s++){ *((voatie unsigned char *)(mem_base_rs)) = *s; // CLCD_DATA_ADDR = *s; if(i == ) { udeay(); *((voatie unsigned char *)(mem_base_wr)) = xc; //Set DDRAM Address to nd ine C = 8 + udeay(); i++; -6

47 Device Driver cd_init(); static void cd_init(void) { *((voatie unsigned char *)(mem_base_wr)) = x38; // Function Set : DL = -bit interface = 8-bit interface N = ine = ines F = x7 dots = x dots mdeay(); *((voatie unsigned char *)(mem_base_wr)) = x38; mdeay(); *((voatie unsigned char *)(mem_base_wr)) = x38; mdeay(); *((voatie unsigned char *)(mem_base_wr)) = xe; mdeay(); // Dispay Contro : D = Dispay off = Dispay on C = Cursor off = Cursor on B = Cursor bink off = Cursor bink on *((voatie unsigned char *)(mem_base_wr)) = x; // Cursor home mdeay(); *((voatie unsigned char *)(mem_base_wr)) = x; // Cear dispay mdeay(); -7

48 Device Driver ccd_open» return ccd_reease» return : reease fie object ccd_ioct» command process static int ccd_ioct( struct fie *fip, unsigned int cmd, unsigned ong arg) { switch(cmd) { case : { string_out("ioct() cmd test "); break; defaut: return ; return ; -8

49 Device Driver modue_init : ccd_init» register_chrdev» memory mapping : ioremap modue_exit : ccd_exit» unregister_chrdev» memory unmapping : iounmap -9

50 Device Driver ccd-test.c Test Program /* LCD test program */ #incude <stdio.h> #incude <fcnt.h> static char cddev[] = "/dev/ccd"; static int cdfd = (-); #define MAXCHR 3 main(int ac, char *av[]) { int n; char buf[maxchr]; cdfd = open( cddev, O_RDWR); if (cdfd < ) { fprintf(stderr, "cannot open LCD (%d)", cdfd); exit(); // ioct(cdfd,, ); // seep(); memset(buf,, sizeof(buf)); if (ac > ) { n = stren(av[]); // av[] = ccd-test, av[]= xxxxx if (n > MAXCHR) n = MAXCHR; // truncate max 3 char above. memcpy(buf, av[], n); write(cdfd, buf, MAXCHR); -

51 Test run Make modue :» sampe modues in microcom homepage Load the modue» insmod ccd.ko : aready instaed at /etc/rc.sysinit, >rmmod ccd Check that the modue is oaded» cat /proc/modues or smod Make specia fie» mknod /dev/ccd c xxx Test run»./ccd-test test message Remove the modue» rmmod ccd -

Unix (Linux) Device Drivers

Unix (Linux) Device Drivers Unix (Linux) Device Drivers Kernel module that handles the interaction with an specific hardware device, hiding its operational details behind a common interface Three basic categories Character Block

More information

CS5460/6460: Operating Systems. Lecture 24: Device drivers. Anton Burtsev April, 2014

CS5460/6460: Operating Systems. Lecture 24: Device drivers. Anton Burtsev April, 2014 CS5460/6460: Operating Systems Lecture 24: Device drivers Anton Burtsev April, 2014 Device drivers Conceptually Implement interface to hardware Expose some high-level interface to the kernel or applications

More information

Linux Device Drivers. 3. Char Drivers. 1. Introduction 2. Kernel Modules 3. Char Drivers 4. Advanced Char Drivers 5. Interrupts

Linux Device Drivers. 3. Char Drivers. 1. Introduction 2. Kernel Modules 3. Char Drivers 4. Advanced Char Drivers 5. Interrupts Linux Device Drivers Dr. Wolfgang Koch Friedrich Schiller University Jena Department of Mathematics and Computer Science Jena, Germany wolfgang.koch@uni-jena.de Linux Device Drivers 1. Introduction 2.

More information

ODMR0205 Dimmer + Controller

ODMR0205 Dimmer + Controller ODMR0205 Dimmer + Controer Summary Thanks for using ODMR0205 phase cut dimmer. This is a two channes output MOS-FET phase cut dimmer the max. current of each channe is 5A. Product Features Compy with EU-BUS

More information

Directives & Memory Spaces. Dr. Farid Farahmand Updated: 2/18/2019

Directives & Memory Spaces. Dr. Farid Farahmand Updated: 2/18/2019 Directives & Memory Spaces Dr. Farid Farahmand Updated: 2/18/2019 Memory Types Program Memory Data Memory Stack Interna PIC18 Architecture Data Memory I/O Ports 8 wires 31 x 21 Stack Memory Timers 21 wires

More information

Virtual File System (VFS) Implementation in Linux. Tushar B. Kute,

Virtual File System (VFS) Implementation in Linux. Tushar B. Kute, Virtual File System (VFS) Implementation in Linux Tushar B. Kute, http://tusharkute.com Virtual File System The Linux kernel implements the concept of Virtual File System (VFS, originally Virtual Filesystem

More information

LCD. Configuration and Programming

LCD. Configuration and Programming LCD Configuration and Programming Interfacing and Programming with Input/Output Device: LCD LCD (liquid crystal display) is specifically manufactured to be used with microcontrollers, which means that

More information

LCDs. Embedded Systems Interfacing. 20 September 2011

LCDs. Embedded Systems Interfacing. 20 September 2011 20 September 2011 How Polarizers Work How work How Color Work Other Technologies Reflective Nematic (no back light) Cholesteric Liquid Crystal Organic LED/Polymer LED Vacuum Florescent Display Display

More information

Lab Experiment 9: LCD Display

Lab Experiment 9: LCD Display Lab Experiment 9: LCD Display 1 Introduction Liquid Crystal Displays (LCDs) provide an effective way for processors to communicate with the outside world. The LPC2148 board used in the lab is equipped

More information

Step Motor. Step Motor Device Driver. Step Motor. Step Motor (2) Step Motor. Step Motor. source. open loop,

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

More information

Character Device Drivers

Character Device Drivers Character Device Drivers 張大緯 CSIE, NCKU The information on the slides are from Linux Device Drivers, Third Edition, by Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman. Copyright 2005 O Reilly

More information

Linux Device Driver. Analog/Digital Signal Interfacing

Linux Device Driver. Analog/Digital Signal Interfacing Linux Device Driver Analog/Digital Signal Interfacing User Program & Kernel Interface Loadable Kernel Module(LKM) A new kernel module can be added on the fly (while OS is still running) LKMs are often

More information

中显液晶 技术资料 中显控制器使用说明书 2009年3月15日 北京市海淀区中关村大街32号和盛大厦811室 电话 86 010 52926620 传真 86 010 52926621 企业网站.zxlcd.com

中显液晶 技术资料 中显控制器使用说明书 2009年3月15日 北京市海淀区中关村大街32号和盛大厦811室 电话 86 010 52926620 传真 86 010 52926621   企业网站.zxlcd.com http://wwwzxlcdcom 4 SEG / 6 COM DRIVER & CONTROLLER FOR DOT MATRIX LCD June 2 Ver Contents in this document are subject to change without notice No part of this document may be reproduced or transmitted

More information

Linux Loadable Kernel Modules (LKM)

Linux Loadable Kernel Modules (LKM) Device Driver Linux Loadable Kernel Modules (LKM) A way dynamically ADD code to the Linux kernel LKM is usually used for dynamically add device drivers filesystem drivers system calls network drivers executable

More information

Linux Device Drivers. 3. Char Drivers cont. 3. Char Drivers. 1. Introduction 2. Kernel Modules 3. Char Drivers 4. Advanced Char Drivers 5.

Linux Device Drivers. 3. Char Drivers cont. 3. Char Drivers. 1. Introduction 2. Kernel Modules 3. Char Drivers 4. Advanced Char Drivers 5. Linux Device Drivers Dr. Wolfgang Koch Friedrich Schiller University Jena Department of Mathematics and Computer Science Jena, Germany wolfgang.koch@uni-jena.de Linux Device Drivers 1. Introduction 2.

More information

Fall 2017 :: CSE 306. File Systems Basics. Nima Honarmand

Fall 2017 :: CSE 306. File Systems Basics. Nima Honarmand File Systems Basics Nima Honarmand File and inode File: user-level abstraction of storage (and other) devices Sequence of bytes inode: internal OS data structure representing a file inode stands for index

More information

LCD MODULE 1x mm INCL. CONTROLLER HD 44780

LCD MODULE 1x mm INCL. CONTROLLER HD 44780 12.2003 LCD MODULE 1x8-11.48mm INCL. CONTROLLER HD 44780 Issue 04.2011 no more mounting required Dimension 68 x 27 mm 11mm flat even with LED B/L FEATURES * HIGH CONTRAST LCD SUPERTWIST DISPLAY GRAY OR

More information

CS 378 (Spring 2003)

CS 378 (Spring 2003) Department of Computer Sciences THE UNIVERSITY OF TEXAS AT AUSTIN CS 378 (Spring 2003) Linux Kernel Programming Yongguang Zhang (ygz@cs.utexas.edu) Copyright 2003, Yongguang Zhang This Lecture Device Driver

More information

34COM/60SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD

34COM/60SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD 34COM/6SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD INTRODUCTION is a dot matrix LCD driver & controller LSI which is fabricated by low power CMOS technology It can display, 2 or 4 lines with 5 8 or 6 8

More information

16COM/80SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD

16COM/80SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD 6COM/80SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD INTRODUCTION The is a dot matrix LCD driver & controller LSI which is fabricated by low power CMOS technology It is capable of displaying or 2 lines with

More information

The modules in this lab room are 4 line by 16 character display modules. The data sheet/users manual for the module is posted on My.Seneca.

The modules in this lab room are 4 line by 16 character display modules. The data sheet/users manual for the module is posted on My.Seneca. LCD Modules A common output display device used with low cost embedded systems is a character LCD display. The displays are available as complete modules with a standard microprocessor parallel interface.

More information

Introduction Reading Writing scull. Linux Device Drivers - char driver

Introduction Reading Writing scull. Linux Device Drivers - char driver Overview 1 2 3 4 Major, minor File Operations The file Structure The inode structure Registraction simplest driver, suitable for most simple devices, follow the book. Jernej Figure: Vičič. (Simple Character

More information

Operating System Labs. Yuanbin Wu

Operating System Labs. Yuanbin Wu Operating System Labs Yuanbin Wu cs@ecnu Announcement Project 1 due 21:00, Oct. 8 Operating System Labs Introduction of I/O operations Project 1 Sorting Operating System Labs Manipulate I/O System call

More information

AN1745. Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas. Introduction

AN1745. Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas. Introduction Order this document by /D Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas Introduction More and more applications are requiring liquid crystal displays

More information

16COM / 40SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD

16COM / 40SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD INTRODUCTION KS0066U is a dot matrix LCD driver & controller LSI whichis fabricated by low power CMOS technology It can display 1or 2 lines with the 5 8 dots format or 1 line with the 5 11 dots format

More information

CSE 333 SECTION 3. POSIX I/O Functions

CSE 333 SECTION 3. POSIX I/O Functions CSE 333 SECTION 3 POSIX I/O Functions Administrivia Questions (?) HW1 Due Tonight Exercise 7 due Monday (out later today) POSIX Portable Operating System Interface Family of standards specified by the

More information

Guardian 365 Pro App Guide. For more exciting new products please visit our website: Australia: OWNER S MANUAL

Guardian 365 Pro App Guide. For more exciting new products please visit our website: Australia:   OWNER S MANUAL Guardian 365 Pro App Guide For more exciting new products pease visit our website: Austraia: www.uniden.com.au OWNER S MANUAL Privacy Protection Notice As the device user or data controer, you might coect

More information

16COM/40SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD

16COM/40SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD 6COM/4SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD INTRODUCTION is a dot matrix LCD driver & controller LSI which is fabricated by low power CMOS technology It can display, 2-line with 5 x 8 or 5 x dots

More information

CSE120 Principles of Operating Systems. Prof Yuanyuan (YY) Zhou Advanced Memory Management

CSE120 Principles of Operating Systems. Prof Yuanyuan (YY) Zhou Advanced Memory Management CSE120 Principes of Operating Systems Prof Yuanyuan (YY) Zhou Advanced Memory Management Advanced Functionaity Now we re going to ook at some advanced functionaity that the OS can provide appications using

More information

ECE 4510/5530 Microcontroller Applications Week 9

ECE 4510/5530 Microcontroller Applications Week 9 ECE 45/553 Microcontroller Applications Week 9 Dr. Bradley J. Bazuin Associate Professor Department of Electrical and Computer Engineering College of Engineering and Applied Sciences Lab 7 & 8 Elements

More information

16COM / 80SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD

16COM / 80SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD INTRODUCTION KS0070B is a dot matrix LCD driver & controller LSI which is fabricated by low power CMOS technology. It is capable of displaying 1 or 2 lines with the 5 7 format or 1 line with the 5 10 dots

More information

LCD MODULE 4x mm INCL. CONTROLLER SSD1803

LCD MODULE 4x mm INCL. CONTROLLER SSD1803 LCD MODULE 4x20-3.75mm INCL. CONTROLLER SSD1803 Issue 4.2013 EA DIP203J-4NLW EA DIP203G-4NLED Dimension 68 x 27 mm EA DIP203B-4NLW Dimension 75 x 27 mm FEATURES * HIGH CONTRAST LCD SUPERTWIST DISPLAY *

More information

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Hardware Components Illustrated

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Hardware Components Illustrated Intro to Programming & C++ Unit 1 Sections 1.1-3 and 2.1-10, 2.12-13, 2.15-17 CS 1428 Fa 2017 Ji Seaman 1.1 Why Program? Computer programmabe machine designed to foow instructions Program instructions

More information

Designing and developing device drivers. Coding drivers

Designing and developing device drivers. Coding drivers Designing and developing device drivers Coding drivers Registering a driver 2 calls to register a driver defined in int register_chrdev_region(dev_t first, unsigned int count, char *name);

More information

Parallel Display Specifications Revision 1.0

Parallel Display Specifications Revision 1.0 MOP-AL162A Parallel Display Specifications Revision 1.0 Revision History Revision Description Author 1.0 Initial Release Clark 0.2 Updates as per issue #333 Clark 0.1 Initial Draft Clark 1 Contents Revision

More information

Item Symbol Standard Unit Power voltage VDD-VSS Input voltage VIN VSS - VDD

Item Symbol Standard Unit Power voltage VDD-VSS Input voltage VIN VSS - VDD SPECIFICATIONS OF LCD MODULE Features 1. 5x8 dots with cursor 2. Built-in controller (S6A0069 or equivalent) 3. Easy interface with 4-bit or 8-bit MPU 4. +5V power supply (also available for =3.0V) 5.

More information

ELE 758 * DIGITAL SYSTEMS ENGINEERING * MIDTERM TEST * Circle the memory type based on electrically re-chargeable elements

ELE 758 * DIGITAL SYSTEMS ENGINEERING * MIDTERM TEST * Circle the memory type based on electrically re-chargeable elements ELE 758 * DIGITAL SYSTEMS ENGINEERING * MIDTERM TEST * Student name: Date: Example 1 Section: Memory hierarchy (SRAM, DRAM) Question # 1.1 Circle the memory type based on electrically re-chargeable elements

More information

LCM NHD-0440CI-YTBL. User s Guide. (Liquid Crystal Display Module) RoHS Compliant. For product support, contact NHD CI- Y- T- B- L-

LCM NHD-0440CI-YTBL. User s Guide. (Liquid Crystal Display Module) RoHS Compliant. For product support, contact NHD CI- Y- T- B- L- User s Guide NHD-0440CI-YTBL LCM (Liquid Crystal Display Module) RoHS Compliant NHD- 0440- CI- Y- T- B- L- Newhaven Display 4 Lines x 40 Characters C: Display Series/Model I: Factory line STN Yellow/Green

More information

ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective. Part I: Operating system overview: Disk and File System

ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective. Part I: Operating system overview: Disk and File System ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective Part I: Operating system overview: Disk and File System 1 What Disks Look Like Hitachi Deskstar T7K500 SATA 2

More information

SSD1803. Product Preview. 100 x 34 STN LCD Segment / Common Mono Driver with Controller

SSD1803. Product Preview. 100 x 34 STN LCD Segment / Common Mono Driver with Controller SOLOMON SYSTECH SEMICONDUCTOR TECHNICAL DATA Crystalfontz Thiscontrolerdatasheetwasdownloadedfrom htp:/www.crystalfontz.com/controlers/ SSD1803 Product Preview 100 x 34 STN LCD Segment / Common Mono Driver

More information

Special Edition Using Microsoft Excel Selecting and Naming Cells and Ranges

Special Edition Using Microsoft Excel Selecting and Naming Cells and Ranges Specia Edition Using Microsoft Exce 2000 - Lesson 3 - Seecting and Naming Ces and.. Page 1 of 8 [Figures are not incuded in this sampe chapter] Specia Edition Using Microsoft Exce 2000-3 - Seecting and

More information

Predator P User s Guide - 1

Predator P User s Guide - 1 Predator P09-600 User s Guide - 1 2-2017. A Rights Reserved. Desktop Computer Covers: Tower modes This revision: November 2017 V1.00 Important This manua contains proprietary information that is protected

More information

The bigger picture. File systems. User space operations. What s a file. A file system is the user space implementation of persistent storage.

The bigger picture. File systems. User space operations. What s a file. A file system is the user space implementation of persistent storage. The bigger picture File systems Johan Montelius KTH 2017 A file system is the user space implementation of persistent storage. a file is persistent i.e. it survives the termination of a process a file

More information

LCM NHD-0440AZ-FSW -FBW. User s Guide. (Liquid Crystal Display Character Module) RoHS Compliant FEATURES

LCM NHD-0440AZ-FSW -FBW. User s Guide. (Liquid Crystal Display Character Module) RoHS Compliant FEATURES User s Guide NHD-0440AZ-FSW -FBW LCM (Liquid Crystal Display Character Module) RoHS Compliant FEATURES Display format: 4 Lines x 40 Characters (A) Display Series/Model (Z) Factory line (F) Polarizer =

More information

USB. Development of a USB device driver working on Linux and Control Interface. Takeshi Fukutani, Shoji Kodani and Tomokazu Takahashi

USB. Development of a USB device driver working on Linux and Control Interface. Takeshi Fukutani, Shoji Kodani and Tomokazu Takahashi Linux USB Development of a USB device driver working on Linux and Control Interface Takeshi Fukutani, Shoji Kodani and Tomokazu Takahashi Recently, it s becoming more popular to utilize Linux for controlling

More information

DP-8020 Hardware User Guide v1.10. DP-8020 Hardware User Guide V1.10

DP-8020 Hardware User Guide v1.10. DP-8020 Hardware User Guide V1.10 DP-8020 Hardware User Guide V1.10 DeePhi Proprietary Copyright Deephi Technoogies Co., Ltd Copyright 2018 DeePhi Tech, Inc. A rights reserved. No part of this pubication may be reproduced or transmitted

More information

Device Drivers Demystified ESC 117. Doug Abbott, Principal Consultant Intellimetrix. Why device drivers? What s a device driver?

Device Drivers Demystified ESC 117. Doug Abbott, Principal Consultant Intellimetrix. Why device drivers? What s a device driver? ESC 117, Principal Consultant Intellimetrix Outline Introduction Why device drivers? What s a device driver? Abstract model of device driver OS agnostic What makes drivers seem complicated? Independently

More information

VIRTUAL FILE SYSTEM AND FILE SYSTEM CONCEPTS Operating Systems Design Euiseong Seo

VIRTUAL FILE SYSTEM AND FILE SYSTEM CONCEPTS Operating Systems Design Euiseong Seo VIRTUAL FILE SYSTEM AND FILE SYSTEM CONCEPTS 2016 Operating Systems Design Euiseong Seo (euiseong@skku.edu) File Layout An entity that separates and isolates data Files have meanings only to applications

More information

Thermal Mini Printer User Instructions

Thermal Mini Printer User Instructions CP103 Therma Mini Printer User Instructions AWT 35-501163 Issue AA Breckne is a trademark of the Iinois Too Works group of companies whose utimate parent company is Iinois Too Works Inc ( Iinois Too Works

More information

file://j:\macmillancomputerpublishing\chapters\in073.html 3/22/01

file://j:\macmillancomputerpublishing\chapters\in073.html 3/22/01 Page 1 of 15 Chapter 9 Chapter 9: Deveoping the Logica Data Mode The information requirements and business rues provide the information to produce the entities, attributes, and reationships in ogica mode.

More information

Application Note. Interfacing to a Graphics LCD from PSoC. Summary This Application Note describes how to control a graphic LCD in a PSoC application.

Application Note. Interfacing to a Graphics LCD from PSoC. Summary This Application Note describes how to control a graphic LCD in a PSoC application. Application Note AN2147 Interfacing to a Graphics LCD from PSoC Author: Pham Minh Tri Associated Projects: Yes Associated Part Family: CY8C27xxx PSoC Designer Version: 4.0 Associated Application Notes:

More information

FAME Operatinf Systems - Modules

FAME Operatinf Systems - Modules FAME Operatinf Systems - Modules 2012 David Picard Contributions: Arnaud Revel, Mickaël Maillard picard@ensea.fr Introduction Linux is not a monolithic pile of code anymore Possibility to add/remove functionalities

More information

USER S GUIDE ATM4004A

USER S GUIDE ATM4004A USER S GUIDE ATM4004A Liquid Crystal Display Module CONTENTS 1.0 Mechanical Diagram. 3 2.0 Absolute Maximum Ratings 4 3.0 Description of Terminals. 4 4.0 Optical Characteristics 5 5.0 Electrical Characteristics

More information

Filesystem. Disclaimer: some slides are adopted from book authors slides with permission 1

Filesystem. Disclaimer: some slides are adopted from book authors slides with permission 1 Filesystem Disclaimer: some slides are adopted from book authors slides with permission 1 Recap Blocking, non-blocking, asynchronous I/O Data transfer methods Programmed I/O: CPU is doing the IO Pros Cons

More information

Alphanumeric LCD display module 24 characters by 2 line. General description

Alphanumeric LCD display module 24 characters by 2 line. General description МТ 24S2L Alphanumeric LCD display module 24 characters by 2 line General description MT 24S2L LCD display module is composed of LSI controller and LCD panel. КB1013VG6 controller manufactured by ANGSTREM

More information

EMBEDDED HARDWARE DESIGN. Tutorial Interfacing LCD with Microcontroller /I

EMBEDDED HARDWARE DESIGN. Tutorial Interfacing LCD with Microcontroller /I EMBEDDED HARDWARE DESIGN Tutorial Interfacing LCD with Microcontroller 2009-10/I LCD (Liquid Crystal Display) has become very popular option for displaying in Embedded Applications. Since they are very

More information

DOT MATRIX CHARACTER LCD MODULE USER S MANUAL

DOT MATRIX CHARACTER LCD MODULE USER S MANUAL DOT MATRIX CHARACTER LCD MODULE USER S MANUAL OPTREX CORPORATION Apollo Display Technologies Inc. 194-22 Morris Ave. Holtsville NY 11742 Phone: (516) 654-1143 Fax: (516) 654-1496 www.apollodisplays.com

More information

CSE 333 SECTION 3. POSIX I/O Functions

CSE 333 SECTION 3. POSIX I/O Functions CSE 333 SECTION 3 POSIX I/O Functions Administrivia Questions (?) HW1 Due Tonight HW2 Due Thursday, July 19 th Midterm on Monday, July 23 th 10:50-11:50 in TBD (And regular exercises in between) POSIX

More information

Dot Matrix LCD Controller Driver

Dot Matrix LCD Controller Driver PF22-7 SED27F/D Dot Matrix LCD Controller Driver /, / or /6 Duty Dot Matrix Drive ROM 24 characters Built-in Character Generator ROM and RAM ( RAM characters ) Maximum Simultaneous Display of Characters

More information

Linux drivers - Exercise

Linux drivers - Exercise Embedded Realtime Software Linux drivers - Exercise Scope Keywords Prerequisites Contact Learn how to implement a device driver for the Linux OS. Linux, driver Linux basic knowledges Roberto Bucher, roberto.bucher@supsi.ch

More information

Operating System Concepts Ch. 11: File System Implementation

Operating System Concepts Ch. 11: File System Implementation Operating System Concepts Ch. 11: File System Implementation Silberschatz, Galvin & Gagne Introduction When thinking about file system implementation in Operating Systems, it is important to realize the

More information

JUL. 27, 2001 Version 1.0

JUL. 27, 2001 Version 1.0 S SPLC782A 6COM/8SEG Controller/Driver JUL. 27, 2 Version. SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLOGY CO. is

More information

Product Information. Features. Table of Contents EA DIP162 DN3LW EA DIP162 DHNLED EA DIP162 DNLED EA DIP162J DN3LW

Product Information. Features. Table of Contents EA DIP162 DN3LW EA DIP162 DHNLED EA DIP162 DNLED EA DIP162J DN3LW LCD Module with included HD44780 controller Product Information EA DIP162 DNLED EA DIP162 DHNLED EA DIP162 DN3LW EA DIP162J DN3LW LCD Module with two 16-character rows 6.68mm in height Same as previous,

More information

File Management 1/34

File Management 1/34 1/34 Learning Objectives system organization and recursive traversal buffering and memory mapping for performance Low-level data structures for implementing filesystems Disk space management for sample

More information

we are here Page 1 Recall: How do we Hide I/O Latency? I/O & Storage Layers Recall: C Low level I/O

we are here Page 1 Recall: How do we Hide I/O Latency? I/O & Storage Layers Recall: C Low level I/O CS162 Operating Systems and Systems Programming Lecture 18 Systems October 30 th, 2017 Prof. Anthony D. Joseph http://cs162.eecs.berkeley.edu Recall: How do we Hide I/O Latency? Blocking Interface: Wait

More information

Kernel Modules. Kartik Gopalan

Kernel Modules. Kartik Gopalan Kernel Modules Kartik Gopalan Kernel Modules Allow code to be added to the kernel, dynamically Only those modules that are needed are loaded. Unload when no longer required - frees up memory and other

More information

US x 32 OLED/PLED Segment/Common Driver with Controller For 20x4 Characters.

US x 32 OLED/PLED Segment/Common Driver with Controller For 20x4 Characters. US2066 100 x 32 OLED/PLED Segment/Common Driver with Controller For 20x4 Characters http://wwwwisechipcomtw i 1 General Description WiseChip Semiconductor Inc US2066 US2066 is a single-chip CMOS OLED/PLED

More information

FILE SYSTEMS. Jo, Heeseung

FILE SYSTEMS. Jo, Heeseung FILE SYSTEMS Jo, Heeseung TODAY'S TOPICS File system basics Directory structure File system mounting File sharing Protection 2 BASIC CONCEPTS Requirements for long-term information storage Store a very

More information

LMB202DBC LCD Module User Manual

LMB202DBC LCD Module User Manual LMB202DBC LCD Module User Manual Shenzhen TOPWAY Technology Co., Ltd. Rev. Descriptions Release Date 0.1 Prelimiay release 2005-03-01 URL Document Name LMB202DBC-Manual-Rev0.1.doc Page 1 of 11 Table of

More information

Amazon Elastic Compute Cloud. Amazon Elastic Compute Cloud. Amazon Elastic Compute Cloud 7/12/17. Compute. Instance.

Amazon Elastic Compute Cloud. Amazon Elastic Compute Cloud. Amazon Elastic Compute Cloud 7/12/17. Compute. Instance. Amazon Eastic Compute Coud Compute - The amount of computationa power required to fufi your workoad Instance - Virtua machines - Charged per hour whie running - Virtua Hardware - AMI - Software (appications,

More information

PLC11 Module Programming Manual

PLC11 Module Programming Manual PLC11 Modue Programming Manua Frequency Inverter Series: CFW-11 Version: 1.0X Language: Engish Document: 10000118422 / 00 05/2008 Summary 1 SAFETY INSTRUCTIONS...6 1.1 SAFETY WARNINGS IN THE MANUAL...

More information

MCSE Training Guide: Windows Architecture and Memory

MCSE Training Guide: Windows Architecture and Memory MCSE Training Guide: Windows 95 -- Ch 2 -- Architecture and Memory Page 1 of 13 MCSE Training Guide: Windows 95-2 - Architecture and Memory This chapter wi hep you prepare for the exam by covering the

More information

File Systems Management and Examples

File Systems Management and Examples File Systems Management and Examples Today! Efficiency, performance, recovery! Examples Next! Distributed systems Disk space management! Once decided to store a file as sequence of blocks What s the size

More information

N720 OpenLinux Software User Guide Version 1.2

N720 OpenLinux Software User Guide Version 1.2 N720 Hardware User Guide () N720 OpenLinux Software User Guide Version 1.2 Copyright Copyright 2017 Neoway Technology Co., Ltd. All rights reserved. No part of this document may be reproduced or transmitted

More information

3.Absolute maximum ratings Item Symbol Standard Unit Power voltage VDD-VSS Input voltage VIN VSS - VDD

3.Absolute maximum ratings Item Symbol Standard Unit Power voltage VDD-VSS Input voltage VIN VSS - VDD SPECIFICATIONS OF LCD MODULE 1.Features a) 240x128 dots graphic LCD module b) Built-in controller (T6963C) c) STN yellow-green mode, Transflective, Positive d) View angle: 6:00 o clock e) +5V power supply

More information

File System Code Walkthrough

File System Code Walkthrough File System Code Walkthrough File System An organization of data and metadata on a storage device Data expected to be retained after a program terminates by providing efficient procedures to: store, retrieve,

More information

PMC-DA Channel 16 Bit D/A for PMC Systems REFERENCE MANUAL Version 1.0 June 2001

PMC-DA Channel 16 Bit D/A for PMC Systems REFERENCE MANUAL Version 1.0 June 2001 PMC-DA816 8 Channel 16 Bit D/A for PMC Systems REFERENCE MANUAL 796-10-000-4000 Version 1.0 June 2001 ALPHI TECHNOLOGY CORPORATION 6202 S. Maple Avenue #120 Tempe, AZ 85283 USA Tel: (480) 838-2428 Fax:

More information

CSE120 Principles of Operating Systems. Architecture Support for OS

CSE120 Principles of Operating Systems. Architecture Support for OS CSE120 Principes of Operating Systems Architecture Support for OS Why are you sti here? You shoud run away from my CSE120! 2 CSE 120 Architectura Support Announcement Have you visited the web page? http://cseweb.ucsd.edu/casses/fa18/cse120-a/

More information

I/O OPERATIONS. UNIX Programming 2014 Fall by Euiseong Seo

I/O OPERATIONS. UNIX Programming 2014 Fall by Euiseong Seo I/O OPERATIONS UNIX Programming 2014 Fall by Euiseong Seo Files Files that contain a stream of bytes are called regular files Regular files can be any of followings ASCII text Data Executable code Shell

More information

IP-48DAC channel 16-bit Digital/Analog Converter With memory Industry Pack Module PROGRAMMING MANUAL Version 1.

IP-48DAC channel 16-bit Digital/Analog Converter With memory Industry Pack Module PROGRAMMING MANUAL Version 1. IP-48DAC-16 48-channel 16-bit Digital/Analog Converter With memory Industry Pack Module PROGRAMMING MANUAL 828-10-000-4000 Version 1.0 January 2007 ALPHI TECHNOLOGY CORPORATION 1898 E. Southern Ave Tempe,

More information

Databases and PHP. Accessing databases from PHP

Databases and PHP. Accessing databases from PHP Databases and PHP Accessing databases from PHP PHP & Databases PHP can connect to virtuay any database There are specific functions buit-into PHP to connect with some DB There is aso generic ODBC functions

More information

DISPLAY DEVICES 20T202DA1J (Tentative) Page - 1 / 18 VACUUM FLUORESCENT DISPLAY MODULE

DISPLAY DEVICES 20T202DA1J (Tentative) Page - 1 / 18 VACUUM FLUORESCENT DISPLAY MODULE DISPLAY DEVICES 2T22DAJ (Tentative) Page - / 8 VACUUM FLUORESCENT DISPLAY MODULE . SCOPE DISPLAY DEVICES 2T22DAJ (Tentative) Page - 2 / 8 This specification applies to VFD module (Model No: 2T22DAJ) manufactured

More information

Technical Specification. Third Party Control Protocol. AV Revolution

Technical Specification. Third Party Control Protocol. AV Revolution Technical Specification Third Party Control Protocol AV Revolution Document AM-TS-120308 Version 1.0 Page 1 of 31 DOCUMENT DETAILS Document Title: Technical Specification, Third Party Control Protocol,

More information

JOYSTICK KEYBOARD INSTALLATION & OPERATION MANUAL. (English Version)

JOYSTICK KEYBOARD INSTALLATION & OPERATION MANUAL. (English Version) JOYSTICK KEYBOARD INSTALLATION & OPERATION MANUAL (Engish Version) Thanks very much for choosing our products, pease contact us anytime if you have any questions or requirements. This manua may contain

More information

If the display shift operation is used on a 20 x 4 display, the addressing is shifted as follows:

If the display shift operation is used on a 20 x 4 display, the addressing is shifted as follows: If the display shift operation is used on a 2 x 4 display, the addressing is shifted as follows: Left Shift Column 2 3... 8 9 2 line 2 3 2 3 4 line 2 4 42 43 52 53 54 line 3 5 6 7 26 27 28 line 4 55 56

More information

DXP Digital Communications System 7: :., ; :., Station User s Guide

DXP Digital Communications System 7: :., ; :., Station User s Guide DXP Digita Communications System 7: :., ; :., Industry-Standard Teephone Station User s Guide This user s guide appies to industry-standard singe-ine teephones such as the mode 2500-** when used with the

More information

OPERATING SYSTEMS: Lesson 12: Directories

OPERATING SYSTEMS: Lesson 12: Directories OPERATING SYSTEMS: Lesson 12: Directories Jesús Carretero Pérez David Expósito Singh José Daniel García Sánchez Francisco Javier García Blas Florin Isaila 1 Goals To know the concepts of file and directory

More information

LCD Video Controller. LCD Video Controller. Introduction Safety Precautions Indentifying the Components... 5

LCD Video Controller. LCD Video Controller. Introduction Safety Precautions Indentifying the Components... 5 LCD Video Controer LCD Video Controer Introduction... 3 Safety Precautions... 4 Indentifying the Components... 5 Main Board... 5 Main Board ASIC Features... 6 LVDS Transmitter... 8 Backight Inverter...

More information

SC162A VER2.1 CONTENT. 1. General description

SC162A VER2.1 CONTENT. 1. General description CONTNT 1. General description --------------------------------------------------------------------------3 2. Maximum absolute limit---------------------------------------------------------------------3

More information

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Why Learn to Program?

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Why Learn to Program? Intro to Programming & C++ Unit 1 Sections 1.1-3 and 2.1-10, 2.12-13, 2.15-17 CS 1428 Spring 2018 Ji Seaman 1.1 Why Program? Computer programmabe machine designed to foow instructions Program a set of

More information

ELEC 377 Operating Systems. Week 8 Class 1

ELEC 377 Operating Systems. Week 8 Class 1 ELEC 377 Operating Systems Week 8 Class 1 Last Class Shell Scripting Admin No class next Monday or Tuesday There IS A lab, still: Lab 4 Part 1 Quiz #3 moved to Thursday November 8th Today File Systems

More information

CSE120 Principles of Operating Systems. Prof Yuanyuan (YY) Zhou Lecture 4: Threads

CSE120 Principles of Operating Systems. Prof Yuanyuan (YY) Zhou Lecture 4: Threads CSE120 Principes of Operating Systems Prof Yuanyuan (YY) Zhou Lecture 4: Threads Announcement Project 0 Due Project 1 out Homework 1 due on Thursday Submit it to Gradescope onine 2 Processes Reca that

More information

LCD Module User Manual

LCD Module User Manual LCD Module User Manual Customer : Ordering Code : GC1602D-01XA0 DRAWING NO : m- Approved By Customer: Date: Approved By Checked By Prepared By GEMINI Technology Co, Ltd ADD: RM1521 Investel, 1123-2 Sanbon-Dong,

More information

Dragon12 LCD Displays Hantronix_CLD.PDF data sheet (Dragon12 CD-ROM) Dragon12 LCD Display. The Dragon12 board has a 16 character x 2 line display

Dragon12 LCD Displays Hantronix_CLD.PDF data sheet (Dragon12 CD-ROM) Dragon12 LCD Display. The Dragon12 board has a 16 character x 2 line display Dragon12 LCD Displays Hantronix_CLD.PDF data sheet (Dragon12 CD-ROM) o Using the Dragon12 LCD display Dragon12 LCD Display The Dragon12 board has a 16 character x 2 line display Each character is a 5x7

More information

we are here I/O & Storage Layers Recall: C Low level I/O Recall: C Low Level Operations CS162 Operating Systems and Systems Programming Lecture 18

we are here I/O & Storage Layers Recall: C Low level I/O Recall: C Low Level Operations CS162 Operating Systems and Systems Programming Lecture 18 I/O & Storage Layers CS162 Operating Systems and Systems Programming Lecture 18 Systems April 2 nd, 2018 Profs. Anthony D. Joseph & Jonathan Ragan-Kelley http://cs162.eecs.berkeley.edu Application / Service

More information

I/O OPERATIONS. UNIX Programming 2014 Fall by Euiseong Seo

I/O OPERATIONS. UNIX Programming 2014 Fall by Euiseong Seo I/O OPERATIONS UNIX Programming 2014 Fall by Euiseong Seo Files Files that contain a stream of bytes are called regular files Regular files can be any of followings ASCII text Data Executable code Shell

More information

Self Service Personality Module and Serial Distributed Control Link

Self Service Personality Module and Serial Distributed Control Link Contents Sef Service Personaity Modue and Seria Distributed Contro Link Chapter 2.3 GENERAL DESCRIPTION...2.3-1 SELF SERVICE PERSONALITY MODULE...2.3-1 SDC MASTER NODE...2.3-2 FLEX DISK INTERFACE...2.3-2

More information

Chapter 4. File Systems. Part 1

Chapter 4. File Systems. Part 1 Chapter 4 File Systems Part 1 1 Reading Chapter 4: File Systems Chapter 10: Case Study 1: Linux (& Unix) 2 Long-Term Storage of Information Must store large amounts of data Information must survive the

More information

Virtual File System. Don Porter CSE 306

Virtual File System. Don Porter CSE 306 Virtual File System Don Porter CSE 306 History Early OSes provided a single file system In general, system was pretty tailored to target hardware In the early 80s, people became interested in supporting

More information

File Systems Overview. Jin-Soo Kim ( Computer Systems Laboratory Sungkyunkwan University

File Systems Overview. Jin-Soo Kim ( Computer Systems Laboratory Sungkyunkwan University File Systems Overview Jin-Soo Kim ( jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics File system basics Directory structure File system mounting

More information