
|
INFO - FAQ - CC2-Forum - CCPro-Forum |
|
||
|
Hallo Gemeinde, ich habe eine C-Control I Station 2.0 und möchte mir eine Terrariumsteuerung bauen. Nun dazu habe ich mir von CONRAD das Thermometermodul gekauft. Habe auch ein Programm dafür. Leider geht dies nicht so! Wo liegt der Fehler? Ich bekomme keinen Wert angezeigt! Danke im voraus!!!! '-------------------------- '------ I/O PORTS --------- '-------------------------- define LIGHT port[16] '-------------------------- '---- SYSTEM MEMORY ------- '-------------------------- define TEMP as word define TEMPHI as byte define TEMPLO as byte const DS1631=158 'Adresse import "...\LIB\DS1631_GENERIC.BAS" #INIT LIGHT=off '------------------------------------------------------------- DS1631RESET(DS1631) DS1631SET_STATUS(DS1631,1) '------------------------------------------------------------- '----- LOOP READING TEMPERATURE --- '------------------------------------------------------------- #LOOP pause 5 DS1631CONVERT(DS1631) DS1631WAIT_READY(DS1631) TEMP=DS1631GET_TEMP(DS1631) LCD.INIT switchonly LCD.POS 2,1 TEMP=TEMP SHR 7 if (TEMP and 0100h) = 0100h then TEMP=(TEMP or FE00h) LCD.PRINT "TEMP: " & TEMP/2 & "." & (TEMP and 1)*5 & " C " LCD.OFF goto LOOP |
| Antwort schreiben |