
|
INFO - FAQ - CC2-Forum - CCPro-Forum |
|
ich benutze schon einen systreiber fürs lcd darum in basic. irgendwie fehlt ein reset, ich muß jedesmal vor beginn erst den stecker ziehen mfg michael > > > Hallo zusammen, > > > > ich bin schon längere Zeit an diesem Problem. > > c-control unit 1 mit applicationboard und LED-7 Segment Anzeige > > das Programm läuft eine Zeitlang dann kommen falsche daten auf der Anzeige. > > Sieht jemand den Fehler? > > die Anzeige hängt an 3 digitalen Ausgängen > > > > define i byte[1] > > define j byte[2] > > define out byte[3] > > > > define data port[1] > > define enable port[2] > > define clock port[3] > > > > > > data = 0 > > clock = 0 > > enable = 0 > > hour = 22 > > minute = 35 > > second = 11 > > > > > > #loop > > if second = 0 then gosub zeit > > loop > > > > #zeit > > out = second mod 10 > > gosub daten > > gosub LED_output > > out = second / 10 > > gosub daten > > gosub LED_output > > out = minute mod 10 > > gosub daten > > gosub LED_output > > out = minute / 10 > > gosub daten > > gosub LED_output > > out = hour mod 10 > > gosub daten > > gosub LED_output > > out = hour / 10 > > gosub daten > > gosub LED_output > > return > > > > #daten > > if out = 0 then out =130 > > if out = 1 then out =207 > > if out = 2 then out =145 > > if out = 3 then out =133 > > if out = 4 then out =204 > > if out = 5 then out =164 > > if out = 6 then out =160 > > if out = 7 then out =143 > > if out = 8 then out =128 > > if out = 9 then out =132 > > return > > > > #LED_output > > 'enable = ON > > for i = 1 to 8 > > gosub LED_shift : pause 35 > > next > > enable = OFF > > data = 0 > > clock = 0 > > enable = 0 > > return > > > > #LED_shift > > data = out and 1 > > print "BIT",i," ",data > > out = out shr 1 > > pulse clock > > return > > > > > > > > > |
| Antwort schreiben |