FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    24C01-24C256 read and write operation C language program

     

    24C01--24C256 Read and write operation C language program #pragma ot (6, SIZE) #i nclude M2416) {IICSendByte ((unsigned char) (Address>>8)); if (IICRecAck ()) conTInue;} IICSendByte ((unsigned char) Address); if (IICRecAck ()) continue;! if ((ControlByte & 0x01 )) {j = ByteQuantity; errorflag = 0; // ******** clr errorflag while (j--) {IICSendByte (* DataBuff ++); if (IICRecAck ()) continue;! errorflag = 1; break ;} if (errorflag == 1) continue; break;} else {IICStart (); IICSendByte (ControlByte); if (IICRecAck ()) continue; while (- ByteQuantity) {* DataBuff ++ = IICReceiveByte (); IICAck ();} * DataBuff = IICReceiveByte (); // read last byte data IICNoAck (); errorflag = 0; break;}} IICStop (); if ( ! (ControlByte & 0x01)) {Delay (255); Delay (255); Delay (255); Delay (255);} return (errorflag);} / ************************************************************ The following is a routine operation on IIC bus *** // ***************** start bus ********************** / void IICStart (void) {SCL = 0; // SDA = 1; SCL = 1; _nop _(); _nop_( ); _nop _(); SDA = 0; _nop _(); _nop _(); _nop _(); _nop _(); SCL = 0; SDA = 1; //} / IIC bus stop ******************************************************** **************** / void IICStop (void) {SCL = 0; SDA = 0; SCL = 1; _nop _(); _nop _(); _nop _(); SDA = 1; _nop _(); _nop _(); _nop _(); SCL = 0;} / Acknowledge bit check ************** ******************* / bit IICRecAck (void) {SCL = 0; SDA = 1; SCL = 1; _nop _(); _nop _(); _nop _(); _nop _(); CY = SDA; // because the return value is always placed CY the SCL = 0; return (CY);} / IIC bus for generating a response *************** ******************* / void IICACK (void) {SDA = 0 ; SCL = 1; _nop _(); _nop _(); _nop _(); _nop _(); SCL = 0; _nop _(); SDA = 1;} / IIC bus ******************************************************** not generate an acknowledge *************** / void IICNoAck (void) {SDA = 1; SCL = 1; _nop _(); _nop _(); _nop _(); _nop _(); SCL = 0;} / ******************* write data to the IIC bus ********************* / void IICSendByte ( unsigned char sendbyte) {unsigned char data j = 8; for (; j>0; j--) {SCL = 0; sendbyte<.1881 = 1;. // C51 matter how to achieve this operation, will always CY = sendbyte ^ 7; SDA = CY; SCL = 1;} SCL = 0;} / ********************************************************** read data subprogram ********** / unsigned char IICReceiveByte (void) {register from the IIC bus receivebyte, i = 8; SCL = 0; while (i--) {SCL = 1; receivebyte = (receivebyte<<1) | SDA; SCL = 0;} return (receivebyte);} / *************** a simple delay program ************************ / void Delay (unsigned char DelayCount) {while (DelayCount--);} Chinese data 24C256, 24C256 Chinese data, technology zone Alexa voice service software extension STM32Cube Combined with DNN API drivers to drive future neural network applications Four integration design for high-end mobile communications and automotive markets A frame capture open source graphic debugger application design The latest security technology that is about to be standard configuration: Rear view camera system

     

     

     

     

    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