![]() ![]() INFO - FAQ - CC2-Forum - CCPro-Forum |
|
Hallo ich habe das jetzt einigermassen zum laufen gebracht ;-) Siehe Code. Nun habe ich noch das Problem, dass ich gerne ganze Werte ausgeben möchte zb. 15999 in meiner Routine gebe ich ja einzelne stellen aus. Ich möchte ein Function in der ich den Wert übergeben kann. Wie kann ich eine Word Variable in ihre bestandteile auflösen? Die letzte Stelle muss ja als erstes in das Modul geschoben werden. Gruss Thomas Code: define data port[6] define clock port[8] define enable port[7] define out byte[2] define i word[4] define j word[5] ' Zeichencodes siehe LED1.BAS ' ... const LED_0 = 130 const LED_1 = 207 const LED_2 = 145 const LED_3 = 133 const LED_4 = 204 const LED_5 = 164 const LED_6 = 160 const LED_7 = 143 const LED_8 = 128 const LED_9 = 132 declare Function LED_output() declare Function LED_shift() data=0 clock=0 enable=0 #loop out = LED_0 LED_output out = LED_1 LED_output out = LED_2 LED_output out = LED_3 LED_output out = LED_4 LED_output out = LED_5 LED_output pause 1 goto loop end ' Ausgabe auf das Display - alles in negativer Logik Function LED_output() enable = ON ' alles aus for i = 1 to 8 LED_shift next enable = OFF ' alles an end Function Function LED_shift() data = out and 1 out = out shr 1 pulse clock End Function > Hallo liebe C-Controller ;-) > > Ich habe ein ein LED Modul (6x 7Segment) von Conrad (BestNr: 121878 - LN) und möchte dies an einer C-CONTROL I M-UNIT 2.0 betreiben. Im Forum hier war mal ein Beitrag für eine Anschaltung an eine MUnit 2.0 > http://ccintern.dharlos.de/forum/lesen.php?eintrag=3422 > > Das Beispiel hab bei mir leider nicht funktioniert :-( Ich verwende Basic++ zum Programmieren. Habe aber auch mal die original IDE von Conrad zum testen benutzt. Hat jemand so eine Anschaltung mal gemacht und den passenden Code dafür? > > Die Suche hier im Forum hat mich bisher leider nicht weiter gebracht. Auch Google brachte nicht viel. > > Viele Grüße > > Thomas > > > > > > |
Antwort schreiben |