![]() ![]() INFO - FAQ - CC2-Forum - CCPro-Forum |
|
Hallo zusammen, wenn bei der Open-Maxi der externe Oszillator aussetzt, bleibt der Controller nicht etwa stehen, sondern er wird durch den internen Oszillator weitergetaktet. Im Controllermanual MC9S08AW60.pdf steht dazu: "The Digitally-Controlled Oscillator (DCO) will maintain operating frequency during a loss or removal of reference clock" Der Anwender kann den externen Oszillator mittels SLOWMODE OFF wieder reaktivieren. Das folgende Beispielprogramm verdeutlicht das. ' Experiment: Externen Oszillator im Betrieb aussetzen lassen (EXTAL-Pin mit 1 kOhm Widerstand auf Masse legen) ' In OCBASIC 1.11a für die Open-Maxi von Dietmar Harlos am 11. bis 12. August 2017 ' Ergebnis: Controller läuft weiter, Register ICGS1 geht von $ea nach $20 und ICGS2 ist unverändert ' Mittels SLOWMODE OFF kann der Oszillator wieder aktiviert werden. ' ICGS1: ' $ea = %11101010 ' CLKST REFST LOLS LOCK LOCS ERCS ICGIF ' 11 1 0 1 0 1 0 ' ^ ^ ^ ^ ^ ^ ^ ' | | | | | | \-- 0 No ICG interrupt request is pending. ' | | | | | \------- 1 External reference clock is stable, frequency requirement is met. ' | | | | \------------ 0 ICG has not lost clock since LOCS was last cleared. ' | | | \----------------- 1 FLL is currently locked. ' | | \---------------------- 0 FLL has not unexpectedly lost lock since LOLS was last cleared. ' | \---------------------------- 1 Crystal/Resonator selected. ' \---------------------------------- 11 FLL engaged, external reference ' $20 = %00100000 ' CLKST REFST LOLS LOCK LOCS ERCS ICGIF ' 00 1 0 0 0 0 0 ' ^ ^ ^ ^ ^ ^ ^ ' | | | | | | \-- 0 No ICG interrupt request is pending. ' | | | | | \-------*0 External reference clock is not stable, frequency requirement is not met. ' | | | | \------------ 0 ICG has not lost clock since LOCS was last cleared. ' | | | \-----------------*0 FLL is currently unlocked. ' | | \---------------------- 0 FLL has not unexpectedly lost lock since LOLS was last cleared. ' | \---------------------------- 1 Crystal/Resonator selected. ' \----------------------------------*00 Self-clocked INCLUDE "omax.def" 'Definitionen für die Open-Maxi PrintHex=ON WHILE TRUE PRINT "Hier ist die Open-Maxi." PRINT "ICGS1: $";ICGS1 PRINT "ICGS2: $";ICGS2 IF RXD THEN 'Tastendruck im Terminal? PRINT GET 'Als Echo zurückmelden SLOWMODE OFF 'Oszillator wieder reaktivieren END IF PAUSE 25 WEND Viel Spaß und Erfolg mit den OM-Mikrocontrollern! Dietmar Meine Homepage: http://ccintern.dharlos.de |
Antwort schreiben |