Microcontroladores PIC - emc.ufg.br jwilson/pdf/4_Micro_Parte_4_(PIC)_  · MICROCONTROLADORES PIC •Instruções

  • View
    232

  • Download
    1

Embed Size (px)

Text of Microcontroladores PIC - emc.ufg.br jwilson/pdf/4_Micro_Parte_4_(PIC)_  · MICROCONTROLADORES PIC...

  • MICROCONTROLADORES PIC

    TEORIA

    MSc. Gustavo Souto de S e Souza

  • MICROCONTROLADORES PIC

    Por que PIC?

    Programmable Inferface Controller Controlador de Interface Programvel

    X

    Peripheral Inferface Controller Controlador de Interface Perifricas

    Fabricados pela Microchip Technology

  • MICROCONTROLADORES PIC

    Por que PIC?

    Programmable Inferface Controller Controlador de Interface Programvel

    X

    Peripheral Inferface Controller Controlador de Interface Perifricas

    Fabricados pela Microchip Technology

    PICmicro

  • MICROCONTROLADORES PIC

    Instrues de um PIC podem variar de cerca de 35 instrues(PICs mais simples) para mais de 80 instrues para os PICshigh-end.

    Ciclo de instrues de 4 ciclos de clock.

    Diferentemente do 8051, possui uma arquitetura RISC,apresentando maiores velocidades

    Processam dados de 8 bits, 16 bits ou at mesmo 32 bits.

    Trabalham com frequncia de at 200 MHz.

  • NOP Nenhuma operao (MOVW 0,W)

    OPTION Copia W para o registrador OPTION

    SLEEP Entra em modo de economia de energia

    CLRWDT Reinicia o watchdog timer

    TRIS f Copia W para o registrador de triplo estado (f = 1, 2 or 3)

    MOVWF f dest W

    CLR f,d dest 0, normalmente escrito CLRW ou CLRF f

    SUBWF f,d dest fW (dest f+~W+1)

    DECF f,d dest f1

    IORWF f,d dest f | W, OU inclusivo lgico

    ANDWF f,d dest f & W, AND (E) lgico

    XORWF f,d dest f ^ W, XOR lgico

    ADDWF f,d dest f+W

    MOVF f,d dest f

    COMF f,d dest ~f, complemento bit a bit

    INCF f,d dest f+1

    DECFSZ f,d dest f1, ento pula se 0

    RRF f,d dest CARRY1, rotacionar para a direita atravs do carry

    RLF f,d dest F

  • NOP Nenhuma operao (MOVW 0,W)

    OPTION Copia W para o registrador OPTION

    SLEEP Entra em modo de economia de energia

    CLRWDT Reinicia o watchdog timer

    TRIS f Copia W para o registrador de triplo estado (f = 1, 2 or 3)

    MOVWF f dest W

    CLR f,d dest 0, normalmente escrito CLRW ou CLRF f

    SUBWF f,d dest fW (dest f+~W+1)

    DECF f,d dest f1

    IORWF f,d dest f | W, OU inclusivo lgico

    ANDWF f,d dest f & W, AND (E) lgico

    XORWF f,d dest f ^ W, XOR lgico

    ADDWF f,d dest f+W

    MOVF f,d dest f

    COMF f,d dest ~f, complemento bit a bit

    INCF f,d dest f+1

    DECFSZ f,d dest f1, ento pula se 0

    RRF f,d dest CARRY1, rotacionar para a direita atravs do carry

    RLF f,d dest F

  • NOP AJMP LJMP RR INC INC INC INC INC INC INC INC INC INC INC INC

    JBC ACALL LCALL RRC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC DEC

    JB AJMP RET RL ADD ADD ADD ADD ADD ADD ADD ADD ADD ADD ADD ADD

    JNB ACALL RETI RLC ADDC ADDC ADDC ADDC ADDC ADDC ADDC ADDC ADDC ADDC ADDC ADDC

    JC AJMP ORL ORL ORL ORL ORL ORL ORL ORL ORL ORL ORL ORL ORL ORL

    JNC ACALL ANL ANL ANL ANL ANL ANL ANL ANL ANL ANL ANL ANL ANL ANL

    JZ AJMP XRL XRL XRL XRL XRL XRL XRL XRL XRL XRL XRL XRL XRL XRL

    JNZ ACALL ORL JMP MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV

    SJMP AJMP ANL MOVC DIV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV

    MOV ACALL MOV MOVC SUBB SUBB SUBB SUBB SUBB SUBB SUBB SUBB SUBB SUBB SUBB SUBB

    ORL AJMP MOV INC MUL ? MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV

    ANL ACALL CPL CPL CJNE CJNE CJNE CJNE CJNE CJNE CJNE CJNE CJNE CJNE CJNE CJNE

    PUSH AJMP CLR CLR SWAP XCH XCH XCH XCH XCH XCH XCH XCH XCH XCH XCH

    POP ACALL SETB SETB DA DJNZ XCHD XCHD DJNZ DJNZ DJNZ DJNZ DJNZ DJNZ DJNZ DJNZ

    MOVX AJMP MOVX MOVX CLR MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV

    MOVX ACALL MOVX MOVX CPL MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV

    https://www.win.tue.nl/~aeb/comp/8051/set8051.html#51nophttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51ajmphttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51ljmphttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51rrhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51inchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51inchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51inchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51inchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51inchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51inchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51inchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51inchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51inchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51inchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51inchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51inchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51jbchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51acallhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51lcallhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51rrchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51dechttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51dechttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51dechttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51dechttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51dechttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51dechttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51dechttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51dechttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51dechttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51dechttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51dechttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51dechttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51jbhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51ajmphttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51rethttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51rlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51jnbhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51acallhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51retihttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51rlchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51addchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51jchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51ajmphttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51orlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51orlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51orlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51orlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51orlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51orlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51orlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51orlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51orlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51orlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51orlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51orlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51orlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51orlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51jnchttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51acallhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51anlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51anlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51anlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51anlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51anlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51anlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51anlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51anlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51anlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51anlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51anlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51anlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51anlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51anlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51jzhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51ajmphttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51xrlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51xrlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51xrlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51xrlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51xrlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51xrlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51xrlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51xrlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51xrlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51xrlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html#51xrlhttps://www.win.tue.nl/~aeb/comp/8051/set8051.html