Skip to content
This repository was archived by the owner on Aug 27, 2021. It is now read-only.
JBtje edited this page Jun 5, 2015 · 4 revisions

Syntax

I2C MASTER <scl pin> <sda pin> [PULLUP]

I2C WRITE <address>, <variable>[, ...]

I2C READ <address>, <variable>[, ...]

I2C WRITE <address>, <variable>[, ...] READ <variable>[, ...]

Description

...

Example

5 //
6 // "Simple I2C to DS3231 RTC chip test"
7 //
20 I2C MASTER P0(4) P0(7)
25 REM "Set address pointer to 0 then read the first byte back - the BCD seconds"
30 I2C WRITE 0XD0, 0X00, READ D
35 REM "And print"
40 PRINT D

Clone this wiki locally