Und weiter geht's,
das 3x16 Zeichen Display mit Portexpander PCF8574 will auch noch seinen Bascom Code:
Das Blöde ist nur - es wird am Display nichts angezeigt. Kann mir jemand sagen, why???Code:$regfile = "m16def.dat" $crystal = 15000000 $baud = 9600 $lib "Lcd_i2c.lib" 'I2c driver for the LCD Config I2cdelay = 1 Const Pcf8574_lcd = &H4E 'Defines the address of the I/O expander for LCD Config Scl = Portc.0 'Configure I2C SCL Config Sda = Portc.1 'Configure I2C SDA Dim _lcd_e As Byte 'Needed to control 4 line LCD Enable Interrupts Config Lcd = 16 * 3 'configure lcd screen I2cstart _lcd_e = 128 'Upper half of 4-line display is selected Cls 'clear the LCD display Lcd "Hello world." 'display this at the top line Wait 1 Lowerline 'select the lower line Wait 1 Lcd "Line 2" 'display this at the lower line Wait 1 _lcd_e = 64 'Lower half of 4-line display is selected Lcd "Line 3"







Zitieren

Lesezeichen