I'm working on a piece of code I found in another thread about a DS3231 RTC.
Unfortunately, the used I2CWRITE command has an optional label to jump to.
I don't get what the label is there for.
The manual says If the optional Label is included, this label will be jumped to if an acknowledge is not received from the I2C device.
Okay, but, what does it mean?
Code:
.....
DS3231:
GetTime:
RtcI2cNack = 0
I2CRead RTC_SDA,RTC_SCL,$D0,RtcTimeReg,[RtcMin,RtcHour],I2CNACK
I2CNACK:
RtcI2cNack = 1
RETURN
.....
Bookmarks