// TEST 1
// Carry割込みが有ったら、前置カウンタの出力ラッチをして
// MSB側(bit7)がLOWなら周波数としてカウント、以外は過剰キャリーカウント(デバッグ)
void intFrq() {
digitalWrite(coRCK, HIGH);
digitalWrite(coRCK, LOW);
if (digitalRead(ctQ7) == LOW) ui64Reg++; else excessCarry++;
}
FRATの出力は、26006015.0000Hz前後
Num,YYMMDD,HHMMSS,GpsQ,Sat,Freq,(+-),gpsLoss,ppsLoss,HEX,b15-b0,excessCarry
1,2020/03/29,00:55:24,2,19,26006015.0000, +0.000,0,0,D1FF,1101 0001 1111 1111,0
2,2020/03/29,00:55:26,2,19,26006271.0000,+256.000,0,0,D2FF,1101 0010 1111 1111,0
3,2020/03/29,00:55:28,2,18,26006270.0000, -1.000,0,0,D2FE,1101 0010 1111 1110,0
4,2020/03/29,00:55:30,2,19,26006015.0000,-255.000,0,0,D1FF,1101 0001 1111 1111,0
5,2020/03/29,00:55:32,2,18,26006270.0000,+255.000,0,0,D2FE,1101 0010 1111 1110,0
6,2020/03/29,00:55:34,2,18,26006014.0000,-256.000,0,0,D1FE,1101 0001 1111 1110,0
7,2020/03/29,00:55:36,2,18,26006015.0000, +1.000,0,0,D1FF,1101 0001 1111 1111,0
8,2020/03/29,00:55:38,2,18,26006271.0000,+256.000,0,0,D2FF,1101 0010 1111 1111,0
9,2020/03/29,00:55:40,2,18,26006271.0000, +0.000,0,0,D2FF,1101 0010 1111 1111,0
10,2020/03/29,00:55:42,2,17,26006271.0000, +0.000,0,0,D2FF,1101 0010 1111 1111,0
11,2020/03/29,00:55:44,2,18,26006271.0000, +0.000,0,0,D2FF,1101 0010 1111 1111,0
12,2020/03/29,00:55:46,2,18,26006272.0000, +1.000,0,0,D300,1101 0011 0000 0000,0
13,2020/03/29,00:55:48,2,18,26006016.0000,-256.000,0,0,D200,1101 0010 0000 0000,0
14,2020/03/29,00:55:50,2,18,26006015.0000, -1.000,0,0,D1FF,1101 0001 1111 1111,0
過剰キャリーカウントが多発(+256Hz)
==========================================================
// TEST 2
// ゲートONなら周波数としてカウント、以外は過剰キャリーカウント(デバッグ)
void intFrq() {
if (gateON == 1) ui64Reg++; else excessCarry++;
}
FRATの出力は、26006015.0000Hz前後
69,2020/03/29,01:10:50,2,20,26006029.0000, +4.000,0,0,D20D,1101 0010 0000 1101,3
70,2020/03/29,01:10:52,2,21,26006019.0000, -10.000,0,0,D203,1101 0010 0000 0011,3
71,2020/03/29,01:10:54,2,21,26006016.0000, -3.000,0,0,D200,1101 0010 0000 0000,3
72,2020/03/29,01:10:56,2,21,26006017.0000, +1.000,0,0,D201,1101 0010 0000 0001,3
73,2020/03/29,01:10:58,2,21,26006017.0000, +0.000,0,0,D201,1101 0010 0000 0001,3
74,2020/03/29,01:11:00,2,21,26006269.0000,+252.000,0,0,D2FD,1101 0010 1111 1101,3
75,2020/03/29,01:11:02,2,21,26006016.0000,-253.000,0,0,D200,1101 0010 0000 0000,3
76,2020/03/29,01:11:04,2,21,26006016.0000, +0.000,0,0,D200,1101 0010 0000 0000,3
77,2020/03/29,01:11:06,2,20,26006017.0000, +1.000,0,0,D201,1101 0010 0000 0001,3
78,2020/03/29,01:11:08,2,21,26006016.0000, -1.000,0,0,D200,1101 0010 0000 0000,3
79,2020/03/29,01:11:10,2,21,26006015.0000, -1.000,0,0,D1FF,1101 0001 1111 1111,4
80,2020/03/29,01:11:12,2,20,26006269.0000,+254.000,0,0,D2FD,1101 0010 1111 1101,4
81,2020/03/29,01:11:14,2,21,26006016.0000,-253.000,0,0,D200,1101 0010 0000 0000,4
82,2020/03/29,01:11:16,2,21,26006015.0000, -1.000,0,0,D1FF,1101 0001 1111 1111,5
83,2020/03/29,01:11:18,2,21,26006018.0000, +3.000,0,0,D202,1101 0010 0000 0010,5
84,2020/03/29,01:11:20,2,20,26006016.0000, -2.000,0,0,D200,1101 0010 0000 0000,5
85,2020/03/29,01:11:22,2,20,26006016.0000, +0.000,0,0,D200,1101 0010 0000 0000,5
下8ビットが完全な形の"11111111"ではないが、キャリーの(Carry)過加算のような現象
==========================================================
// TEST 3
// ゲート(D-F/F(74AC74))の出力がON(負論理)なら周波数としてカウント
void intFrq() {
if (digitalRead(ciGONn) == LOW) ui64Reg++;
}
FRATの出力は、26006015.0000Hz前後(実周波数は、多分 26006032Hz)
1,2020/03/29,01:21:16,2,17,26005776.0000, +0.000,0,0,D110,1101 0001 0001 0000,0
2,2020/03/29,01:21:18,2,18,26005776.0000, +0.000,0,0,D110,1101 0001 0001 0000,0
3,2020/03/29,01:21:20,2,17,26005776.0000, +0.000,0,0,D110,1101 0001 0001 0000,0
4,2020/03/29,01:21:22,2,17,26005776.0000, +0.000,0,0,D110,1101 0001 0001 0000,0
5,2020/03/29,01:21:24,2,18,26005776.0000, +0.000,0,0,D110,1101 0001 0001 0000,0
6,2020/03/29,01:21:26,2,18,26005776.0000, +0.000,0,0,D110,1101 0001 0001 0000,0
7,2020/03/29,01:21:28,2,18,26005776.0000, +0.000,0,0,D110,1101 0001 0001 0000,0
8,2020/03/29,01:21:30,2,19,26005777.0000, +1.000,0,0,D111,1101 0001 0001 0001,0
9,2020/03/29,01:21:32,2,18,26005776.0000, -1.000,0,0,D110,1101 0001 0001 0000,0
10,2020/03/29,01:21:34,2,18,26005776.0000, +0.000,0,0,D110,1101 0001 0001 0000,0
11,2020/03/29,01:21:36,2,18,26005776.0000, +0.000,0,0,D110,1101 0001 0001 0000,0
12,2020/03/29,01:21:38,2,19,26005776.0000, +0.000,0,0,D110,1101 0001 0001 0000,0
全ての計測で256カウント前後のマイナス
10MHzOCXOを入れてみる。
Num,YYMMDD,HHMMSS,GpsQ,Sat,Freq,(+-),gpsLoss,ppsLoss,HEX,b15-b0,excessCarry
1,2020/03/29,01:24:26,2,18, 9999974.4000, +0.000,0,0,E000,1110 0000 0000 0000,0
2,2020/03/29,01:24:37,2,19, 9999974.4000, +0.000,0,0,E000,1110 0000 0000 0000,0
3,2020/03/29,01:24:48,2,17, 9999974.5000, +0.100,0,0,E001,1110 0000 0000 0001,0
4,2020/03/29,01:24:59,2,17, 9999974.4000, -0.100,0,0,E000,1110 0000 0000 0000,0
5,2020/03/29,01:25:10,2,18, 9999974.4000, +0.000,0,0,E000,1110 0000 0000 0000,0
6,2020/03/29,01:25:21,2,18, 9999974.4000, +0.000,0,0,E000,1110 0000 0000 0000,0
7,2020/03/29,01:25:32,2,20, 9999974.4000, +0.000,0,0,E000,1110 0000 0000 0000,0
8,2020/03/29,01:25:43,2,20, 9999974.4000, +0.000,0,0,E000,1110 0000 0000 0000,0
9,2020/03/29,01:25:54,2,18, 9999974.4000, +0.000,0,0,E000,1110 0000 0000 0000,0
10,2020/03/29,01:26:05,2,16, 9999974.5000, +0.100,0,0,E001,1110 0000 0000 0001,0
11,2020/03/29,01:26:16,2,18, 9999974.4000, -0.100,0,0,E000,1110 0000 0000 0000,0
12,2020/03/29,01:26:27,2,19, 9999974.4000, +0.000,0,0,E000,1110 0000 0000 0000,0
256カウント(キャリー)分が欠落している。
=========================================================
// TEST 4
// ゲートONなら周波数としてカウント、以外は過剰キャリーカウント(デバッグ)
void intFrq() {
if (gateON == 1) ui64Reg++; else excessCarry++;
}
10MHzOCXOを入れてみる。10,000,000.02Hzで安定発振(ゲート10S)
Num,YYMMDD,HHMMSS,GpsQ,Sat,Freq,(+-),gpsLoss,ppsLoss,HEX,b15-b0,excessCarry
1,2020/03/29,01:33:15,2,17,10000000.1000, +0.000,0,0,E101,1110 0001 0000 0001,0
2,2020/03/29,01:33:26,2,18,10000000.0000, -0.100,0,0,E100,1110 0001 0000 0000,0
3,2020/03/29,01:33:37,2,19,10000000.0000, +0.000,0,0,E100,1110 0001 0000 0000,0
4,2020/03/29,01:33:48,2,19,10000000.0000, +0.000,0,0,E100,1110 0001 0000 0000,0
5,2020/03/29,01:33:59,2,19,10000000.1000, +0.100,0,0,E101,1110 0001 0000 0001,0
6,2020/03/29,01:34:10,2,19,10000000.0000, -0.100,0,0,E100,1110 0001 0000 0000,0
7,2020/03/29,01:34:21,2,18,10000000.0000, +0.000,0,0,E100,1110 0001 0000 0000,0
8,2020/03/29,01:34:32,2,19,10000000.0000, +0.000,0,0,E100,1110 0001 0000 0000,0
下8ビットが11111111にならない。(変動が無いので別の手で試す)
===========================================================
// TEST 5
// ゲートONなら周波数としてカウント、以外は過剰キャリーカウント(デバッグ)
void intFrq() {
if (gateON == 1) ui64Reg++; else excessCarry++;
}
FRAT10,006,015Hzを入れる。(1S)
106,2020/03/29,01:42:48,2,20,10006016.0000, +1.000,0,0,AE00,1010 1110 0000 0000,19
107,2020/03/29,01:42:50,2,20,10006016.0000, +0.000,0,0,AE00,1010 1110 0000 0000,19
108,2020/03/29,01:42:52,2,21,10006033.0000, +17.000,0,0,AE11,1010 1110 0001 0001,19
ここはFRATの周波数変動と見ても良いかも知れない。
116,2020/03/29,01:43:08,2,20,10006015.0000, +0.000,0,0,ADFF,1010 1101 1111 1111,26
117,2020/03/29,01:43:10,2,20,10006015.0000, +0.000,0,0,ADFF,1010 1101 1111 1111,27
118,2020/03/29,01:43:12,2,20,10006015.0000, +0.000,0,0,ADFF,1010 1101 1111 1111,28
119,2020/03/29,01:43:14,2,20,10006017.0000, +2.000,0,0,AE01,1010 1110 0000 0001,28
120,2020/03/29,01:43:16,2,20,10006261.0000,+244.000,0,0,AEF5,1010 1110 1111 0101,28
121,2020/03/29,01:43:18,2,20,10006016.0000,-245.000,0,0,AE00,1010 1110 0000 0000,28
122,2020/03/29,01:43:20,2,20,10006016.0000, +0.000,0,0,AE00,1010 1110 0000 0000,28
123,2020/03/29,01:43:22,2,20,10006016.0000, +0.000,0,0,AE00,1010 1110 0000 0000,28
124,2020/03/29,01:43:24,2,20,10006016.0000, +0.000,0,0,AE00,1010 1110 0000 0000,28
125,2020/03/29,01:43:26,2,20,10006016.0000, +0.000,0,0,AE00,1010 1110 0000 0000,28
126,2020/03/29,01:43:28,2,19,10006015.0000, -1.000,0,0,ADFF,1010 1101 1111 1111,29
127,2020/03/29,01:43:30,2,20,10006016.0000, +1.000,0,0,AE00,1010 1110 0000 0000,29
下8ビットが完全な形の"11111111"ではないが、キャリーの不具合か?
または、過剰加算か、ビット抜けb4 b2 が発生。
============================================================