Www.ee.ntou.edu.tw Department of Electrical Engineering, National Taiwan Ocean University LCD Display 3/28/2013 Richard Kuo Assistant Professor.

Slides:



Advertisements
Similar presentations
Computer Graphics Tz-Huan Huang National Taiwan University (Slides are based on Prof. Chen’s)
Advertisements

© 2014 Microsoft Corporation. All rights reserved.
IMPORTANT READ CAREFULLY BEFORE USING THIS PRODUCT LICENSE AGREEMENT AND LIMITED WARRANTY BY INSTALLING OR USING THE SOFTWARE, FILES OR OTHER ELECTRONIC.
 A wiki is a collaborative Web site that combines the collective work of many authors.  A wiki allows anyone to edit, delete or modify content that.
By Hrishikesh Gadre Session II Department of Mechanical Engineering Louisiana State University Engineering Equation Solver Tutorials.
Templates for editing U-M OER Materials 1.License Slide / Disclaimer 2.Title Slide 3.Content Object source information 4.Content Object removal.
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Experiences Teaching Math Using Wikipedia Andrew Knyazev Twenty-Third Annual International Conference on Technology in Collegiate Mathematics Denver, Colorado.
Creating and publishing accessible course materials Practical advise you can replicate.
Standards and Guidelines for Web Page Publishing December 9, 2009.
Department of Electrical Engineering, National Taiwan Ocean University NuMicro Learning Board Introduction 1/29/2015 Richard Kuo Assistant.
FPGA and ASIC Technology Comparison - 1 © 2009 Xilinx, Inc. All Rights Reserved How do I Get Started with PlanAhead?
Licenses A Legal Necessity Copyright © 2015 – Curt Hill.
1/1/20001 Topic >>>> Scan Conversion CSE Computer Graphics.
1 CPE 333 : Computer Graphics มหาวิทยาลัยเทคโนโลยีพระจอม เกล้าธนบุรี Dr. Natasha Dejdumrong.
2/26/2015 Richard Kuo Assistant Professor
© 2011 Delmar, Cengage Learning Chapter 7 Managing a Web Server and Files.
Dr. Dinesh Kumar Assistant Professor Department of ENT, GMC Amritsar.
Conditions and Terms of Use
© 2012 Microsoft Corporation. All rights reserved.
Universal Asynchronous RX/TX
Department of Electrical Engineering, National Taiwan Ocean University NuMicro MCU Learning Board SDK Installation 3/7/2013 Richard.
Department of Electrical Engineering, National Taiwan Ocean University Pulse Width Modulation 4/25/2013 Richard Kuo Assistant Professor.
Department of Electrical Engineering, National Taiwan Ocean University Motor Control 5/2/2013 Richard Kuo Assistant Professor.
Department of Electrical Engineering, National Taiwan Ocean University C Programming 3/14/2013 Richard Kuo Assistant Professor.
NuMicro MCU Learning Board Introduction
Department of Electrical Engineering, National Taiwan Ocean University Analog-to-Digital Converter (ADC) 4/18/2013 Richard Kuo Assistant.
UART: Universal Asynchronous RX/TX
Cortex-M0 MCU Interface and Driver Design - Course Overview
Department of Electrical Engineering, National Taiwan Ocean University Basic Electronics 3/7/2013 Richard Kuo Assistant Professor.
IBIS-AMI and Direction Decisions
IBIS-AMI and Direction Indication February 17, 2015 Michael Mirmak.
Department of Electrical Engineering, National Taiwan Ocean University ARM Cortex-M0 Introduction 3/1/2012 Richard Kuo Assistant Professor.
Proposal Insert Subtitle Here Strictly Private and Confidential Draft December 8, 2014 Risk Management guidance box Guidance when using Smart Transaction.
Department of Electrical Engineering, National Taiwan Ocean University Universal Serial Bus & SD card 5/30/2013 Richard Kuo Assistant.
Department of Electrical Engineering, National Taiwan Ocean University NuMicro MCU Learning Board SDK Installation 1/29/2015 Richard.
Journalism & Media Studies Graduate Student Culminating Work : Steps for Submitting to the Campus Digital Archive at USFSP November 21, 2011 by Carol Hixson.
Department of Electrical Engineering, National Taiwan Ocean University Timer/WatchDog /RTC 4/11/2013 Richard Kuo Assistant Professor.
Click to add text © 2012 IBM Corporation 1 Visualization of View Data Susan L. Cline SWS Visualization.
Adobe Dreamweaver CS3 Revealed CHAPTER SIX: MANAGING A WEB SERVER AND FILES.
Comprehensive Volume, 18 th Edition Chapter 27: Warranties and Other Product Liability Theories.
Serial Peripheral Interface
Oracle Fusion Applications 11gR1 ( ) Functional Overview (L2) Manage Inbound Logistics (L3) Manage Receipts.
Oracle Fusion Applications 11gR1 ( ) Functional Overview (L2) Manage Outbound Logistics (L3) Pick Loads.
Oracle Fusion Applications 11gR1 ( ) Functional Overview (L2) Manage Inbound Logistics (L3) Put Away Loads.
Oracle Fusion Applications 11gR1 ( ) Functional Overview (L2) Manage Inbound Logistics (L3) Manage Supplier Returns.
Responsible Data Use: Copyright and Data Matthew Mayernik National Center for Atmospheric Research Version 1.0 Review Date.
CS 325 Introduction to Computer Graphics 02 / 03 / 2010 Instructor: Michael Eckmann.
Oracle Fusion Applications 11gR1 ( ) Functional Overview (L2) Manage Inbound Logistics (L3) Manage and Disposition Inventory Returns.
Oracle Fusion Applications 11gR1 ( ) Functional Overview (L2) Manage Inbound Logistics (L3) Inspect Material.
General Purpose Input/Output
Evaluating Web Pages Techniques to apply and questions to ask.
-1- Oracle E-Business Suite R12.1 Accounts Receivables Essentials Partner Boot Camp Training Courseware.
CS 101 Introduction to Computing Semester – / II Semester Units – 2 – 0 – 2 – 3 Pre-requisite – None Instructors – Sanjay Dhande, Arya Bhattacharyya,
Oracle E-Business Suite R12.1 Accounts Payables Partner Boot Camp Training Courseware Part VIII – Transaction Taxes in Payables.
INTEL CONFIDENTIAL Intel® Smart Connect Technology Remote Wake with WakeMyPC November 2013 – Revision 1.2 CDI/IBP #:
Oracle Database 11g: PL/SQL Fundamentals Student Guide D49990GC10 Edition 1.0 August 2007 D52092 ®
For Oracle employees and authorized partners only. Do not distribute to third parties. © 2008 Oracle Corporation – Proprietary and Confidential.
Creative Commons terms and definitions By Chelsey Maton.
Lecture 2: 19/4/1435 Graphical algorithms Lecturer/ Kawther Abas CS- 375 Graphics and Human Computer Interaction.
Department of Electrical Engineering, National Taiwan Ocean University I2C Bus 5/16/2013 Richard Kuo Assistant Professor.
Department of Electrical Engineering, National Taiwan Ocean University Controller Area Network bus 5/30/2013 Richard Kuo Assistant Professor.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Oracle Proprietary and Confidential. 1.
Connectivity to bank and sample account structure
Serial Peripheral Interface
1/19/2016 Richard Kuo Assistant Professor
NuMicro MCU New Project Express Creation
Oracle Database 11g: PL/SQL Fundamentals
Managing a Web Server and Files
Presentation transcript:

Department of Electrical Engineering, National Taiwan Ocean University LCD Display 3/28/2013 Richard Kuo Assistant Professor

Department of Electrical Engineering, National Taiwan Ocean University Outline ► LCD Display Introduction 5.NuMicro_LCD.ppt ► Exercise: LCD display - Text mode (Smpl_LCD_Text) ► Exercise: LCD display – Text mode (Smpl_LCD_Keypad) ► Exercise: LCD display – Graphic mode (Smpl_LCD_Bmp) ► Exercise: LCD display – Graphic mode (Smpl_LCD_Graphics)

Department of Electrical Engineering, National Taiwan Ocean University Nu-LB-NUC140 Learning Board 3x3 Keypad LCD

Department of Electrical Engineering, National Taiwan Ocean University 3x3 Keypad schematic

Department of Electrical Engineering, National Taiwan Ocean University LCD schematic

Department of Electrical Engineering, National Taiwan Ocean University Control Pins used for LCD SPI Interface ► GPD8 : SPI1_CS# ► GPD9 : SPI1_CLK ► GPD10 : L_RST# ► GPD11 : SPI1_DO

Department of Electrical Engineering, National Taiwan Ocean University SPI (Serial Peripheral Interface)

Department of Electrical Engineering, National Taiwan Ocean University LCD Driver description ► Ascii_Table.c : ASCII code table for LCD display pattern ► LCD_Driver.c : device driver of on-board LCD –Initial_panel() : initialize LCD panel –WriteData(char) : write data to LCD –SetPACA(PA,CA) : set address (PA, CA) of LCD –Show_Word(x,y,char) : display char on (x,y) –print_lcd(line_no, string) : display one line (using Show_Word(x,y)) –clr_all_panel() : clear data of LCD panel (write 00 to LCD data)

Department of Electrical Engineering, National Taiwan Ocean University LCD_Driver.c – Initial_panel() void Initial_panel(void) { SYSCLK->APBCLK.SPI3_EN =1; //enable spi function SYS->IPRSTC2.SPI3_RST =1; //reset spi function SYS->IPRSTC2.SPI3_RST =0; /* set GPIO to SPI mode*/ SYS->GPDMFP.SPI3_SS0 =1; SYS->GPDMFP.SPI3_CLK =1; //SYS->GPDMFP.SPI3_MISO0 =1; SYS->GPDMFP.SPI3_MOSI0 =1; SPI_PORT[eDRVSPI_PORT3]->CNTRL.CLKP = 1; //CLKP HIGH IDLE SPI_PORT[eDRVSPI_PORT3]->CNTRL.TX_BIT_LEN = 9; //TX LEGTH 9 SPI_PORT[eDRVSPI_PORT3]->CNTRL.TX_NEG = 1; //SET TX_NEG SPI_PORT[eDRVSPI_PORT3]->DIVIDER.DIVIDER=0X03; //SET DIV SPI_PORT[eDRVSPI_PORT3]->SSR.SSR=1; //ENABLE SLAVE SELECT // Set BR SPI_PORT[eDRVSPI_PORT3]->TX[0] =0xEB; SPI_PORT[eDRVSPI_PORT3]->CNTRL.GO_BUSY = 1; while ( SPI_PORT[eDRVSPI_PORT3]->CNTRL.GO_BUSY == 1 ); // Set PM SPI_PORT[eDRVSPI_PORT3]->SSR.SSR=0; SPI_PORT[eDRVSPI_PORT3]->SSR.SSR=1; //outp32(SPI3_Tx0, 0x81); SPI_PORT[eDRVSPI_PORT3]->TX[0] =0x81; SPI_PORT[eDRVSPI_PORT3]->CNTRL.GO_BUSY = 1; while ( SPI_PORT[eDRVSPI_PORT3]->CNTRL.GO_BUSY == 1 ); SPI_PORT[eDRVSPI_PORT3]->TX[0] =0xa0; SPI_PORT[eDRVSPI_PORT3]->CNTRL.GO_BUSY = 1; while ( SPI_PORT[eDRVSPI_PORT3]->CNTRL.GO_BUSY == 1 ); SPI_PORT[eDRVSPI_PORT3]->SSR.SSR=0; SPI_PORT[eDRVSPI_PORT3]->SSR.SSR=1; //outp32(SPI3_Tx0, 0xC0); SPI_PORT[eDRVSPI_PORT3]->TX[0] =0xc0; SPI_PORT[eDRVSPI_PORT3]->CNTRL.GO_BUSY = 1; while ( SPI_PORT[eDRVSPI_PORT3]->CNTRL.GO_BUSY == 1 ); // Set Display Enable SPI_PORT[eDRVSPI_PORT3]->SSR.SSR=0; SPI_PORT[eDRVSPI_PORT3]->SSR.SSR=1; SPI_PORT[eDRVSPI_PORT3]->TX[0] = 0XAF; SPI_PORT[eDRVSPI_PORT3]->CNTRL.GO_BUSY = 1; while ( SPI_PORT[eDRVSPI_PORT3]->CNTRL.GO_BUSY == 1 ); SPI_PORT[eDRVSPI_PORT3]->SSR.SSR=0; }

Department of Electrical Engineering, National Taiwan Ocean University LCD_Driver.c – WriteData(), SetPACA() void SetPACA(unsigned char PA, unsigned char CA) { // Set PA SPI_PORT[eDRVSPI_PORT3]->SSR.SSR=1; SPI_PORT[eDRVSPI_PORT3]->TX[0] = 0xB0 | PA; SPI_PORT[eDRVSPI_PORT3]->CNTRL.GO_BUSY = 1; while ( SPI_PORT[eDRVSPI_PORT3]->CNTRL.GO_BUSY == 1 ); //check data out? // Set CA MSB SPI_PORT[eDRVSPI_PORT3]->SSR.SSR=0; SPI_PORT[eDRVSPI_PORT3]->SSR.SSR=1; SPI_PORT[eDRVSPI_PORT3]->TX[0] =0x10 |(CA>>4)&0xF; SPI_PORT[eDRVSPI_PORT3]->CNTRL.GO_BUSY = 1; while ( SPI_PORT[eDRVSPI_PORT3]->CNTRL.GO_BUSY == 1 ); //check data out? // Set CA LSB SPI_PORT[eDRVSPI_PORT3]->SSR.SSR=0; SPI_PORT[eDRVSPI_PORT3]->SSR.SSR=1; SPI_PORT[eDRVSPI_PORT3]->TX[0] =0x00 | (CA & 0xF); SPI_PORT[eDRVSPI_PORT3]->CNTRL.GO_BUSY = 1; while ( SPI_PORT[eDRVSPI_PORT3]->CNTRL.GO_BUSY == 1 ); //check data out? SPI_PORT[eDRVSPI_PORT3]->SSR.SSR=0; } void WriteData(unsigned char data) { // Write Data SPI_PORT[eDRVSPI_PORT3]->SSR.SSR=1; //chip select SPI_PORT[eDRVSPI_PORT3]->TX[0] =0x100 | data; //write data SPI_PORT[eDRVSPI_PORT3]->CNTRL.GO_BUSY = 1; while ( SPI_PORT[eDRVSPI_PORT3]->CNTRL.GO_BUSY == 1 ); SPI_PORT[eDRVSPI_PORT3]->SSR.SSR=0; }

Department of Electrical Engineering, National Taiwan Ocean University LCD_Driver.c – Show_Word(), print_LCD(), clr_all_panel() void print_lcd(unsigned char line, char *str) { int i=0; do{ Show_Word(line,i,*str++); i++; if(i>15) break; } while(*str!='\0'); } void clr_all_panel(void) { int i=0; /*CLEAR ALL PANNEL*/ SetPACA(0x0, 0x0); for (i = 0; i < 132 *8; i++) { WriteData(0x00); } WriteData(0x0f); } void Show_Word(unsigned char x, unsigned char y,unsigned char ascii_word) { int i=0,k=0; unsigned char temp; k=(ascii_word-32)*16; for(i=0;i<8;i++) { SetPACA((x*2),(129-(y*8)-i)); temp=Ascii[k+i]; WriteData(temp); } for(i=0;i<8;i++) { SetPACA((x*2)+1,(129-(y*8)-i)); temp=Ascii[k+i+8]; WriteData(temp); }

Department of Electrical Engineering, National Taiwan Ocean University Ascii_Table.c unsigned char Ascii[]={ /* */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* ! */ 0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCF,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* " */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x00,0xF0,0x00,0x00,0x00,0x00, /* # */ 0x00,0x00,0x00,0xC0,0x30,0xC0,0x30,0x00,0xC8,0x39,0xCF,0x3 9,0x0F,0x09,0x01,0x00, /* $ */ 0xE0,0x10,0x10,0xF8,0x10,0x10,0x60,0x00,0x30,0x41,0x42,0xFF,0x42,0x44,0x38,0x00, /* % */ 0xC0,0x20,0x10,0xE0,0x20,0xE0,0x18,0x00,0x01,0xC2,0x31,0x0 C,0x73,0x88,0x44,0x38, /* & */ 0x00,0xE0,0x10,0x10,0xE0,0x00,0x00,0x00,0x78,0x85,0x82,0x8 D,0x70,0xA2,0x9E,0x42, /* ' */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,

Department of Electrical Engineering, National Taiwan Ocean University 7-bit ASIC Code

Department of Electrical Engineering, National Taiwan Ocean University Smpl_LCD_Text

Department of Electrical Engineering, National Taiwan Ocean University Smpl_LCD_Text int main(void) { UNLOCKREG(); DrvSYS_Open( ); // set to 48MHz LOCKREG(); Initial_panel(); clr_all_panel(); print_lcd(0, "Smpl_LCD_Text "); print_lcd(1, "Nu-LB-NUC140 "); print_lcd(2, "Test LCD Display"); print_lcd(3, "Nuvoton NuMicro "); }

Department of Electrical Engineering, National Taiwan Ocean University Smpl_LCD_Keypad Display key = 5 press key 5

Department of Electrical Engineering, National Taiwan Ocean University Smpl_LCD_Keypad int32_t main (void) { int8_t number; char TEXT0[16]="Smpl_LCD_keypad"; char TEXT1[16]="Keypad: "; UNLOCKREG(); DrvSYS_Open( ); // set MCU to run at 48MHz LOCKREG(); Initial_panel(); clr_all_panel(); OpenKeyPad(); // initialize 3x3 keypad print_lcd(0,TEXT0); // print title while(1) { number = Scankey(); // scan keypad to input sprintf(TEXT1+8,"%d",number); // print scankey input to string print_lcd(1, TEXT1); // display string on LCD DrvSYS_Delay(5000); // delay }

Department of Electrical Engineering, National Taiwan Ocean University Smpl_LCD_Bmp Display bitmap Note: In order to draw bitmap, Draw_LCD() should be added into LCD_Driver.c Step 1. use Paint to draw a 128x64 bitmap Step 2. use bmp2asm to convert bitmap into hex Step 3. cut and paste hex of bitmap to Smpl_LCD_Bmp.c for displaying the bitmap

Department of Electrical Engineering, National Taiwan Ocean University Draw_LCD in LCD_Driver.c (new) // Draw every pixel of LCD (64x128) void draw_LCD(unsigned char *buffer) { int X_max = 64; int Y_max =128; int x=0; int y=0; for (y=0; y< Y_max; y++) { for (x=0; x< (X_max/8); x++) { SetPACA(x,(129-y)); // set pixel location WriteData(buffer[y*8+x]); // draw (write buffer data into LCD) }

Department of Electrical Engineering, National Taiwan Ocean University Smpl_LCD_Bmp unsigned char DisplayBuf [8*128]; int32_t main (void) { uint8_t x, y; unsigned char Bitmap[128*8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x80, ……} UNLOCKREG(); DrvSYS_Open( ); LOCKREG(); Initial_panel(); clr_all_panel(); // copy Bitmap into Display Buffer for (y=0; y<128; y++) { for (x=0; x<8; x++) { DisplayBuf[y*8+x] = Bitmap[y+x*128]; } draw_LCD(DisplayBuf); // Draw all pixels onto LCD }

Department of Electrical Engineering, National Taiwan Ocean University Smp_LCD_Graphics Render Graphics Note: In order to draw graphics, 2D_Graphic_Driver.c is needed !

Department of Electrical Engineering, National Taiwan Ocean University draw_pixel in 2D_Graphic_Driver.c (new) // draw pixel into Display Buffer void draw_pixel(int x, int y, int color) { if (color==0) { switch (x%8) { case 0: DisplayBuf[(x/8)+y*8] &= 0xFE; break; case 1: DisplayBuf[(x/8)+y*8] &= 0xFD; break; case 2: DisplayBuf[(x/8)+y*8] &= 0xFB; break; case 3: DisplayBuf[(x/8)+y*8] &= 0xF7; break; case 4: DisplayBuf[(x/8)+y*8] &= 0xEF; break; case 5: DisplayBuf[(x/8)+y*8] &= 0xDF; break; case 6: DisplayBuf[(x/8)+y*8] &= 0xBF; break; case 7: DisplayBuf[(x/8)+y*8] &= 0x7F; break; default: break; } } else if (color==1) { switch (x%8) { case 0: DisplayBuf[(x/8)+y*8] |= 0x01; break; case 1: DisplayBuf[(x/8)+y*8] |= 0x02; break; case 2: DisplayBuf[(x/8)+y*8] |= 0x04; break; case 3: DisplayBuf[(x/8)+y*8] |= 0x08; break; case 4: DisplayBuf[(x/8)+y*8] |= 0x10; break; case 5: DisplayBuf[(x/8)+y*8] |= 0x20; break; case 6: DisplayBuf[(x/8)+y*8] |= 0x40; break; case 7: DisplayBuf[(x/8)+y*8] |= 0x80; break; default: break;} }

Department of Electrical Engineering, National Taiwan Ocean University Bresenham Line-Drawing Algorithm ► The Bresenham Line-Drawing Algorithm The Bresenham Line-Drawing Algorithm ► 布雷森漢姆直線演算法 布雷森漢姆直線演算法 ► Line equation : so, y = ► Consider drawing a line on a raster grid where we restrict the allowable slopes of the line to the range. If we further restrict the line-drawing routine so that it always increments x as it plots, it becomes clear that, having plotted a point at (x,y), the routine has a severely limited range of options as to where it may put the next point on the line: ► It may plot the point (x+1,y), or: ► It may plot the point (x+1,y+1).

Department of Electrical Engineering, National Taiwan Ocean University LineBresenham() – draw line void LineBresenham(int x1, int y1, int x2, int y2, int color) { int dy = y2 - y1; int dx = x2 - x1; int stepx, stepy; if (dy < 0) { dy = -dy; stepy = -1; } else { stepy = 1; } if (dx < 0) { dx = -dx; stepx = -1; } else { stepx = 1; } dy <<= 1; // dy is now 2*dy dx <<= 1; // dx is now 2*dx draw_pixel(x1,y1, color); if (dx > dy) { int fraction = dy - (dx >> 1); // same as 2*dy - dx while (x1 != x2) { if (fraction >= 0) { y1 += stepy; fraction -= dx; // same as fraction -= 2*dx } x1 += stepx; fraction += dy; // same as fraction -= 2*dy draw_pixel(x1, y1, color); } } else { int fraction = dx - (dy >> 1); while (y1 != y2) { if (fraction >= 0) { x1 += stepx; fraction -= dy; } y1 += stepy; fraction += dx; draw_pixel(x1, y1, color); }

Department of Electrical Engineering, National Taiwan Ocean University CircleBresenham() – draw circle void CircleBresenham(int xc, int yc, int r, int color) { int x = 0; int y = r; int p = * r; if (!r) return; while (y >= x) // only formulate 1/8 of circle { draw_pixel(xc-x, yc-y, color);//upper left left draw_pixel(xc-y, yc-x, color);//upper upper left draw_pixel(xc+y, yc-x, color);//upper upper right draw_pixel(xc+x, yc-y, color);//upper right right draw_pixel(xc-x, yc+y, color);//lower left left draw_pixel(xc-y, yc+x, color);//lower lower left draw_pixel(xc+y, yc+x, color);//lower lower right draw_pixel(xc+x, yc+y, color);//lower right right if (p < 0) p += 4*x++ + 6; else p += 4*(x++ - y--) + 10; }

Department of Electrical Engineering, National Taiwan Ocean University Smp_LCD_Graphics (draw lines & circles) #include "NUC1xx-LB_002\LCD_Driver.h" #include "2D_Graphic_Driver.h" unsigned char DisplayBuf [8*128]; int32_t main (void) { int color = 1; // 1 = Black, 0 = White UNLOCKREG(); DrvSYS_Open( ); LOCKREG(); Initial_panel(); clr_all_panel(); RectangleDraw(0,0,63,127, color); // draw a rectangle RectangleFill(10,10,20,20, color); // draw a box CircleBresenham(30,22,20,color); // draw a circle CircleMidpoint(30,63,20,color);// draw a circle CircleOptimized(30,105,20,color); // draw a circle LineBresenham(0,20,50,60,color); // draw a line LineOptimized(20,30,40,100,color); // draw a line Triangle(30,90,60,30,50,60,color); // draw a triangle draw_LCD(DisplayBuf);// draw all pixels onto LCD }

Department of Electrical Engineering, National Taiwan Ocean University General Disclaimer The Lecture is strictly used for educational purpose. MAKES NO GUARANTEE OF VALIDITY ► The lecture cannot guarantee the validity of the information found here. The lecture may recently have been changed, vandalized or altered by someone whose opinion does not correspond with the state of knowledge in the relevant fields. Note that most other encyclopedias and reference works also have similar disclaimers.similar disclaimers No formal peer review ► The lecture is not uniformly peer reviewed; while readers may correct errors or engage in casual peer review, they have no legal duty to do so and thus all information read here is without any implied warranty of fitness for any purpose or use whatsoever. Even articles that have been vetted by informal peer review or featured article processes may later have been edited inappropriately, just before you view them.peer reviewfeatured article No contract; limited license ► Please make sure that you understand that the information provided here is being provided freely, and that no kind of agreement or contract is created between you and the owners or users of this site, the owners of the servers upon which it is housed, the individual Wikipedia contributors, any project administrators, sysops or anyone else who is in any way connected with this project or sister projects subject to your claims against them directly. You are being granted a limited license to copy anything from this site; it does not create or imply any contractual or extracontractual liability on the part of Wikipedia or any of its agents, members, organizers or other users. ► There is no agreement or understanding between you and the content provider regarding your use or modification of this information beyond the Creative Commons Attribution-Sharealike 3.0 Unported License (CC-BY-SA) and the GNU Free Documentation License (GFDL);Creative Commons Attribution-Sharealike 3.0 Unported License GNU Free Documentation License

Department of Electrical Engineering, National Taiwan Ocean University General Disclaimer Trademarks ► Any of the trademarks, service marks, collective marks, design rights or similar rights that are mentioned, used or cited in the lectures are the property of their respective owners. Their use here does not imply that you may use them for any purpose other than for the same or a similar informational use as contemplated by the original authors under the CC-BY- SA and GFDL licensing schemes. Unless otherwise stated, we are neither endorsed by nor affiliated with any of the holders of any such rights and as such we cannot grant any rights to use any otherwise protected materials. Your use of any such or similar incorporeal property is at your own risk. Personality rights ► The lecture may portray an identifiable person who is alive or deceased recently. The use of images of living or recently deceased individuals is, in some jurisdictions, restricted by laws pertaining to personality rights, independent from their copyright status. Before using these types of content, please ensure that you have the right to use it under the laws which apply in the circumstances of your intended use. You are solely responsible for ensuring that you do not infringe someone else's personality rights.personality rights