Guten Abend zusammen,
ich wage mich jetzt mal an Sieben Segment Anzeigen heran.
Ansteuern möchte ich die mit einem ATMega88 und einem MAX6958.
An den SCL und SDA kommen die richtigen Werte heraus. (Angezeigt mit Oszi).
Aber der Anzeigentreiber gibt kein Signal aus.
Was mach ich falsch?
Als Adresse hab ich aus dem Datenblatt folgende Information:
Code:Slave Address The MAX6958/MAX6959 have a 7-bit-long slave address (Figure 3). The eighth bit following the 7-bit slave address is the R/W bit. Set the R/W bit low for a write command and high for a read command. The MAX6958/MAX6959 are available in one of two possible slave addresses (see Table 2 and Ordering Information). The first 6 bits (MSBs) of the MAX6958/ MAX6959 slave address are always 011100. Slave address bit A0 is internally hardwired to either GND in the MAX695_A_, or V+ in the MAX695_B_. A maximum of two MAX6958/MAX6959 devices can share a bus. Message Format for Writing A write to the MAX6958/MAX6959 comprises the trans- mission of the MAX6958/MAX6959s ’slave address with the R/W bit set to zero, followed by at least 1 byte of information. The first byte of information is the com- mand byte, which determines the register that stores the next byte written to the MAX6958/MAX6959. If a STOP condition is detected after the command byte is received, the MAX6958/MAX6959 take no further action (Figure 6) beyond storing the command byte.
hier der Code:
Code:$regfile = "m88def.dat" $hwstack = 128 $framesize = 128 $swstack = 128 Config Lcdpin = Pin , Db4 = Portc.3 , Db5 = Portc.2 , Db6 = Portd.0 , _ Db7 = Portd.1 , E = Portb.4 , Rs = Portb.5 Config Lcd = 16 * 2 Cursor Off Config Sda = Portc.4 Config Scl = Portc.5 Const Ad = &B011100 Dim X As Byte X = 0 Do For X = 0 To 65 Upperline : Lcd " Os Ram " Lowerline : Lcd " " ; X ; " " I2cstart I2cwbyte Ad I2cwbyte X I2cstop Waitms 1000 Next X Loop End







Zitieren


Lesezeichen