Das Open-Control-Projekt - Die Alternative zur C-Control-I


Das Forum zur C-Control-1
Welche C-Control-Varianten existieren?
Übersicht - Suchen - Neueste 50 Beiträge - Neuer Beitrag - Login - Registrieren
INFO - FAQ - CC2-Forum - CCPro-Forum 

 Watchdog für CControl M- Unit 1.2 Kategorie: Programmierung ASM (von Alfloeffl - 14.01.2008 14:13)
Alfloeffl nutzt:  CC1-M-Unit V1.2/2.0
Ich will eine C-Control-1 M- Unit V1.2 zur Heizungssteuerung einsetzen. Zur Überwachung will ich den Watchdog aktivieren, der nach Datenblatt von Freescale in der MC68HC908 verwendbar sein muesste.
Hierzu heisst es im Dokument:
MC68HC908GT16 Rev. 5.0 04/2007:
The COP counter is a free-running 6-bit counter preceded by a 12-bit prescaler counter. If not cleared by
software, the COP counter overflows and generates an asynchronous reset after 262,128 or 8176
COPCLK cycles, depending on the state of the COP rate select bit, COPRS, in the configuration register.
With a 8176 COPCLK cycle overflow option, a 32.768-kHz crystal gives a COP timeout period of 250 ms.
Writing any value to location $FFFF before an overflow occurs prevents a COP reset by clearing the COP
counter and stages 12 through 5 of the prescaler.

weiter:
A COP reset pulls the RST pin low for 32 COPCLK cycles and sets the COP bit in the reset status register
(RSR).
In monitor mode, the COP is disabled if the RST pin or the IRQ1 is held at VTST. During the break state,
VTST on the RST pin disables the COP.
Für die Version mit HC05 wurde ein entsprechendes Beispiel, gegeben in ccintern.dharlos.de/tipsutri.txt
' Der SYS-Befehl in der BASIC-Unterroutine ASMAUFRUF ruft folgendes
   ' Assemblerprogramm auf:
   
   '0091 =        org $91
   '0091 : a604   lda #$4
   '0093 : b791   sta $91
   '0095 : a6d2   lda #$d2
   '0097 : b792   sta $92
   '0099 : 81     rts
   '009a : 9d     nop
   
   #asmaufruf
     sys &h91 &h819d,&hb792,&ha6d2,&hb791,&ha604
   return

wie kann ich dies auf M1.2 übertragen?
Mir fehlen, ein entsprechender Aufruf zum Befehl "sys &h91 &h819d,&hb792,&ha6d2,&hb791,&ha604" der so in Basic++ nicht funktioniert. sowie die Sprungadressen, da ich das Betriebssystem nicht kenne

Passender Link: http://ccintern.dharlos.de/tipsutri.txt

 Antwort schreiben

Bisherige Antworten: