i2cex1.usc
来自「upa代码 调表软件」· USC 代码 · 共 21 行
USC
21 行
// This example writes 256 bytes to 24c01/24c16
Program WriteI2CEx;
var i: integer;
begin
PowerOn;
ConfigI2C( 10, 10000 ); //Clock=10us,Write=10ms
for i := 0 to 255 do
begin
StartI2C;
if WriteByteAI2C( $a0 ) = false then //Control Byte
AddMsgDebug( 'Control Byte Error'+ intToStr(i) )
else if WriteByteAI2C( i ) = false then //Address
AddMsgDebug( 'Address Error')
else if WriteByteAI2C( i ) = false then //Data
AddMsgDebug( 'Data Error');
StopI2C;
WaitWriteTimeI2C;
end;
PowerOff;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?