FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    Basic programming summary of the PIC microcontroller, beginners must see

     

    "It is suitable for 3epic test board. The sales service of Aijing products is not good. Many C programs are written by ourselves, but it is good to refer to the assembler. ;------------------------------------------------------------------------------------------ ; Single and double bit transformation display experiment reference program note: please execute this program in one step (Experiment 1-1. ASM) ;------------------------------------------------------------------------------------------ STATUS EQU03H; Special function register definition TRISD EQU88H; Special function register definition PORTD EQU08H; Special function register definition TRISE EQU89H; Special function register definition PORTE EQU09H; Special function register definition ORG0000H; Reset address NOP; MPLAB specific statement STBSFSTATUS,5; Selector 1 CLRFTRISD; Portd set to output CLRFTRISE; Port set to output BCFSTATUS,5; Select volume 0 BCF PORTE,0; Re0 reset, strobe LED LOOPMOVLWB‘10101010’ MOVWFPORTD; Sets the value of portd MOVLWB‘01010101’ MOVWFPORTD; Set the portd value again GOTOLOOP; Cyclic operation ;------------------------------------------------------------------------------------------ END ;------------------------------------------------------------------------------------------ Reference address: http://www.21ic.com/app/mcu/201810/786583.htm ;------------------------------------------------------------------------------------------ ; Software delay automatic counting experiment reference program (Experiment 1-2. ASM) ;------------------------------------------------------------------------------------------ STATUS EQU03H ; Special function register definition TRISD EQU88H; Special function register definition PORTDEQU08H; Special function register definition TRISE EQU89H; Special function register definition PORTEEQU09H; Special function register definition ORG0000H; Reset address NOP; MPLAB specific statement STBSFSTATUS,5; Selector 1 CLRF TRISD; Portd set to output CLRF TRISE; Port set to output BCFSTATUS,5; Select volume 0 CLRF PORTD; Portd reset BCF PORTE,0; Re0 reset, strobe LED LOOPCALL DELAY1S; Call 1s delay program INCF PORTD; PORTD+1 GOTO LOOP; Cyclic operation ;------------------------------------------------------------------------------------------ ; 1 second delay subroutine reference program ;------------------------------------------------------------------------------------------ DELAY1S MOVLW 06H; External circulation constant MOVWF 20H; Outer loop register LOP0MOVLW 0EBH; Medium cycle constant MOVWF 21H; Medium cycle register LOP1MOVLW 0ECH; Internal circulation constant MOVWF 22H; Inner loop register LOP2DECFSZ 22H; Inner loop register decrement GOTO LOP2; Continue internal circulation DECFSZ 21H; Cyclic register decrement GOTO LOP1; Continue the middle cycle DECFSZ 20H; Outer loop register decrement GOTO LOP0; Continue external circulation RETURN; return ;------------------------------------------------------------------------------------------ END ;------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------ ; Neon display experiment reference procedure (Experiment 1-3. ASM) ;------------------------------------------------------------------------------------------ STATUS EQU03H; Special function register definition TRISD EQU88H; Special function register definition PORTDEQU08H; Special function register definition TRISE EQU89H; Special function register definition PORTEEQU09H; Special function register definition PCLEQU02H; Special function register definition COUNTEREQU30H; Custom variable ORG0000H; Reset address NOP; MPLAB specific statement STBSFSTATUS,5; Select data memory body 1 CLRF TRISD; Define Rd port as output CLRF TRISE; Port set to output BCFSTATUS,5; Select data storage body 0 CLRF PORTD; Portd reset BCF PORTE,0; Re0 reset, strobe LED POPCLRF COUNTER; Custom variable counter 0 LOOPMOVF COUNTER,0; Take out the value of variable counter CALL TABLE; Look up table corresponding data MOVWF PORTD; Output from portd CALL DELAY50MS; Call 50ms delay INCF COUNTER,1; Cyclic variable increment MOVF COUNTER,0; Get the current counter variable value SUBLW .20; Has 20 data been taken out BTFSC STATUS,2; Check Z flag bit GOTO POP; Z = 1, indicating the end of a cycle, and counter resets again GOTO LOOP; Return to continue ;------------------------------------------------------------------------------------------ ; Data sheet content ;------------------------------------------------------------------------------------------ TABLE ADDWFPCL,1; Review offset RETLWB‘00011000’; The 0th display state RETLWB‘00111100’ ; The first display state RETLWB‘01111110’ ; The second display state RETLWB‘11111111’ ; The third display state RETLWB‘01111110’ ; The fourth display state RETLWB‘00111100’; 5th display state RETLWB‘00011000’ ; 6th display status RETLWB‘00000000’; 7th display state RETLWB‘10000001’ ; 8th display state RETLWB‘11000011’; 9th display status RETLWB‘11100111’ ; 10th display state RETLWB‘11111111’; 11th display state RETLWB‘11100111’ ; 12th display state RETLWB‘11000011’; 13th display state RETLWB‘10000001’ ; 14th display state RETLWB‘00000000’; 15th display state RETLWB‘11111111’; 16th display state RETLWB‘00000000’; 17th display state RETLWB‘11111111’; 18th display state RETLWB‘00000000’; 19th display state ;------------------------------------------------------------------------------------------ ; 50ms software delay subroutine ;------------------------------------------------------------------------------------------ DELAY50MS MOVLW 41H; External circulation constant MOVWF 20H; Outer loop register LOOP1 MOVLW 0FFH; Internal circulation constant MOVWF 21H; Inner loop register LOOP2DECFSZ 21H; Inner loop register decrement GOTO LOOP2 ; Continue internal circulation DECFSZ 20H; Outer loop register decrement GOTO LOOP1 ; Continue external circulation RETURN; return ;------------------------------------------------------------------------------------------ END ;------------------------------------------------------------------------------------------ ;------------------------------------------------------------------------------------------ ; Dynamic digital automatic counting and display experiment reference program (Experiment 2-1. ASM) ;------------------------------------------------------------------------------------------ LISTP=16F877A INCLUDE“P16F877A.INC”; Header file settings ;------------------------------------------------------------------------------------------ ; Definition of BAW, SHW, gew and counter variables COUNTEREQU71H; The number of variables that can be used for a loop QWEQU7CH; Can be used for decimal thousand variables BAWEQU7DH; Can be used for decimal hundred variables SHWEQU7EH; Can be used for decimal ten digit variables GEWEQU7FH; Can be used for decimal bit variables ;------------------------------------------------------------------------------------------ ORG0000H; Reset address NOP; MPLAB specific statement

     

     

     

     

    List all Question

    Nickname

    Email

    Questions

    Our other product:

    Professional FM Radio Station Equipment Package

     



     

    Hotel IPTV Solution

     


      Enter email  to get a surprise

      fmuser.org

      es.fmuser.org
      it.fmuser.org
      fr.fmuser.org
      de.fmuser.org
      af.fmuser.org ->Afrikaans
      sq.fmuser.org ->Albanian
      ar.fmuser.org ->Arabic
      hy.fmuser.org ->Armenian
      az.fmuser.org ->Azerbaijani
      eu.fmuser.org ->Basque
      be.fmuser.org ->Belarusian
      bg.fmuser.org ->Bulgarian
      ca.fmuser.org ->Catalan
      zh-CN.fmuser.org ->Chinese (Simplified)
      zh-TW.fmuser.org ->Chinese (Traditional)
      hr.fmuser.org ->Croatian
      cs.fmuser.org ->Czech
      da.fmuser.org ->Danish
      nl.fmuser.org ->Dutch
      et.fmuser.org ->Estonian
      tl.fmuser.org ->Filipino
      fi.fmuser.org ->Finnish
      fr.fmuser.org ->French
      gl.fmuser.org ->Galician
      ka.fmuser.org ->Georgian
      de.fmuser.org ->German
      el.fmuser.org ->Greek
      ht.fmuser.org ->Haitian Creole
      iw.fmuser.org ->Hebrew
      hi.fmuser.org ->Hindi
      hu.fmuser.org ->Hungarian
      is.fmuser.org ->Icelandic
      id.fmuser.org ->Indonesian
      ga.fmuser.org ->Irish
      it.fmuser.org ->Italian
      ja.fmuser.org ->Japanese
      ko.fmuser.org ->Korean
      lv.fmuser.org ->Latvian
      lt.fmuser.org ->Lithuanian
      mk.fmuser.org ->Macedonian
      ms.fmuser.org ->Malay
      mt.fmuser.org ->Maltese
      no.fmuser.org ->Norwegian
      fa.fmuser.org ->Persian
      pl.fmuser.org ->Polish
      pt.fmuser.org ->Portuguese
      ro.fmuser.org ->Romanian
      ru.fmuser.org ->Russian
      sr.fmuser.org ->Serbian
      sk.fmuser.org ->Slovak
      sl.fmuser.org ->Slovenian
      es.fmuser.org ->Spanish
      sw.fmuser.org ->Swahili
      sv.fmuser.org ->Swedish
      th.fmuser.org ->Thai
      tr.fmuser.org ->Turkish
      uk.fmuser.org ->Ukrainian
      ur.fmuser.org ->Urdu
      vi.fmuser.org ->Vietnamese
      cy.fmuser.org ->Welsh
      yi.fmuser.org ->Yiddish

       
  •  

    FMUSER Wirless Transmit Video And Audio More Easier !

  • Contact

    Address:
    No.305 Room HuiLan Building No.273 Huanpu Road Guangzhou China 510620

    E-mail:
    [email protected]

    Tel / WhatApps:
    +8618078869184

  • Categories

  • Newsletter

    FIRST OR FULL NAME

    E-mail

  • paypal solution  Western UnionBank OF China
    E-mail:[email protected]   WhatsApp:+8618078869184   Skype:sky198710021 Chat with me
    Copyright 2006-2020 Powered By www.fmuser.org

    Contact Us