Keyboard Shortcuts
Likes
Search
Fixing the galloping VFO problem
KE0OG
The VFO's "feature" of galloping up or down in 10kHz increments when the Raduino's VFO pot hits the stop is driving me crazy. I made a fix, picture attached 73, Dave, KE?OG, youtube.com/davidcasler |
Bad link to YouTube video. Roy WA0YMH On Mar 17, 2017 4:40 PM, "KE0OG" <casler28@...> wrote:
|
toggle quoted message
Show quoted text
On Mar 17, 2017, at 7:23 PM, Roy Appleton <twelveoclockhigh@...> wrote:
|
Thanks, that one worked. Roy WA0YMH On Mar 17, 2017 7:31 PM, "Art Olson" <olson339@...> wrote:
|
You have to remove the stop at the end of the link!
toggle quoted message
Show quoted text
At 18-03-2017, you wrote:
Bad link to YouTube video. |
These two sections of code are between line 530 and 550 and have two changes to slow down how fast it runs through the band when the knob is at the extreme ends. And steps by 5khz instead of 10khz so you don't miss anything. The first two lines to change in both sections are "delay(250);" I changed it from 200 to 250 to slow it down. Some people might like a delay of 300 miliseconds better with the addition of 5khz steps. The next two lines to change are "baseTune = baseTune - 5000l;" I changed it from 10000I to 5000I to make it scan by 5khz instead of 10khz. And that is a capital i at the end of the number. Just change the 10 to 5 and save it under a name like "Radiono2". Be sure to keep your original sketch safe so you can restore it if you don't like it. ? // the knob is fully on the low end, move down by 10 Khz and wait for 200 msec ?if (knob < 10 && frequency > LOWEST_FREQ) { ? ? ? baseTune = baseTune - 5000l; ? ? ? frequency = baseTune; ? ? ? updateDisplay(); ? ? ? setFrequency(frequency); ? ? ? delay(250); ? }? ? ? // the knob is full on the high end, move up by 10 Khz and wait for 200 msec ? else if (knob > 1010 && frequency < HIGHEST_FREQ) { ? ? ?baseTune = baseTune + 5000l;? ? ? ?frequency = baseTune + 50000l; ? ? ?setFrequency(frequency); ? ? ?updateDisplay(); ? ? ?delay(250); ? } |
Jack Purdum
John: I don't think your statement: ????And that is a capital i at the end of the number.? is correct.?If I look at the code, I find the definition of baseTune to be: unsigned long baseTune = ?7100000L; // a few lines later... long frequency, stepSize=100000; So the data suffix is an 'L' (el) not an I (eye). The more common style to write that block is: ?if (knob < 10 && frequency > LOWEST_FREQ) { ? ? ? baseTune -= 10000L; ? ? ? frequency = (long) baseTune; ? ? ? updateDisplay(); ? ? ? setFrequency(frequency); ? ? ? delay(200); ? }? ? // the knob is full on the high end, move up by 10 Khz and wait for 200 msec ? else if (knob > 1010 && frequency < HIGHEST_FREQ) { ? ? ?baseTune += 10000L;? ? ? ?frequency = (long) (baseTune + 50000L); ? ? ?setFrequency(frequency); ? ? ?updateDisplay(); ? ? ?delay(200); ? } The original code has a lowercase 'L' at the end of the numbers, not an i, which is why no error is given. Technically, the type specifier at the end of the definition of baseTune should be UL, since it is an unsigned long. That would also mean that a cast should be used on the assignment into frequency. However, in this case, it does not impact the result but does serve to document the two data types. Jack, W8TEE From: John Smith via Groups.Io <johnlinux77@...> To: BITX20@groups.io Sent: Wednesday, March 22, 2017 10:16 PM Subject: Re: [BITX20] Fixing the galloping VFO problem These two sections of code are between line 530 and 550 and have two changes to slow down how fast it runs through the band when the knob is at the extreme ends. And steps by 5khz instead of 10khz so you don't miss anything. The first two lines to change in both sections are "delay(250);" I changed it from 200 to 250 to slow it down. Some people might like a delay of 300 miliseconds better with the addition of 5khz steps. The next two lines to change are "baseTune = baseTune - 5000l;" I changed it from 10000I to 5000I to make it scan by 5khz instead of 10khz. And that is a capital i at the end of the number. Just change the 10 to 5 and save it under a name like "Radiono2". Be sure to keep your original sketch safe so you can restore it if you don't like it. ? // the knob is fully on the low end, move down by 10 Khz and wait for 200 msec ?if (knob < 10 && frequency > LOWEST_FREQ) { ? ? ? baseTune = baseTune - 5000l; ? ? ? frequency = baseTune; ? ? ? updateDisplay(); ? ? ? setFrequency(frequency); ? ? ? delay(250); ? }? ? ? // the knob is full on the high end, move up by 10 Khz and wait for 200 msec ? else if (knob > 1010 && frequency < HIGHEST_FREQ) { ? ? ?baseTune = baseTune + 5000l;? ? ? ?frequency = baseTune + 50000l; ? ? ?setFrequency(frequency); ? ? ?updateDisplay(); ? ? ?delay(250); ? } |
Jack Purdum
I agree, it does look like an uppercase 'I', which is why I always use an uppercase 'L' instead of a lowercase 'l'. Indeed, I'm not even sure the code would compile with an uppercase 'I'.? As to my unit not being assembled, that's actually not quite correct. I did have it assembled some time ago and it worked as specified. However, I prefer a more conventional tuning method and a better display. So, I've added the TFT display (see picture) and a custom PCB that holds the display and a Mega 2560 Pro Mini. I needed the larger uC because of the graphics. Dennis (W6DQ) and I are working on adding an RF-chain AGC, which will also drive the S meter (RF, not audio), CW mode, a capacitive touch keyer so you don't need to drag a set of paddles along on a SOTA trip, a rotary encoder for tuning and the menuing system you see in the picture. I've added 3 NO pushbutton switches on the case which at tied to the 3 menu boxes at the top of the display. If you look, you will see that SW1-SW3 are currently tied to messages 1-3. The first message is shown at the bottom of the screen (MSG: CQ...). So, when you press switch 1, the xmtr sends the CQ message. The user can select from 50 different messages at runtime. It also monitors input (battery) voltage. The keyer is currently set for 15WPM and, the last field on the display, shows that, if you are operating a 7.024MHz, you are in the CW segment for the Extra class license. Everything on the screen can be changed at runtime via the menuing system. Another complicating factor in reassembling the rig was the tornado that went through Cincinnati two weeks ago leaving my workshop with 6" of water in it. So, next time you want to take a swing at me, walk in my shoes for a few steps first. Jack, W8TEE From: John Smith via Groups.Io <johnlinux77@...> To: BITX20@groups.io Sent: Wednesday, March 22, 2017 11:26 PM Subject: Re: [BITX20] Fixing the galloping VFO problem Alright then. "I" thought it looked like an i.? But it's just the numbers I changed to get the results. If you ever get yours assembled, you might like it.
|
"So, next time you want to take a swing at me, walk in my shoes for a few steps first."
Easy, guys. Granted, JS isn't the sweetest personality in the world. but he is hardly responsible for an Act of God. Following this line further might see you both cast into "L". Civilized sensibility always works better, I guess. Advocacy is for lawyers; they argue a lot. Most of the rest of us just say "Oh...right", and let it drop. Point made. K&R Standard C uses L for unsigned long. Over the years, WINAVR has been taught that two binary versions exist. Ascii l is not Ascii i; the compiler knows the difference, and uses both L and l indiscriminately as long as the context is right. It's really a pain in the neck, but there you are...Welcome to C++. john AD5YE |
Simon Rumble
Thanks for this Dave. I initially thought "why solve this with hardware" but when I saw your solution it makes quite a bit of sense. There are also software changes to turn the pot into a shuttle tuner too, which you might want to try out. Me, I still haven't soldered my BitX up yet. Hoping I can get that done this weekend. Then I need an antenna. It's a long list before I get on the air! On Sat, 18 Mar 2017 at 08:40 KE0OG <casler28@...> wrote:
|
You couldn't handle my shoes either. And I won't take them off here. I saw this picture of a 49er CW kit project on another website that has nothing to do with BITX. I thought you might like to see it.
Are you sure you have a BITX 40 board in there somewhere? And you swung first. Just let people try the changes without attacking it and me. And keep it fun. it's just a hobby. 73 |
Jack Purdum
From: John Backo via Groups.Io <iam74@...> To: BITX20@groups.io Sent: Thursday, March 23, 2017 12:18 AM Subject: Re: [BITX20] Fixing the galloping VFO problem "So, next time you want to take a swing at me, walk in my shoes for a few steps first." Easy, guys. Granted, JS isn't the sweetest personality in the world. but he is hardly responsible for an Act of God. I didn't say he was. In his second post, he assumed I've never had the rig working in the first place. My followup post was simply trying to explain why my board is apart at the present time: 1) I'm adding a lot of new functionality to it, and 2) the tornadoes forced me to literally take my office and shack apart to the bare walls, further slowing my development work down. Had he asked, I could have told him that I assembled the board without problem just to make sure I had a functional baseline for the main board before I started adding new circuitry to it. It's a prudent path to take anytime one tries to enhance existing hardware.? Following this line further might see you both cast into "L". Civilized sensibility always works better, I guess. Advocacy is for lawyers; they argue a lot. Most of the rest of us just say "Oh...right", and let it drop. Point made. All I was trying to point out in my first post was that the information he gave was wrong. If you try to compile code that uses an 'i' data suffix in even the most basic context: ? ?long frequency; ? ?frequency = 7000000I; the error message is: ????sketch_mar22a:5: error: cannot convert '__complex__ long int' to 'long int' in assignment There are a lot of members in this group who are just getting started with software and coding. If you implemented his change and got the above error message, does a beginning coder know how to interpret that error message? My guess is that many might?get discouraged, thinking they did something wrong when in fact they did not. You can chose to ignore the warning, but I wonder how they react when they see the dreaded orange "error:" on their screens. The last thing I want a beginner to do is give up. K&R Standard C uses L for unsigned long.? Actually, K&R C and C++ both use 'U' or 'u' ?for unsigned long and 'L' or 'l' for long.? Over the years, WINAVR? has been taught that two binary versions exist. Ascii l is not Ascii i; the compiler knows the difference, and uses both L and l indiscriminately as long as the context is right. It's really a pain in the neck, but there you are...Welcome to C++. You're right, in the Raduino code, the context is correct so the underlying Gnu C++ does a silent cast on such expressions. BTW, there is no 'i' data suffix in either C or C++. My concern was that his statement: ? ? ? ? ? ?And that is a capital i at the end of the number.? could cause some problems down the road if the person tries to use that suffix in an expression where the compiler can't figure out the context. Learning something new like programming is enough of a challenge even with the correct information. john AD5YE |
It's great that people contribute to this project but everyone needs to be able to take some criticism to ensure the information they present is accurate! We have enough of a problem with folks passing something along and then five minutes or five days later post a follow-up post attempting to correct all their mistakes with some lame excuse of being sleep deprived, etc! Roy, WA0YMH On Mar 23, 2017 7:44 AM, "Jack Purdum via Groups.Io" <econjack=yahoo.com@groups.io> wrote:
|
Jack Purdum
See below. Jack, W8TEE From: John Smith via Groups.Io <johnlinux77@...> To: BITX20@groups.io Sent: Thursday, March 23, 2017 12:41 AM Subject: Re: [BITX20] Fixing the galloping VFO problem You couldn't handle my shoes either. And I won't take them off here. I saw this picture of a 49er CW kit project on another website that has nothing to do with BITX. I thought you might like to see it. The URL isn't working right now, but I probably have seen the photos since I created the SoftwareControlledHamRadio user group and am its moderator. Are you sure you have a BITX 40 board in there somewhere? Yep. And you swung first. Nope, just responding to your comment that I hadn't built the BITX40. Just let people try the changes without attacking it and me. I wasn't attacking anyone. I was just trying to head off potential frustration and problems down the road. And keep it fun. it's just a hobby. Agreed. 73
|
College Professor Simon Thompson
开云体育Hi JackI cannot wait to see the final product! The screen looks great, and I am sure your hardware and software additions will make the Bitx40 more flexible. Can you let us all know when you get the work complete?
|
Jack Purdum
Hi Simon: Sure. I am presenting the talk "Give Your QRP Rig a Facelift" at the FDIM conference just before the Dayton hamfest. I should have a working Beta version there for the talk. Everything will be Open Source for anyone who wants to use it. Jack, W8TEE From: College Professor Simon Thompson <nwccenglishprofessor@...> To: BITX20@groups.io Sent: Thursday, March 23, 2017 10:48 AM Subject: Re: [BITX20] Fixing the galloping VFO problem Hi Jack I cannot wait to see the final product! The screen looks great, and I am sure your hardware and software additions will make the Bitx40 more flexible. Can you let us all know when you get the work complete?
|
College Professor Simon Thompson
开云体育Are you an engineer by training or by avocation??Good luck with your talk, and I look forward to seeing how you have accomplished your “facelift” goal.
|
Jack Purdum
Funny thing...my Ph.D. is in economics. I discovered in the late 1970's that I loved programming and started a software company that wrote and marketed C compilers and other programming tools for MSDOS and Windows. I ended up teaching programming courses at Purdue until I retired in 2009. So my contribution to projects is in the software end of things, but I've been lucky to find hams who are super-smart EE types. Dennis Kidder (W6DQ) is the brains behind the Forty-9er mods in the?QST?article (and co-author of the Arduino Projects for Amateur Radio book) and is doing the circuitry for the "face lift" article. Farrukh Zia (K2ZIA) did the antenna analyzer (AA) mods of Dennis' work for the PCB sold by QRPGuys.com. (An article on the AA has been accepted by QST.) Anyway, I guess that's the long answer for "avocation". ?:>) Jack, W8TEE From: College Professor Simon Thompson <nwccenglishprofessor@...> To: BITX20@groups.io Sent: Thursday, March 23, 2017 10:59 AM Subject: Re: [BITX20] Fixing the galloping VFO problem Are you an engineer by training or by avocation?? Good luck with your talk, and I look forward to seeing how you have accomplished your “facelift” goal.
|