無線ブログ集
メイン | 簡易ヘッドライン |
TS820-DDS-VFOその8 (2022/2/12 2:06:42)
TS820の本体へのドッキングでの動作確認を行ないました。
基板の位置が斜めですが、問題なく本体のPLLボードからのバンド情報線がつながっています。
全部基板がTS820本体に繋がりました。
この状態でバンドSWでの切り替え動作確認です。結果は、半分失敗でした。バンド情報の並びが上手くありませんでした。思い違いでGNDの位置が逆側になっていたことが原因でしたので、ハードはそのままで、ソフトウェアで修正をする事にしました。内容はD0からD11を全部入れ替えです。D11からD0
D0はD11と言う具合に書き換えです。ヘテロダイン部の修正です。ついでに発振周波数が150Hz低かったので+150Hzに修正もしておきました。
修正コメントとしてスケッチ上に履歴記録もしています。
JAN/11:BAND PORT CHANGE D0 to D11 -> D11 to
D0
:awase set +150Hz
:awase set +150Hz
実際の修正箇所(青い色部)です。
awaseは定義部の修正です。
-----------------------------------------------------------------------------
const long awase = 150; //frequency [Hz]周波数補正
-----------------------------------------------------------------------------
void loop()部の中の修正です。
--------------------------------------------------------------------------------------------------------------------------------
if(digitalRead(CHANG_BAND)==LOW){ // IF pin16 L PULS IN (ordinary H level)
if(((((((((((digitalRead(TO_ESPD0)==HIGH) // "1" PLL OUT portD0-D10 condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //29.5MHz
HET_FREQ = HET_FREQ11;
if(p==0){
frq = freq11;
p=1;
}
else{
if(p==1){
frq = HET_FREQ - 5500000 + o_frq;
p=1;
}
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN,HIGH); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1,LOW); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2,LOW); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3,LOW); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
else{
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==HIGH)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //29MHz
HET_FREQ = HET_FREQ10;
if(p==0){
frq = freq10;
p=1;
}
else{
if(p==1){
frq = HET_FREQ - 5500000 + o_frq;
p=1;
}
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, LOW); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1,HIGH); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2, LOW); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3, LOW); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
}
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==HIGH)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //28.5MHz
HET_FREQ = HET_FREQ09;
if(p==0){
frq = freq09;
p=1;
}
else{
if(p==1){
frq = HET_FREQ - 5500000 + o_frq;
p=1;
}
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, HIGH); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1,HIGH); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2, LOW); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3, LOW); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
else{
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==HIGH)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //28.0MHz
HET_FREQ = HET_FREQ08;
if(p==0){
frq = freq08;
p=1;
}
else{
frq = HET_FREQ -5500000 + o_frq;
p=1;
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, LOW); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1, LOW); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2,HIGH); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3, LOW); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
}
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==HIGH)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //21MHz
HET_FREQ = HET_FREQ07;
if(p==0){
frq = freq07;
p=1;
}
else{
frq = HET_FREQ -5500000 + o_frq;
p=1;
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, HIGH); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1, LOW); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2,HIGH); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3, LOW); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
else{
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==HIGH)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //18MHz
HET_FREQ = HET_FREQ06;
if(p==0){
frq = freq06;
p=1;
}
else{
frq = HET_FREQ -5500000 + o_frq;
p=1;
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, LOW); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1,HIGH); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2,HIGH); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3, LOW); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
}
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==HIGH)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //15MHz WWV/JJY
HET_FREQ = HET_FREQ05;
if(p==0){
frq = freq05;
p=1;
}
else{
frq = HET_FREQ -5500000 + o_frq;
p=1;
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, HIGH); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1,HIGH); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2,HIGH); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3, LOW); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
else{
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==HIGH)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //14MHz
HET_FREQ = HET_FREQ04;
if(p==0){
frq = freq04;
p=1;
}
else{
frq = HET_FREQ -5500000 + o_frq;
p=1;
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, LOW); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1, LOW); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2, LOW); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3,HIGH); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
}
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==HIGH)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //7MHz
HET_FREQ = HET_FREQ03;
if(p==0){
frq = freq03;
p=1;
}
else{
frq = HET_FREQ -5500000 + o_frq;
p=1;
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, HIGH); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1, LOW); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2, LOW); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3,HIGH); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
else{
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==HIGH)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //3.5MHz
HET_FREQ = HET_FREQ02;
if(p==0){
frq = freq02;
f_dchange = 1;
f_fchange=1;//add 2020Dec12
p=1;
}
else{
frq = HET_FREQ -5500000 + o_frq;
p=1;
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, LOW); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1,HIGH); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2, LOW); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3,HIGH); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
}
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==HIGH))))))))))){ //1.9MHz
HET_FREQ = HET_FREQ01;
if(p==0){
frq = freq01;
p=1;
}
else{
frq = HET_FREQ -5500000 + o_frq;
p=1;
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, HIGH); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1,HIGH); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2, LOW); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3,HIGH); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
p=1;
}
if(((((((((((digitalRead(TO_ESPD0)==HIGH) // "1" PLL OUT portD0-D10 condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //29.5MHz
HET_FREQ = HET_FREQ11;
if(p==0){
frq = freq11;
p=1;
}
else{
if(p==1){
frq = HET_FREQ - 5500000 + o_frq;
p=1;
}
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN,HIGH); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1,LOW); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2,LOW); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3,LOW); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
else{
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==HIGH)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //29MHz
HET_FREQ = HET_FREQ10;
if(p==0){
frq = freq10;
p=1;
}
else{
if(p==1){
frq = HET_FREQ - 5500000 + o_frq;
p=1;
}
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, LOW); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1,HIGH); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2, LOW); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3, LOW); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
}
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==HIGH)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //28.5MHz
HET_FREQ = HET_FREQ09;
if(p==0){
frq = freq09;
p=1;
}
else{
if(p==1){
frq = HET_FREQ - 5500000 + o_frq;
p=1;
}
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, HIGH); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1,HIGH); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2, LOW); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3, LOW); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
else{
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==HIGH)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //28.0MHz
HET_FREQ = HET_FREQ08;
if(p==0){
frq = freq08;
p=1;
}
else{
frq = HET_FREQ -5500000 + o_frq;
p=1;
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, LOW); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1, LOW); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2,HIGH); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3, LOW); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
}
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==HIGH)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //21MHz
HET_FREQ = HET_FREQ07;
if(p==0){
frq = freq07;
p=1;
}
else{
frq = HET_FREQ -5500000 + o_frq;
p=1;
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, HIGH); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1, LOW); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2,HIGH); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3, LOW); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
else{
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==HIGH)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //18MHz
HET_FREQ = HET_FREQ06;
if(p==0){
frq = freq06;
p=1;
}
else{
frq = HET_FREQ -5500000 + o_frq;
p=1;
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, LOW); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1,HIGH); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2,HIGH); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3, LOW); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
}
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==HIGH)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //15MHz WWV/JJY
HET_FREQ = HET_FREQ05;
if(p==0){
frq = freq05;
p=1;
}
else{
frq = HET_FREQ -5500000 + o_frq;
p=1;
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, HIGH); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1,HIGH); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2,HIGH); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3, LOW); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
else{
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==HIGH)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //14MHz
HET_FREQ = HET_FREQ04;
if(p==0){
frq = freq04;
p=1;
}
else{
frq = HET_FREQ -5500000 + o_frq;
p=1;
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, LOW); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1, LOW); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2, LOW); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3,HIGH); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
}
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==HIGH)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //7MHz
HET_FREQ = HET_FREQ03;
if(p==0){
frq = freq03;
p=1;
}
else{
frq = HET_FREQ -5500000 + o_frq;
p=1;
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, HIGH); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1, LOW); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2, LOW); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3,HIGH); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
else{
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==HIGH)
and(digitalRead(TO_ESPD10)==LOW))))))))))){ //3.5MHz
HET_FREQ = HET_FREQ02;
if(p==0){
frq = freq02;
f_dchange = 1;
f_fchange=1;//add 2020Dec12
p=1;
}
else{
frq = HET_FREQ -5500000 + o_frq;
p=1;
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, LOW); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1,HIGH); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2, LOW); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3,HIGH); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
}
if(((((((((((digitalRead(TO_ESPD0)==LOW) // "1" BCD port condition check
and(digitalRead(TO_ESPD1)==LOW)
and(digitalRead(TO_ESPD2)==LOW)
and(digitalRead(TO_ESPD3)==LOW)
and(digitalRead(TO_ESPD4)==LOW)
and(digitalRead(TO_ESPD5)==LOW)
and(digitalRead(TO_ESPD6)==LOW)
and(digitalRead(TO_ESPD7)==LOW)
and(digitalRead(TO_ESPD8)==LOW)
and(digitalRead(TO_ESPD9)==LOW)
and(digitalRead(TO_ESPD10)==HIGH))))))))))){ //1.9MHz
HET_FREQ = HET_FREQ01;
if(p==0){
frq = freq01;
p=1;
}
else{
frq = HET_FREQ -5500000 + o_frq;
p=1;
}
f_dchange = 1;
f_fchange=1;//add 2020Dec12
//digitalWrite(LED_BUILTIN, HIGH); //CHANGE TO USE D0 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN1,HIGH); //CHANGE TO USE D1 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN2, LOW); //CHANGE TO USE D2 THERE'S NO OUTPUTPORT FOR USE
//digitalWrite(LED_BUILTIN3,HIGH); //CHANGE TO USE D3 THERE'S NO OUTPUTPORT FOR USE
}
p=1;
}
--------------------------------------------------------------------------------------------------------------------------------
上記のスケッチ修正で正常に本体のバンドSWを検出してくれました。ソフトウェアでの修正はハードをカバーするかなり有効な修正方法であることは間違いありませんね。ハード回路を作り直さなくても、ソフト書き換えでのみで対応出来ます。Hi!
早速、DDS-VFOでの受信確認を行いました。
実際の受信確認−1
今日は21MHzのコンディションもとても良い様です。
実際の受信確認−2
結構7MHzもコンディションが良くたくさん局が聞こえました。
受信以外にDDSでのSSB送信とキャリア送信のテストも行いました。特にひずみやハム音等の問題はありませんでした。
つづく?
execution time : 0.050 sec