Hallo,
ich habe dieses Teil:
http://www.sparkfun.com/products/8627
das Teil hat eine interne „real time clock“ (RTC). Leider ist auf der Seite nicht beschrieben, wie man das konkret machen soll. Wo ich gerade stehe:
http://forum.sparkfun.com/viewtopic.php?f=11&t=12312…
To use the RTC on the Logomatic V2 you have to have a battery
continuously plugged in to the power connector, and you have to
lift pin 49 on the LPC2148 and wire it to the + side of the power
connector.To turn on the RTC:
CCR = 0x00000011; // Bit 0, (Name: CLKEN) enables clock counters
// Bit 4, (Name: CLKSRC) when ‚1‘ it uses the separate 32kHz
oscillator instead of counting down the processor clockYou have to disable CLKEN while setting the RTC, and then you can
read date and time by reading YEAR, MONTH, DOM, HOUR, MIN, and SEC.
-> Ich kann mit einem USB-Kabel auf den Speicher zugreifen, der in FAT16 formatiert ist
-> In FW.SFE ist kompiliert min. „CCR = 0x00000011;“ vorhanden + die Zeiteinstellung, wovon ich keine Ahnung habe, wie.
-> Laut diesem Tutorial, was zu umständlich beschrieben ist…
http://www.sparkfun.com/tutorials/94
… habe ich die Entwicklungsumgbung eingerichtet und das Beispiel kompiliert. Das Kompilieren scheint okay zu sein, die FW.SFE-Datei ist da.
-> Wo finde ich aber konkrete Beispiele/Informationen, wie die Befehle für RTC sind, wie ich die Zeit einstelle und das dann die Logdateien einen Zeitstempel bekommen + zusätzlich zum Loggen eine Zeitangabe kommt?
Was ich will:
eine Logdatei (mit Zeitstempel), die im folgenden Format
…
10010100 13:26:07
…
die „Bytes“ von Digital/Analog mit Zeitangabe abspeichert.
-> Die „LOGCON.txt“ ist schon vorhanden, vielleicht Vorschläge, was ich dort verändern muss?
MODE = 1
ASCII = Y
Baud = 4
Frequency = 100
Trigger Character = 1
Text Frame = 100
AD1.3 = N
AD0.3 = N
AD0.2 = N
AD0.1 = N
AD1.2 = N
AD0.4 = N
AD1.7 = N
AD1.6 = N
Saftey On = Y
Ich denke AD1.3 bis AD1.6 müssen aktiviert werden… mir ist aber erstmal die real time clock besonders wichtig.
Vielen Dank für eure Hilfe & Grüße
Roman