Top Banner

of 11

Mouse Painter

Jun 04, 2018

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/13/2019 Mouse Painter

    1/11

    MOUSE PAINTER

    PRO

    TEAM MEMBERS

    RUDRA PRATAP SUMAN, SHUBHAM GUPTA, AVINASH SHRIVASTAV

    MENTOR

    RISHABH MAHESHWARI

  • 8/13/2019 Mouse Painter

    2/11

    CONTENTS

    INTRODUCTIONINTRODUCTIONINTRODUCTIONINTRODUCTION HARDWARE CONFIGURATIONSHARDWARE CONFIGURATIONSHARDWARE CONFIGURATIONSHARDWARE CONFIGURATIONS PS2 MOUSEPS2 MOUSEPS2 MOUSEPS2 MOUSE MOUSE PROTOCOLMOUSE PROTOCOLMOUSE PROTOCOLMOUSE PROTOCOL GLCD INTERFACINGGLCD INTERFACINGGLCD INTERFACINGGLCD INTERFACING CIRCUIT CONNECTIONCIRCUIT CONNECTIONCIRCUIT CONNECTIONCIRCUIT CONNECTION HOE TO ACCESS EEPROM?HOE TO ACCESS EEPROM?HOE TO ACCESS EEPROM?HOE TO ACCESS EEPROM? PAINTERPAINTERPAINTERPAINTER WINDOWWINDOWWINDOWWINDOW

    .

    .

    1.

    .

    .(,,)

    .

    .

    .

    .

    .

    .

    1.A 32

    2. 12864 M G LCD 0108 3.P

    4.P

    5.PS 2

  • 8/13/2019 Mouse Painter

    3/11

    1. : F 12864 M G LCD 0108 .

    E LCD .I

    .

    2.2 :T .

    T PS/2 : T 5 DIN 6 DIN. B

    () ; .

    T :

    5PIN DIN(AT/T)

    M F

    1 C

    2 D

    3 N I

    4 G

    5 V (+5V)

  • 8/13/2019 Mouse Painter

    4/11

    6 MDIN

    M

    DETAILS:

    1 D

    2 N I

    3 G

    4 V (+5V)

    5 C

    6 N I

    IMPLEME

    :

    MCU

    1 ,8

    T

    1) B C

    2) B D

    3) R

    4) W

    5) S/

    6) W

    7) W

    (PS/2) :

    F

    TATION

    M

    11 :

    ,1

    PS2

    :

    100

    .

    C .

    C

    D

    C .

    C .

    . A

    .

    . T

    .

    .

    .T

    .T

    .M

    .D

    .D

  • 8/13/2019 Mouse Painter

    5/11

    8) R 57

    9) R D .

    10) W D .

    11) W C .

    12) W D C

    A (ACK) .

    DATA BYTES :

    O 3 2 . T

    :

    B 1 , (0

    1 ) 255. B 2 3

    . T

    . T 4 1 .T 9 2 .. 5

    6

    . R 8

    2

    ( ) 3

    ( ).

    M .T :

    P R:

    M: AA S

    M: 00 M ID

    H: FF R

    M: FA A

    M: AA S

    M: 00 M ID

    H: FF R

    M: FA A

    M: AA S

    M: 00 M ID

  • 8/13/2019 Mouse Painter

    6/11

    H: FF R

    M: FA A

    M: AA S

    M: 00 M ID

    H: F2 R D T

    M: FA A

    M: 00 M ID

    H: E8 S

    M: FA A

    H: 03 8 C/

    M: FA A

    H: E6 S S 1:1

    M: FA A

    H: F3 S S R

    M: FA A

    H: 28 40

    M: FA A

    H: F4 E

    M: FA A

    I ...

    B .

    T .

    W GLCD .

    12864GLCD. 12864 .

    T 20 GLCD; S GLCD PIN .

    T :

    W GLCD A32, PORT . T GLCD , GLCD A W PORT GLCD.

    W PORTA PORTC. A W

    GLCD.

  • 8/13/2019 Mouse Painter

    7/11

    .

    A , C, V . T GLCD .

    P 17 PIN 3 GLCD ,

  • 8/13/2019 Mouse Painter

    8/11

    T AVRLC, WAVR, EEPROM . B

    , :

    #

    A , , .. T

    EEPROM : , . E , .

    T :

    8 ( 8 *)

    (8 *, 8 )

    16 ( 16 *)

    (16 *, 16 )

    ( *, *, )

    ( *, *, )

    I AVRGCC, ( ).

    T , EEPROM , ' 46. O

    :

    #

    ()

    8 BOD;

    BOD = ((8*)46);

    T 46 EEPROM "BOD". H ?

    F, , I' ' :

    8 BOD;

    N, , EEPROM . W'

    46, 46 .

  • 8/13/2019 Mouse Painter

    9/11

    N ( ), "8*"

    "16*" .

    B .

    . 12864 8

    . =

    1

    0

    S 0 . 8 8 .

    8 1 .

    PEN: B .

    ERASER: A , .

    PAINT BUCKET:T .

    . I ""

    , G M . W

    , .

  • 8/13/2019 Mouse Painter

    10/11

    The algorithm

    The flood fill algorithm takes three parameters: a start node. The algorithm looks for all nodes in the array which areconnected to the start node by a path of the target color, and changes them to the replacement color. There are many ways inwhich the flood-fill algorithm can be structured, but they all make use of a queue or stack data structure, explicitly orimplicitly. One implicitly stack-based (recursive) flood-fill implementation (for a two-dimensional array) goes as follows:

    Flood-fill(node, target-color, replacement-color):

    1. If the color of nodeis not equal to target-color, return.2. Set the color of nodeto replacement-color.

    3. Perform Flood-fill(one step to the west of node, target-color, replacement-

    color).

    Perform Flood-fill(one step to the east of node, target-color, replacement-

    color).

    Perform Flood-fill(one step to the north of node, target-color, replacement-

    color).

    Perform Flood-fill(one step to the south of node, target-color, replacement-

    color).

    4. Return.

    This is what I have used.

    : T .

    SHAPES: , . I .

    SPRA:A . F () .

    SAVE: I 1664 . I .

    http://en.wikipedia.org/wiki/Flood_fillhttp://en.wikipedia.org/wiki/Flood_fillhttp://www.computer-engineering.org/ps2protocol/http://www.computer-engineering.org/ps2protocol/http://www.computer-engineering.org/ps2mouse/http://www.computer-engineering.org/ps2mouse/http://courses.cit.cornell.edu/ee476/FinalProjects/s2004/jcc72/index.htmlhttp://www.computer-engineering.org/ps2mouse/http://www.computer-engineering.org/ps2protocol/http://en.wikipedia.org/wiki/Flood_fill
  • 8/13/2019 Mouse Painter

    11/11