'************************************************************************** 'Compiler : BASCOM-AVR (Vers. 2.0.7.7) 'Hardware : Versuchsplatine (Holz) LCD 8x2 u. I2C_LCD von Pollin 'Chip type : ATMega48V (8%) 'Programm : I2C_LCD_1 > Hintergrund-Beleuchtung blinkt '************************************************************************** $regfile = "m48def.dat" $crystal = 4000000 'Quarz (111101) DivideClock = disabled '$lib "i2c_twi.lbx" '$lib "Pollin_Lcd_i2c.lib" '----- Config I2C -------------------------------------------------------------- Config SDA = PortD.2 'PortD.2 = serial data (SDA) gelb Config SCL = PortD.3 'PortD.3 = serial data (SCL) grün I2Cinit 'Ini the I2C SCL and SDA pins 'Adresse des PCF Const PCF8574w = 64 Dim Bitmuster As Byte Bitmuster = &B10000000 'Bit7 ist Hintergrundbeleuchtung I2cinit 'I˛C initialisieren Do '----------Begin----------- I2cstart 'TWI Startkondition I2cwbyte PCF8574w I2cwbyte Bitmuster I2cstop Wait 2 I2cstart 'TWI Startkondition I2cwbyte PCF8574w I2cwbyte 0 I2cstop Wait 2 Loop '----------Ende------------ End