سلام.کسی هستش درمورد برنامه زیر که وظیفه اش نوشتن و خوندن از حافظه EEPROM است توضیح بده
اخه درمورد I2C خوندم ولی باز متوجه نشدم
Example
-------- Writing and reading a byte to an EEPROM 2404 -----------------
DIM a As Byte
Const adresW = 174 'write of 2404
Const adresR = 175 'read address of 2404
I2CSTART
I2CWBYTE adresW
I2CWBYTE 1
I2CWBYTE 3
I2CSTOP
WaitMS 10
----------------now read the value back into the var a -------------------
I2CSTART
I2CWBYTE adresW
I2CWBYTE 1
I2CSTART
I2CWBYTE adresR
I2CRBYTE a,nack
I2CSTOP
PRINT a
END
اخه درمورد I2C خوندم ولی باز متوجه نشدم
Example
-------- Writing and reading a byte to an EEPROM 2404 -----------------
DIM a As Byte
Const adresW = 174 'write of 2404
Const adresR = 175 'read address of 2404
I2CSTART
I2CWBYTE adresW
I2CWBYTE 1
I2CWBYTE 3
I2CSTOP
WaitMS 10
----------------now read the value back into the var a -------------------
I2CSTART
I2CWBYTE adresW
I2CWBYTE 1
I2CSTART
I2CWBYTE adresR
I2CRBYTE a,nack
I2CSTOP
PRINT a
END
دیدگاه