Skip to content

Instantly share code, notes, and snippets.

@dwhacks

dwhacks/Test_LPF.ino

Created Apr 19, 2020
Embed
What would you like to do?
Test_LPF.ino
//BCD to Decimal Test sketch by VE7DNT
const int A = 4; //pin numbers
const int B = 5;
const int C = 6;
const int D = 7;
void setup() {
// put your setup code here, to run once:
pinMode(A, OUTPUT); //Set pins to outputs
pinMode(B, OUTPUT);
pinMode(C, OUTPUT);
pinMode(D, OUTPUT);
digitalWrite(A, LOW);
digitalWrite(B, LOW);
digitalWrite(C, LOW);
digitalWrite(D, LOW);
Serial.begin (9600); //USB Serial port
delay (1000); //delay to let seial connect
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(A, LOW);
digitalWrite(B, LOW);
digitalWrite(C, LOW);
digitalWrite(D, LOW);//Q0 high
Serial.println("LPF Q0"); //tell in serial monitor whats going on
delay (5000); //Hold for 5 seccond
digitalWrite(A, HIGH);
digitalWrite(B, LOW);
digitalWrite(C, LOW);
digitalWrite(D, LOW); //1.5mhz Q1 high
Serial.println("LPF Q1"); //tell in serial monitor whats going on
delay (1000); //Hold for 1 sec
digitalWrite(A, LOW);
digitalWrite(B, HIGH);
digitalWrite(C, LOW);
digitalWrite(D, LOW); //3.5 mhz Q2 high
Serial.println("LPF Q2"); //tell in serial monitor whats going on
delay (1000); //Hold for 1 sec
digitalWrite(A, HIGH);
digitalWrite(B, HIGH);
digitalWrite(C, LOW);
digitalWrite(D, LOW); //7 Mhz Q3 High
Serial.println("LPF Q3"); //tell in serial monitor whats going on
delay (1000); //Hold for 1 sec
digitalWrite(A, LOW);
digitalWrite(B, LOW);
digitalWrite(C, HIGH);
digitalWrite(D, LOW); //10Mhz Q4 high
Serial.println("LPF Q4"); //tell in serial monitor whats going on
delay (1000); //Hold for 1 sec
digitalWrite(A, HIGH);
digitalWrite(B, LOW);
digitalWrite(C, HIGH);
digitalWrite(D, LOW); //14Mhz Q5 High
Serial.println("LPF Q5"); //tell in serial monitor whats going on
delay (1000); //Hold for 1 sec
digitalWrite(A, LOW);
digitalWrite(B, HIGH);
digitalWrite(C, HIGH);
digitalWrite(D, LOW); //18Mhz
Serial.println("LPF Q6"); //tell in serial monitor whats going on
delay (1000); //Hold for 1 sec
digitalWrite(A, HIGH);
digitalWrite(B, HIGH);
digitalWrite(C, HIGH);
digitalWrite(D, LOW); //21Mhz
Serial.println("LPF Q7"); //tell in serial monitor whats going on
delay (1000); //Hold for 1 sec
digitalWrite(A, LOW);
digitalWrite(B, LOW);
digitalWrite(C, LOW);
digitalWrite(D, HIGH);//24.5mhz
Serial.println("LPF Q8"); //tell in serial monitor whats going on
delay (1000); //Hold for 1 sec
digitalWrite(A, HIGH);
digitalWrite(B, LOW);
digitalWrite(C, LOW);
digitalWrite(D, HIGH); //28Mhz
Serial.println("LPF Q9"); //tell in serial monitor whats going on
delay (1000); //Hold for 1 sec
} //END Loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.