
|
INFO - FAQ - CC2-Forum - CCPro-Forum |
|
Hallo Henrik, momentan bin ich soweit: define clock port [1] define data port [2] define i byte define schreibe byte '#main gosub start schreibe = &H94 gosub putbyte gosub getack print "data heruntergezogen" gosub stop end #putbyte for i = 7 to 0 step -1 if (schreibe and 1 shl i) = 0 then data = 0 else data = 1 pulse clock next return #getack data = 1 deact data print" auf data runterziehen warten" wait not data pulse clock return #getbyte i2caus = 0 for i = 7 to 0 step -1 if data <> 0 then i2caus = i2caus + 1 shl i pulse clock next #start clock = 1 data = 1 data = 0 clock = 0 return #stop data = 0 deact clock deact data return immerhin! Ich schicke die Adresse vom ds1621 (148dez 94hex - a0+a2 auf Masse, a1 mit 10K auf + 5V) auf den i2c-bus (port 1 und 2), der Chip zieht mir dann auch brav die Datenleitung runter, sprich ich bekomme das ACK. zu mehr bin ich heut nur leider nicht mehr fähig. mal schaun wies morgen weiter geht :) |
| Antwort schreiben |