Hi everyone.
After many years of working in the commercial two way radio field and cellular communications field I went it alone and got interested in the hobby of radio again. I basically lost interest due to some of the cb’ers getting rowdy once again. I had issues with people wanting me to do work that was not really permitted and left the field and am now doing software and hardware development for my own company Evione Electronics. By the way if you are wanting any test gear or electronics hobby stuff my store will be online pretty soon at www.evione.co.za/cart
Anyway onto the topic of this post. My Channel selector. Lefts start with taking the most common Arduino the Arduino Uno.
In the above image you can see how to connect the LCD and parts together. Now a quick description.
The LCD is connected as such but this can be changed if need be.
The Pin 11 or TX/RX sense pin basically reads the logic level of the pin. If it is high TX is displayed on the LCD if Low then RX is displayed. The two switches that switch pins 2 and 3 high when pressed are your channel up down buttons. The two blue rectangles are in fact 10k resistors to ground.
Just make sure you keep A0 open for your voltage sense from PSU. You can work out the resistors needed for simple voltage divider and please ensure that A0 does not receive more than 5v off this divider. Below is how to work it out. If you get stuck let me know.
Below you will find the Arduino Source code or sketch for this project. I have made improvements to this design and sketch but for the sake of keeping it simple Ill do just that. Keep it simple. Now I have just simplified and tested this code in one of my superbase radio’s and it works perfectly.
Please note however that the digital control pins are all set to logic 1 in this sketch to force you to work out your own PLL truth table as they all differ. Then all you would do is change the logic levels of each pin to set the PLL to that frequency. If you need help with this let me know but I am assuming that if you are doing this then you at least have an idea of what I’m talking about.
Ill try to comment the code below so that you can see what it is for and understand.
--------------------------------------------------------------------------------------------------------------------
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, A1, A2, A3, A4, A5); // setting pins for LCD
int analogInput = 0;
float vout = 0.0;
float vin = 0.0;
float R1 = 100000.0; // resistance of R1
float R2 = 10000.0; // resistance of R2
int value = 0;
const int lamp = 10;
int D0 = 4;
int D1 = 5;
int D2 = 6;
int D3 = 7;
int D4 = 8;
int D5 = 9;
int D6 = 10;
int val = 0;
int inPin = 11;
const int upPin = 2;
const int downPin = 3;
int lastChannel = 27;
int Channel;
int up;
int down;
void setup(){
pinMode(analogInput, INPUT);
pinMode(up, INPUT);
pinMode(down, INPUT);
pinMode(inPin, INPUT);
pinMode(D0, OUTPUT);
pinMode(D1, OUTPUT);
pinMode(D2, OUTPUT);
pinMode(D3, OUTPUT);
pinMode(D4, OUTPUT);
pinMode(D5, OUTPUT);
pinMode(D6, OUTPUT);
analogWrite(lamp, 100);
lcd.begin(20, 4);
lcd.setCursor(0, 0);
lcd.print(" CB Radio ");
lcd.setCursor(0, 1);
lcd.print(" Ver 1.0 ");
delay(4000);
lcd.clear();
}
void loop(){
Channel = lastChannel;
up = digitalRead(upPin);
down = digitalRead(downPin);
if (up == HIGH) {
Channel = Channel++;
}
if (down == HIGH) {
Channel = Channel--;
}
if (Channel > 40){ // This bit of code keeps the channels to within 40
Channel = 40;
}
if (Channel < 2){
Channel = 1;
}
switch (Channel){
case 1:
digitalWrite(D0, HIGH); // The below D0 to D6 is where truth table comes in.
digitalWrite(D1, HIGH); // You would have to work out your PLL truth table
digitalWrite(D2, HIGH); // and allocate the correct logic levels to each pin
digitalWrite(D3, HIGH); // of your PLL chip by changing the HIGH to LOW and
digitalWrite(D4, HIGH); // vica verca.
digitalWrite(D5, HIGH); //
digitalWrite(D6, HIGH); // For more help email info@evione.co.za
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.015.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 001 ");
break;
case 2:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.025.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 002 ");
break;
case 3:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.035.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 003 ");
break;
case 4:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.045.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 004 ");
break;
case 5:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.055.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 005 ");
break;
case 6:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.065.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 006 ");
break;
case 7:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.075.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 007 ");
break;
case 8:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.085.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 008 ");
break;
case 9:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.095.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 009 ");
break;
case 10:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.105.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 010 ");
break;
case 11:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.115.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 011 ");
break;
case 12:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.125.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 012 ");
break;
case 13:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.135.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 013 ");
break;
case 14:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.145.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 014 ");
break;
case 15:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.155.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 015 ");
break;
case 16:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.165.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 016 ");
break;
case 17:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.175.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 017 ");
break;
case 18:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.185.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 018 ");
break;
case 19:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.195.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 019 ");
break;
case 20:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.205.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 020 ");
break;
case 21:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.215.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 021 ");
break;
case 22:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.225.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 022 ");
break;
case 23:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.235.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 023 ");
break;
case 24:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.245.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 024 ");
break;
case 25:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.255.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 025 ");
break;
case 26:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.265.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 026 ");
break;
case 27:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.275.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 027 ");
break;
case 28:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.285.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 028 ");
break;
case 29:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.295.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 029 ");
break;
case 30:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.305.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 030 ");
break;
case 31:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.315.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 031 ");
break;
case 32:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.325.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 032 ");
break;
case 33:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.335.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 033 ");
break;
case 34:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.345.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 034 ");
break;
case 35:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.355.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 035 ");
break;
case 36:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.365.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 036 ");
break;
case 37:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.375.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 037 ");
break;
case 38:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.385.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 038 ");
break;
case 39:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.395.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 039 ");
break;
case 40:
digitalWrite(D0, HIGH);
digitalWrite(D1, HIGH);
digitalWrite(D2, HIGH);
digitalWrite(D3, HIGH);
digitalWrite(D4, HIGH);
digitalWrite(D5, HIGH);
digitalWrite(D6, HIGH);
lcd.setCursor(0, 0);
lcd.print(" HF Frequency ");
lcd.setCursor(0, 1);
lcd.print(" 27.405.000 Mhz ");
lcd.setCursor(0, 2);
lcd.print(" Channel 040 ");
break;
}
lastChannel = Channel;
val = digitalRead(inPin);
if (val == HIGH) {
lcd.setCursor(0, 3);
lcd.print("* TX *");
}
else
{
lcd.setCursor(0, 3);
lcd.print("* RX *");
}
value = analogRead(analogInput);
vout = (value * 5.0) / 1024.0;
vin = vout / (R2/(R1+R2));
if (vin<0.09) {
vin=0.0;
}
lcd.setCursor(7, 3);
lcd.print("Volt: ");
lcd.print(vin);
delay(200);
}
-------------------------------------------------------------------------------------------------------------------
If you copy and paste the above code into the Arduino IDE it will compile with ease and run perfectly. You however have to get your logic truth table calculated by opening up your radio and measuring the logic levels of your pll input pins per frequency. Then work backwards to work out the formula and calculate and add whatever you want or need .
Please note that if you are a Ham operator you can stretch some of these radios well into the ham bands using this little project so please KEEP IT LEGAL.
I will not be held responsible for any illegal use of this blog post to use bands that you are not entitled or licenced to use.
Have fun and enjoy. If you get stuck email me at info@evione.co.za and ill help you out. If you are needing any of the hardware listed above I can also help there.
Please note that you may have to re-align your radio for wide banding if you are turning it into a ham rig or such. but im sure you already knew that.
Till later
Dionne