逓倍率は、初期化状態 x1である。
目的周波数 50.6MHzを逓倍して得るには、MUL SWを押し、ロータリーエンコーダを回して発振周波数(逓倍数)を決めればよい。再度MUL SWを押すとメモリーに記憶される。この機能は、チャンネル毎に有効である。
回路図である。RIT SWの割付以外、前のバージョンと同じ。
Program
AD9850 DUALの機能(メモリー初期化、VFOモード)を含めたので、細かな操作方法は省く。//////////////////////////////////////////////////////////////////////
// AD9834 DDS VFO program ver.1.1.1
// Copyright(C)2016.JA2GQP.All rights reserved.
//
// <<<<< Arduino IDE 1.0.6 >>>>>
// 2016/5/10
// JA2GQP
//--------------------------------------------------------------------
// Function
// 1.STEP(1M,100k,10k,1k,100,10)
// 2.Memory Channel ch0 - ch9(10ch)
// 3.Protection Operation At The Time Of Transmission
// 4.Parameter settings(DDS Clock,IF Frequency,VFO Mode)
// 5.Multiplied x1(min) - x9(max)
//--------------------------------------------------------------------
// Library
// http://www.buxtronix.net/2011/10/rotary-encoders-done-properly.html
//
//////////////////////////////////////////////////////////////////////
#include <LiquidCrystal.h>
#include <rotary.h>
#include <EEPROM.h>
//---------- LCD Pin Assign ------------------
LiquidCrystal lcd(12,11,10,9,8,7); // RS,ENABLE,DB4,DB5,DB6,DB7
//---------- Define Constant Value ----------
const byte ENC_A = 2; // Encorder A
const byte ENC_B = 3; // B
const byte SDATA = 4; // AD9834 SDATA
const byte SCLK = 5; // SCLK
const byte FSYNC = 6; // FSYNC
const byte SW_TX = 13; // TX SW
const byte SW_STEP = 14; // STEP SW
const byte SW_CH = 15; // CH SW
const byte SW_ENT = 16; // ENT SW
const byte SW_MUL = 17; // MUL SW
const byte SW_RIT = 18; // RIT SW
////////////////////////////////
// Limited range
////////////////////////////////
const long LW_RIT = -50000L; // RIT Lower Limit
const long HI_RIT = 50000L; // RIT Upper Limit
const long LW_VFO80 = 3500000L; // 3.5MHz Lower Limit
const long HI_VFO80 = 3575000L; // Upper Limit
const long LW_VFO40 = 7000000L; // 7MHz Lower Limit
const long HI_VFO40 = 7200000L; // Upper Limit
const long LW_VFO20 = 14000000L; // 14MHz Lower Limit
const long HI_VFO20 = 14350000L; // Upper Limit
const long LW_VFO15 = 21000000L; // 21MHz Lower Limit
const long HI_VFO15 = 21450000L; // Upper Limit
const long LW_VFO10 = 28000000L; // 28MHz Lower Limit
const long HI_VFO10 = 29700000L; // Upper Limit
const long LW_VFO6 = 50000000L; // 50MHz Lower Limit
const long HI_VFO6 = 54000000L; // Upper Limit
const long LW_VFO2 = 144000000L; // 144MHz Lower Limit
const long HI_VFO2 = 146000000L; // Upper Limit
////////////////////////////////
// default value
////////////////////////////////
const long DEF_FRQ = 7050000L; // Default Vfo(7.05MHz)
const long DEF_STP = 1000L; // Init STEP(1kHz)
const long DEF_OSC = 50000000L; // OSC(50MHz)
const long DEF_IF = 10700000L; // IF (10.7MHz)
const long DEF_VFO = 4; // Vfo Mode(TR+IF)
const long DEF_MUL = 1; // Multiplied(1)
////////////////////////////////
// DDS parameter
////////////////////////////////
const unsigned long TWO_E28 = 268435456L; // 2^28
////////////////////////////////
// etc
////////////////////////////////
const byte Max_Chn = 10; // Max Channel(10ch)
const byte Int_End = 73; // Initial end code
const char *CALL = "JA2GQP"; // Display Call sign
const byte LW_MUL = 1; // Low Mul(x1)
const byte HI_MUL = 9; // High Mul(x9)
//---------- EEPROM Memory Address -----------------------
const byte Frq_Eep = 0x00; // Frequency(4byte*10)
const byte Stp_Eep = 0x30; // STEP(4byte*10)
const byte Mul_Eep = 0x60; // Mode(1byte*10)
const byte Osc_Eep = 0x70; // OSC(4byte*1)
const byte If_Eep = 0x74; // IF(4byte*1)
const byte Chn_Eep = 0x80; // Channel(1byte*1)
const byte Vfo_Eep = 0x82; // Vfo mode(1byte*1)
const byte Eep_Int = 0x8e; // Eep Init(1byte*1)
//---------- Encorder Pin Assign(INT) --------
Rotary r = Rotary(ENC_A,ENC_B); // 2 = ENC_A,3 = ENC_B
//---------- Memory Assign -------------------
long Vfo_Dat = 0; // VFO Data
long Rit_Dat = 0; // RIT Data
long RX_Dat = 0; // RX DDS Out Data
long TX_Dat = 0; // TX DDS Out Data
long Enc_Stp = 0; // STEP
long Lng_Wk1 = 0; // Long Work1
long Lng_Wk2 = 0; // Work2
long DDS_CLK = 0; // DDS Clock
long VFO_IF = 0; // VFO IF
char *Lcd_Dat = " "; // Lcd Display Buffer
byte Byt_Chn = 0; // Channel SW
byte Byt_Chnb = 0; // Channel SW Old
byte Flg_Tx = 0; // TX Flag
byte Flg_Mul = 0; // Multi Flag
byte Byt_Mul = 0;
byte Flg_Ent = 0; // ENT Flag
byte Flg_Rit = 0; // RIT Flag
int8_t Flg_Over; // Over Flag
byte Byt_Ent = 0;
byte Flg_Osc = 0; // OSC Flag
byte Flg_If = 0; // IF Flag
byte Flg_Vfo = 0; // DDS Flag
byte Byt_Vfo = 0; // VFO Mode
//---------- Initialization Program ---------------
void setup(){
pinMode(SW_STEP,INPUT_PULLUP);
pinMode(SW_ENT,INPUT_PULLUP);
pinMode(SW_MUL,INPUT_PULLUP);
pinMode(SW_RIT,INPUT_PULLUP);
pinMode(SW_TX,INPUT_PULLUP);
pinMode(SW_CH,INPUT_PULLUP);
lcd.begin(16, 2); // LCD 16*2
PCICR |= (1 << PCIE2);
PCMSK2 |= (1 << PCINT18) | (1 << PCINT19);
sei(); // INT Enable
pinMode(FSYNC,OUTPUT);
pinMode(SCLK,OUTPUT);
pinMode(SDATA,OUTPUT);
Flg_Tx = 0; // Flag Initialization
Flg_Ent = 0;
Flg_Mul = 0;
Flg_Osc = 0;
Flg_Vfo = 0;
lcd.clear();
if(EEPROM.read(Eep_Int) != Int_End){ // Eep initialaz
delay(10);
Fnc_Eep_Int();
}
DDS_CLK = Fnc_Eep_Lod4(Osc_Eep); // EEPROM Read DDS OSC
VFO_IF = Fnc_Eep_Lod4(If_Eep); // IF
Byt_Chn = EEPROM.read(Chn_Eep); // Channel
Byt_Chnb = Byt_Chn;
Fnc_Eep_Rd(); // VFO & STEP
}
//---------- Main program ---------------
void loop() {
if(Flg_Tx == 0){ // TX off?
if(digitalRead(SW_STEP) == LOW) // STEP SW On?
Fnc_Stp();
if(digitalRead(SW_ENT) == LOW) // ENT SW On?
Fnc_Ent();
if(digitalRead(SW_MUL) == LOW) // MUL SW On?
Fnc_Mul();
if(Flg_Ent == 0){ // Parameter not chenge?
if((digitalRead(SW_CH) == LOW)) // SEL SW On?
Fnc_Chsw();
if(Flg_Mul == 0)
if((digitalRead(SW_RIT) == LOW)) // RIT SW On?
Fnc_Rit();
}
if(Byt_Chnb != Byt_Chn){ // CH SW OLD != NEW?
Fnc_Eep_Wt(Byt_Chnb);
Byt_Chnb = Byt_Chn;
Fnc_Eep_Rd();
}
if(Flg_Ent == 1) // ENT proc.?
Fnc_Prm();
else{
lcd.setCursor(5,1);
lcd.print(" ");
}
}
if(digitalRead(SW_TX) == LOW) // Tx On?
Flg_Tx = 1; // Yes,Flg_Tx Set
else
Flg_Tx = 0; // No,Flg_Tx Reset
Fnc_Band(); // Band check
Fnc_If(Byt_Vfo); // VFO mode data set
if(Flg_Tx == 0) // RX
Fnc_Dds(RX_Dat / Byt_Mul); // AD9834 DDS Out
else{ // TX
if(Flg_Over == 0) // In a range
Fnc_Dds(TX_Dat / Byt_Mul); // AD9834 DDS Out
else
Fnc_Dds(0);
}
Fnc_Lcd(); // LCD Display
delay(100);
}
//---------- Function IF Proc. ---------------
void Fnc_If(byte if_mode){
switch(if_mode){
case 0: // Roff
RX_Dat = 0L; // RX = off
TX_Dat = Vfo_Dat; // TX = VFO
break;
case 1: // TR
RX_Dat = Vfo_Dat; // RX = VFO
TX_Dat = Vfo_Dat; // TX = VFO
break;
case 2: // R+IF
RX_Dat = Vfo_Dat + VFO_IF; // RX = VFO + IF
TX_Dat = Vfo_Dat; // TX = VFO
break;
case 3: // T+IF
RX_Dat = Vfo_Dat; // RX = VFO
TX_Dat = Vfo_Dat + VFO_IF; // TX = VFO + IF
break;
case 4: // TR+IF
RX_Dat = Vfo_Dat + VFO_IF; // RX = VFO + IF
TX_Dat = Vfo_Dat + VFO_IF; // TX = VFO + IF
break;
case 5: // TR-IF
RX_Dat = Vfo_Dat - VFO_IF; // RX = VFO - IF
TX_Dat = Vfo_Dat - VFO_IF; // TX = VFO - IF
break;
default:
RX_Dat = 0L; // RX = off
TX_Dat = Vfo_Dat; // TX = VFO
break;
}
if((RX_Dat != 0) && (Flg_Rit == 1))
RX_Dat = RX_Dat + Rit_Dat;
if((RX_Dat <= 0) && (TX_Dat <= 0))
Flg_Over = -1;
}
//---------- Encorder procedure(INT) ---------------
ISR(PCINT2_vect) {
unsigned char result = r.process();
if(Flg_Tx == 0){
if(result) {
if(result == DIR_CW){
if((Flg_Mul == 0) && (Flg_Rit == 0))
Vfo_Dat = Vfo_Dat + Enc_Stp;
if(Flg_Rit == 1)
Rit_Dat = Rit_Dat + Enc_Stp;
if(Flg_Mul == 1)
Byt_Mul++;
}
else{
if((Flg_Mul == 0) && (Flg_Rit == 0))
Vfo_Dat = Vfo_Dat - Enc_Stp;
if(Flg_Rit == 1)
Rit_Dat = Rit_Dat - Enc_Stp;
if(Flg_Mul == 1)
Byt_Mul--;
}
if(Vfo_Dat < 0) // VFO Frequency range check
Vfo_Dat = 0L;
Byt_Mul = constrain(Byt_Mul,LW_MUL,HI_MUL); // MUL range check
Rit_Dat = constrain(Rit_Dat,LW_RIT,HI_RIT); // RIT range check
}
}
}
//---------- Function DDS set ---------------
void Fnc_Dds(double frquency){
unsigned long wrk = frquency * TWO_E28 / DDS_CLK;
unsigned int wrk1,wrk2,wrk3;
wrk1 = 0x2000;
wrk2 = wrk & 0x3fff;
wrk2 = wrk2 | 0x4000;
wrk3 = wrk >> 14;
wrk3 = wrk3 & 0x3fff;
wrk3 = wrk3 | 0x4000;
digitalWrite(SCLK,HIGH);
digitalWrite(FSYNC,LOW);
shiftOut(SDATA,SCLK,MSBFIRST,(wrk1 >> 8));
shiftOut(SDATA,SCLK,MSBFIRST,wrk1);
shiftOut(SDATA,SCLK,MSBFIRST,(wrk2 >> 8));
shiftOut(SDATA,SCLK,MSBFIRST,wrk2);
shiftOut(SDATA,SCLK,MSBFIRST,(wrk3 >> 8));
shiftOut(SDATA,SCLK,MSBFIRST,wrk3);
digitalWrite(FSYNC,HIGH);
}
//---------- Function Encorder STEP ---------
void Fnc_Stp(){
if(Enc_Stp == 10) // Step = 10Hz ?
Enc_Stp = 1000000; // Yes,1MHz set
else
Enc_Stp = Enc_Stp / 10; // Step down 1 digit
Fnc_Step_Disp();
Fnc_Lcd();
while(digitalRead(SW_STEP) == LOW)
;
}
//---------- Function STEP Display ----------
void Fnc_Step_Disp(){
lcd.setCursor(0,1);
switch(Enc_Stp){
case 10:
lcd.print("10 ");
break;
case 100:
lcd.print("100 ");
break;
case 1000:
lcd.print("1k ");
break;
case 10000:
lcd.print("10k ");
break;
case 100000:
lcd.print("100k");
break;
case 1000000:
lcd.print("1M ");
break;
default:
lcd.print("1k ");
Enc_Stp = 1000;
break;
}
}
//---------- Function String Dot Edit --------
char *Fnc_Dot_Edit(char *str,long n){
int i = 0; // Write the number
char *p = str;
unsigned long u = abs(n);
do{
*p++ = "0123456789"[u % 10];
u = u / 10;
i++;
if((0 != u) && (0 == (i % 3)))
*p++ = ',';
}
while( 0 != u )
;
if ( n < 0 )
*p++ = '-';
*p = '\0';
Fnc_Revr( str );
return str;
}
//---------- Function String Reverse ---------
void Fnc_Revr(char *str){
int i,n;
char c;
n=strlen(str);
for(i = 0;i < n / 2;i++){
c=str[i];
str[i]=str[n - i - 1];
str[n - i - 1]=c;
}
}
//---------- Function Save EEPROM 4byte ---------
void Fnc_Eep_Sav4(long value,int address){
address += 3;
for(int i = 0;i < 4;i++){
byte toSave = value & 0xFF;
if(EEPROM.read(address) != toSave){
EEPROM.write(address,toSave);
}
value = value >> 8;
address--;
}
}
//---------- Function Load EEPROM 4byte ---------
long Fnc_Eep_Lod4(int address){
long value = 0;
for(int i = 0;i < 4;i++){
value = value | EEPROM.read(address);
if( i < 3){
value = value << 8;
address++;
}
}
return value;
}
//---------- Function LCD Display ---------
void Fnc_Lcd(){
lcd.setCursor(0,0);
if(Flg_Tx == 1)
lcd.print("T");
else if(Flg_Ent == 1)
lcd.print("P");
else
lcd.print(Byt_Chn);
Fnc_Step_Disp();
if(Flg_Rit == 1){
lcd.setCursor(5,1);
lcd.print("R ");
lcd.setCursor(6,1);
if(Rit_Dat >=0)
lcd.write('+');
Fnc_Dot_Edit(Lcd_Dat,Rit_Dat);
lcd.print(Lcd_Dat);
lcd.print("Hz");
}
if(Flg_Mul == 1){
lcd.setCursor(5,1);
lcd.print(" ");
lcd.setCursor(5,1);
lcd.print("x");
lcd.print(Byt_Mul);
Lng_Wk1 = Vfo_Dat / Byt_Mul;
Fnc_Fdsp(Lng_Wk1);
}
else if((Flg_Over == -1) && (Flg_Ent == 0) && (Flg_Rit == 0)){
Fnc_Fdsp(Vfo_Dat);
lcd.setCursor(5,1);
lcd.print("Over");
}
else
Fnc_Fdsp(Vfo_Dat);
if((Flg_Vfo == 0) && (Flg_Rit == 0)){
lcd.setCursor(10,1);
lcd.print(CALL);
}
}
//---------- Function Frequency Display ---------
void Fnc_Fdsp(long f_disp){
Fnc_Dot_Edit(Lcd_Dat,f_disp);
lcd.setCursor(1,0);
lcd.print(": ");
lcd.setCursor(3,0);
lcd.print(Lcd_Dat);
lcd.print("Hz");
}
//---------- Function ENT ---------
void Fnc_Ent(){
byte cnt = 0;
if(Flg_Ent == 0){
Fnc_Eep_Wt(Byt_Chn);
while(digitalRead(SW_ENT) == LOW){
delay(500);
cnt++;
if(6 <= cnt){ // Parameter change mode(3sec)
lcd.setCursor(0,0);
lcd.print("P");
Flg_Ent = 1;
if(Flg_Osc == 0){
Lng_Wk2 = Vfo_Dat;
Vfo_Dat = Fnc_Eep_Lod4(Osc_Eep);
if(Vfo_Dat <= 0){
Vfo_Dat = DEF_OSC;
Fnc_Eep_Sav4(Vfo_Dat,Osc_Eep);
}
Flg_Osc = 1;
Flg_If = 0;
Flg_Mul = 0;
}
Fnc_Fdsp(Vfo_Dat);
lcd.setCursor(5,1);
lcd.print("OSC ");
}
}
}
else{
while(digitalRead(SW_ENT) == LOW){
delay(500);
cnt++;
if(6 <= cnt){ // Return Parameter cahne mode(3sec)
lcd.setCursor(5,1);
lcd.print(" ");
lcd.setCursor(0,0);
lcd.print(Byt_Chn);
Flg_Ent = 0;
Flg_Vfo = 0;
if(Flg_Osc == 1){
Fnc_Eep_Sav4(Vfo_Dat,Osc_Eep);
DDS_CLK = Vfo_Dat;
Vfo_Dat = Lng_Wk2;
Flg_Osc = 0;
Fnc_Fdsp(Vfo_Dat);
}
if(Flg_If == 1){
Fnc_Eep_Sav4(Vfo_Dat,If_Eep);
VFO_IF = Vfo_Dat;
Vfo_Dat = Lng_Wk2;
Flg_If = 0;
Fnc_Fdsp(Vfo_Dat);
}
EEPROM.write(Vfo_Eep,Byt_Vfo);
}
else
Byt_Ent++;
}
}
}
//---------- Function Prameter PROC ---------
void Fnc_Prm(){
lcd.setCursor(5,1);
switch(Byt_Ent){
case 0: // OSC Set
if(Flg_Osc == 0){
Vfo_Dat = Fnc_Eep_Lod4(Osc_Eep);
Flg_Osc = 1;
}
break;
case 1: // IF Set
if(Flg_Osc == 1){
Fnc_Eep_Sav4(Vfo_Dat,Osc_Eep);
Flg_Osc = 0;
}
if(Flg_If == 0){
Vfo_Dat = Fnc_Eep_Lod4(If_Eep);
if(Vfo_Dat < 0)
Vfo_Dat = DEF_IF;
Flg_If = 1;
}
lcd.print("IF ");
break;
case 2: // DDS mode Set
if(Flg_If == 1){
Fnc_Eep_Sav4(Vfo_Dat,If_Eep);
Vfo_Dat = Lng_Wk2;
Flg_If = 0;
Flg_Vfo = 0;
}
if(Flg_Vfo == 0){
Byt_Vfo = EEPROM.read(Vfo_Eep);
if(Byt_Vfo < 0)
Byt_Vfo = 0;
Flg_Vfo = 1;
}
lcd.setCursor(10,1);
switch(Byt_Vfo){
case 0:
lcd.print("Roff "); // TX=VFO RX=0
break;
case 1:
lcd.print("TR "); // TX=VFO RX=VFO
break;
case 2:
lcd.print("R+IF "); // TX=VFO RX=VFO+IF
break;
case 3:
lcd.print("T+IF "); // TX=VFO+IF RX=VFO
break;
case 4:
lcd.print("TR+IF "); // TX=VFO+IF RX=VFO+IF
break;
case 5:
lcd.print("TR-IF "); // TX=VFO-IF RX=VFO-IF
break;
default:
Byt_Vfo = 0;
lcd.print("Roff ");
break;
}
lcd.setCursor(5,1);
lcd.print("VFO ");
break;
default:
if(Flg_Vfo == 1){
EEPROM.write(Vfo_Eep,Byt_Vfo);
lcd.setCursor(10,1);
lcd.print(CALL);
Flg_Vfo = 0;
}
lcd.setCursor(5,1);
lcd.print("OSC ");
Byt_Ent = 0;
break;
}
}
//---------- Function CH SW Check ---------
void Fnc_Chsw(){
byte cnt = 0;
Byt_Chn++;
while(digitalRead(SW_CH) == LOW){
delay(500);
cnt++;
if(6 <= cnt){ // Eep Initial start(3sec)?
Fnc_Eep_Int(); // Initialization
Byt_Chn = EEPROM.read(Chn_Eep); // Channel Read
Byt_Chnb = Byt_Chn;
Fnc_Eep_Rd(); // EEPROM Read
lcd.setCursor(0,0); // LCD display
lcd.print(Byt_Chn);
Fnc_Fdsp(Vfo_Dat);
lcd.setCursor(5,1);
lcd.print("Init End ");
}
}
}
//---------- Function Eeprom Initialization -----------------
void Fnc_Eep_Int(){
int i;
for (i=0;i<160;i++) // 0 clear(160byte)
EEPROM.write(i, 0);
for(i=0;i<Max_Chn;i++){
Fnc_Eep_Sav4(DEF_FRQ,Frq_Eep+i*4); // Frequency(7.05MHz)
Fnc_Eep_Sav4(DEF_STP,Stp_Eep+i*4); // Step(1kHz)
}
Fnc_Eep_Sav4(DEF_OSC,Osc_Eep); // OSC(50.0Mhz)
Fnc_Eep_Sav4(DEF_IF,If_Eep); // IF(10.7MHz)
EEPROM.write(Vfo_Eep,DEF_VFO); // Vfo Mode
for(i=0;i<Max_Chn;i++) // Multiplied
EEPROM.write(Mul_Eep+i,DEF_MUL); // (x1)
EEPROM.write(Eep_Int,Int_End); // Init end set(73)
}
//---------- Function EEPROM Read ---------
void Fnc_Eep_Rd(){
if((0 <= Byt_Chn) && (Byt_Chn < Max_Chn))
Vfo_Dat = Fnc_Eep_Lod4(Frq_Eep+Byt_Chn*4);
else{
Vfo_Dat = Fnc_Eep_Lod4(Frq_Eep+0*4);
Byt_Chn = 0;
}
if((0 <= Byt_Chn) && (Byt_Chn < Max_Chn))
Enc_Stp = Fnc_Eep_Lod4(Stp_Eep+Byt_Chn*4);
else
Enc_Stp = Fnc_Eep_Lod4(Stp_Eep+0*4);
Byt_Mul = EEPROM.read(Mul_Eep+Byt_Chn);
Byt_Vfo = EEPROM.read(Vfo_Eep);
}
//---------- Function EEPROM Write ---------
void Fnc_Eep_Wt(byte chn){
if((0 <= chn) && (chn < Max_Chn)){
Fnc_Eep_Sav4(Vfo_Dat,Frq_Eep+chn*4);
Fnc_Eep_Sav4(Enc_Stp,Stp_Eep+chn*4);
}
EEPROM.write(Chn_Eep,chn);
}
//---------- Function Band ---------
void Fnc_Band(){
if((Vfo_Dat >= LW_VFO80) && (Vfo_Dat <= HI_VFO80))
Flg_Over = 0;
else if((Vfo_Dat >= LW_VFO40) && (Vfo_Dat <= HI_VFO40))
Flg_Over = 0;
else if((Vfo_Dat >= LW_VFO20) && (Vfo_Dat <= HI_VFO20))
Flg_Over = 0;
else if((Vfo_Dat >= LW_VFO15) && (Vfo_Dat <= HI_VFO15))
Flg_Over = 0;
else if((Vfo_Dat >= LW_VFO10) && (Vfo_Dat <= HI_VFO10))
Flg_Over = 0;
else if((Vfo_Dat >= LW_VFO6) && (Vfo_Dat <= HI_VFO6))
Flg_Over = 0;
else if((Vfo_Dat >= LW_VFO2) && (Vfo_Dat <= HI_VFO2))
Flg_Over = 0;
else
Flg_Over = -1;
}
//---------- Function Multi ---------
void Fnc_Mul(){
if(Flg_Ent == 0){
if(Flg_Mul == 0){
Byt_Mul = EEPROM.read(Mul_Eep+Byt_Chn);
Flg_Mul = 1;
}
else
Flg_Mul = 0;
}
else
Byt_Vfo++;
EEPROM.write(Mul_Eep+Byt_Chn,Byt_Mul);
while(digitalRead(SW_MUL) == LOW)
;
}
//---------- Function Rit ---------
void Fnc_Rit(){
if(Flg_Rit == 0){
Rit_Dat = 0;
Flg_Rit = 1;
}
else
Flg_Rit = 0;
while(digitalRead(SW_RIT) == LOW)
;
}
0 件のコメント:
コメントを投稿