Welcome Guest.


What does this code do, what does it mean!

Asked by: Brenda Scott 195 views IT August 22, 2018

What does this code do, what does it mean!

1 Answers

  1. +5Votes  

    #include "reg51.h"//Head file
    extern bit write8574(unsigned char ByteData); //PCF8574 write mode function call declaration
    extern unsigned char read8574(void); //PCF8574 read Schema function call declaration
      unsigned char bd;//Define an unsigned char type variable
      write8574(0xff); //Ready to input
      while (1) / / enter the big loop
    bd=read8574 (); / / call the input command subroutine, the microcontroller reads a byte from 8574, and assigned to the variable bd
     bd>>=4;//bd shifts four bits to the right bd;
     bd|=0xf0;//new bd performs an OR operation with 0xf0 and assigns the result to bd; Position 1, low four hold.
     write8574(bd);//Invoke the output command subroutine, the MCU writes the value of bd from 8574;
    Each sentence gives you a comment, it should be able Do you understand? I don’t understand, then I am
    typing is not easy, such as satisfaction, hope to adopt.

    Question: Hello, this is a VBS script!

    Frances- August 22, 2018 |