Skip to content
ozarchie edited this page Aug 31, 2016 · 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

Enables access to standard I2C peripherals.

Examples

100 DIM T(50)
110 T(20) = 80
200 I2C MASTER P1(1) P1(2) PULLUP
210 I2C WRITE 0X58, 0X00, T(20)
220 I2C WRITE 0X58, 0X80, T(20)
230 DELAY 500