FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    PIC microcontroller simulation IIC read and write programming

     

    I2C bus program THISEEPROMREAD & WRITEPROGRAMM ThespecialStoreramunit WEQU0 F0Equ0 Rtccequ1 PCEQU2 F2equ2 F3equ3 F4equ4 Raequ5 Rbequ6 RCEQU7 PCLATHEQU0AH INTCONEQ0BH Pir1equ0ch TMR1LEQU0EH TMR1HEQU0FH T1CONEQU10H TMR2EQU11H T2CONEQU12H SSPBUFEQU13H SSPCONEQU14H CCPR1LEQU15H CCPR1HEQU16H CCPCONEQU17H Adcon0equ1fh ; ; INTHEBANK1 Trisaequ85h Trisbequ86h Triscequ87h PCONEQU8EH PIE1EQU8CH PR2EQU92H SSPADDEQU93H SSPStatequ94h ADCON1EQU9FH ; ; ------------------------------------------------- ------- ; thegenralstoreramunit ; TEMP6EQU76H TEMP7EQU77H ; EEPCTREQU6DH; EEPROMCONTROLWORDSBUFFER EEPADDREQU6EH; EEPROMADDRESSBUFFER EEPDATAEQU6FH; EEPROMDATABUFFER ; ; ------------------------------------------------- ------- ; thebitsoframunit SCLEQU3; RC SDAEQU4; RC ; PDEQU3; Status TOEQU4; Status ; RBifequ0; intcon Intifequ1; intcon rtifequ2; intcon Rbieequ3; intcon Intieequ4; intcon Rtieequ5; intcon Adieequ6; intcon Gieequ7; intcon ; ; ------------------------------------------------- --------- ; Thecontact SDA_INEQU10H SDA_OUTEQU00H ; ; ------------------------------------------------- --------- ORG000H Gotomain_program ; ------------------------------------------------- ------- ; THESON-ProgramArea ; ------------------------------------------------- ------- ORG005H ; ------------------------------------------------- ------- Make_s BSFRC, SDA BSFF3, 5 ; BSFRC, SDA MOVLWSDA_OUT Movwftrisc BCFF3, 5 NOP ACK_CHECK BSFF3, 5 ; BCFRC, SDA MOVLWSDA_IN Movwftrisc BCFF3, 5 NOP M_Start BSFRC, SCL NOP BTFSSRC, SDA gotomake_s m_start0 BSFRC, SCL BCFRC, SDA BSFF3, 5 ; BSFRC, SDA MOVLWSDA_OUT Movwftrisc BCFF3, 5 MOVLW10100000B BTFSCSIGN, READ_B MOVLW10100001B MOVWF6DH MOVLW6DH Movwff4 W_byte BSFF3, 5 ; BSFRC, SDA MOVLWSDA_OUT Movwftrisc BCFF3, 5 MOVLW08H Movwftemp2 Bit_loop NOP RLFF0 BCFRC, SCL BTFSSF3, 0 goto ^ + 3 BSFRC, SDA Goto ^ + 2 BCFRC, SDA NOP BSFRC, SCL DecfszTemp2 gotobit_loop NOP BCFRC, SCL BSFF3, 5 ; BCFRC, SDA MOVLWSDA_IN Movwftrisc BCFF3, 5 BSFRC, SCL NOP BTFSCRC, SDA Gotom_start0 BCFRC, SCL Return ; W_STOP M_Stop BCFRC, SDA BSFF3, 5 ; BSFRC, SDA MOVLWSDA_OUT Movwftrisc BCFF3, 5 NOP BSFRC, SCL NOP BSFRC, SDA NOP BCFRC, SCL Return ; RD_BYTES NOP RNXTB BCFRC, SCL BSFF3, 5 ; BCFRC, SDA MOVLWSDA_IN Movwftrisc BCFF3, 5 MOVLW08H Movwftemp2 RNX BCFRC, SCL NOP BCFF3, 0 BTFSCRC, SDA BSFF3, 0 RLFF0 BSFRC, SCL NOP DecfszTemp2 Gotornx Incff4, 1 BSFF3, 5 ; BSFRC, SDA MOVLWSDA_OUT Movwftrisc BCFF3, 5 BCFRC, SCL DecfszTemp4 gotot_ackg R_Stop Gotom_stop T_ackg BCFRC, SDA NOP BSFRC, SCL NOP GotornXTB ; ----------------------------- DELAY_1MS MOVLW.1 Movwftemp6 DELAY_PUBLIC MOVLW.223 Movwftemp7 PUBLIC_2 Clrwdt Decfsztemp7, 1 Gotopublic_2 Decfsztemp6, 1 Gotodelay_public Return ; ----------------------------- ; ----------------------------- ; ThemainProgramArea ; ----------------------------- Main_program BSFF3, 5 MOVLW0FH Movwf81h MOVLWSDA_IN Movwftrisc BCFF3, 5; Bank0 RESET_DELAY MOVLW20H Movwff4 NEXT CLRFF0 Incff4, 1 MOVLW80H; CLR20H - 7FHRAM CLRZ Xorwff4, w Skpz Gotonext ; ----------------------- CLRFintcon BSFF3, 5 MOVLW0FH Movwf81h BCFF3, 5; Bank0 ; ; --------------------------- Read_eeprom_repair BCFRC, Eneep CallDelay_1ms ; Callack_check MOVFADDRESS, 0 Movwf6eh Incff4 Callw_byte Bsfsign, read_b Callack_check BCFSIGN, READ_B MOVLW20H Movwff4 MOVLW.8 Movwftemp4 Callrd_bytes NOP NOP NOP NOP CallDelay_1ms BSFRC, Eneep ; Write_eeprom_repair BCFRC, Eneep CallDelay_1ms ; Callack_check MOVFADDRESS, 0 Movwf6eh Incff4 Callw_byte MOVLW40H Movwff4 MOVLW.8 Movwftemp4 Write_option Callw_byte Incff4, 1 DecfszTemp4 Gotowrite_option Callw_stop NOP NOP NOP NOP CallDelay_1ms BSFRC, Eneep ; loop gotoloop End, read full text

     

     

     

     

    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