User Tools

Site Tools


en:pfw:i2c

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:pfw:i2c [2023-09-05 06:33] – ↷ Links angepasst, weil Seiten im Wiki verschoben wurden 157.90.7.32en:pfw:i2c [2025-12-19 21:56] (current) – [Generic Forth example] willem
Line 172: Line 172:
 80 constant SDA         \ I2C data line 80 constant SDA         \ I2C data line
 SCL SDA or constant IO  \ I2C bus lines SCL SDA or constant IO  \ I2C bus lines
 +
 +variable NACK?
  
 : WAIT          ( -- )  \ Delay of 5 µsec. must be trimmed! : WAIT          ( -- )  \ Delay of 5 µsec. must be trimmed!
Line 194: Line 196:
   sda p1out *bis  sda p1dir *bic  wait   sda p1out *bis  sda p1dir *bic  wait
   scl p1out *bis  scl p1dir *bic  wait   scl p1out *bis  scl p1dir *bic  wait
-  sda p1in bit* nack? ! ;+  sda p1in bit*  nack? ! ;
  
 : BUS!          ( byte -- ) : BUS!          ( byte -- )
en/pfw/i2c.txt · Last modified: 2025-12-19 21:56 by willem