\ 2006-06-28 EW adv_01.fs \ \ i2c_bus connected to r8c \ P1.0 -- SCL \ P1.1 -- SDA \ device PCF8574 (8bit IO) at address $20 rom include SMBus.fs $40 Constant i2c_addr_portexpander \ send Byte x to portexpander : >portexpander ( x -- ) i2c_start \ START i2c_addr_portexpander >i2c \ Adresse schreiben acki2c \ Datenbyte schreiben ackportexpander 1000 ms BEGIN N @ dup invert >portexpander 1+ N ! 1000 ms key? UNTIL ; ram