¿ªÔÆÌåÓý

Date

Re: 45Mhz crystal filter specification

 

The SA with a TG is a massively useful tool for RF work.? The only thing better and more costly would
be VNA as they can give you phase and amplitude or R+Jx.? ?Even then you can fake it with the TG
with the right jigs, its just more time consuming.

Not sure depending on the code being used, but whatever it takes to get the LO
to exactly 45mhz.

Sweeping with the SA is easier and can be more informative.? ?

Yes, the next few weeks will be:
Getting garden ready
Getting ready for the ARRL VHF/UHF contest.
Getting set for Field Day
? ? ? ? ? ? ? ? ? ? and mowing the lawn.

And building things.

Allison


Re: ND6T AGC implementation for uBIT-X

 

For portable ops, I use a resonant antenna.
Does not need a tuner.
But I still want to know if it's working properly.
?
Jerry


On Sun, May 6, 2018 at 01:24 pm, Tim Gorman wrote:
You still need an antenna tuner. The SWR meter is kind of useless
without one.

I'm want to be able to operate for at least 48-72 hours. I'm figuring
you need at least a 36-50 amp-hour battery to be self-sufficient.


Re: Designing a front panel PCB

 

¿ªÔÆÌåÓý

Hi Arv,

I have a CNC mill and it's great for one off PCBs. I'm currently converting it to GRBL and Chilipeppr when I get the time.

I have a couple of boxes I can use for the uBIXT. One is the BangGood EF01 and I was going to use the mill to cut the hole for the display. As the mill is down at the minute, I got to think about a professional PCB house and a black PCB all routed and silk screened. A quick check on sizes gave a ?10 ($14) price tab each if 10 were ordered - shipping not included - maybe there is better out there, not something I have done before.

That seemed to be a bit of a waste of the reverse side, so why not use it of add-on circuits.
I think the cost of profession PCBs for the other sides may made a box more expensive than some of the metal boxes out there.

Cheers

Reid Gi8TME/Mi0BOT?

On 06/05/2018 18:18, Arv Evans wrote:

Reid Gi8TME/Mi0BOT

Your idea for front and rear panel circuits is interesting, especially for those who
have a CNC Mill that is capable of routing printed (routed...?) circuit boards.?
There might even be a small business potential for such people because they
can make one-off custom boards for each customer.? Also might be interesting for
someone to publish CAD drawings for typical front and rear panels with the idea
that customers would edit these drawings and submit them to a person with
CNC Milling capability to make the boards.? There are several CNC driver
programs available on-line so that the customer could see his/her boards being
machined in simulation mode before they are submitted for manufacturing.

But, why stop with just machined front and rear panels.? Why not machine SMD
circuits into chassis side, top, and bottom panels, making the chassis the actual
circuit board.

Arv K7HKL

_._


Re: Designing a front panel PCB

Joe Puma
 

¿ªÔÆÌåÓý

I think I saw a front panel pcb being used. With the function buttons and audio in and out. ?Think someone posted it to this group?

Btw, hey Atouk!!!!

Joe
KD2NFC?



On May 6, 2018, at 4:46 PM, atouk <atouk@...> wrote:

Why stop at just the front panel?

A complete case could be laid out with matching pads at the edges to solder the boards together to make a complete box with custom silkscreening for the proper labels on the front and back, uBITX logos on the sides (is there an official logo?) and a board layout graphic on the top with board sections labeled by function.


On 5/6/2018 11:44 AM, Reid Campbell wrote:
Hi,

I was wondering if anybody had consider designing a PCB which could be used as a front panel for the uBITX? The PCB vendor would be able to route the rectangle for the display and the holes for the volume, encoder and audio connections. I know, what size to pick would be a problem but make the design so it could be adapted for several cases.

Silk screen could be used for the labels and it would look very profession. Now, here the big advantage. On the reverse side you could put SMD designs. There are lots of PCBs being done at the minute, but many of them could be incorporated on the reverse of the front panel.

In stead of rats nest wiring to all the controls, tracks could be place to just beside the controls and short jumper wires from the tracks to the control. As the audio would be available, there is the possibility for DSP by adding a Teensy or a Red/Blue Pill using surface mounted headers. I think you can see where I'm going with this.

There are a lot of really talented designer who are already producing PCBs and maybe it's a big ask to do this. Maybe it could be a cooperative venture for a couple of designers?

Then, don't stop there - there always the back panel with SWR bridges, tuners etc, and use the copper as a heat sink for the finals in to the bargain.?

Cheers

Reid Gi8TME/Mi0BOT





Re: DISASTER !!

 

Thanks, guys !!


Re: BITX QSO Afternoon/Evening, Sunday, May 6, 3PM & 7PM Local Time, 7277 kHz in North America, 7177 kHz elsewhere.

 

make that "belcher" ...i hate spell check

don


Looking for Bitx 20 version 3b using the radiuno #bitx20 #radiuno

 

I am confused and seem to exhaust all the internet searches - as I have looked and looked for guide to modify the bitx 20 version 3b to use the radiuno.

I would like the ardunio INO code file for use on my Bitx20 -

I been looking and looking and thought someone had a guide or somthing to convert the bitx 20 3b with Radiuno.?

I have look I thought I had this on the Yahoo group it may have not got transfer to the new group?

My computer crashed and lost the hard drive looking for the code.. and modifications.?

I think I need the Radiuno to tune?4.0 to 4.35 mhz?

can some one help me with code and modification to the bitx 20m version 3b??


Re: BITX QSO Afternoon/Evening, Sunday, May 6, 3PM & 7PM Local Time, 7277 kHz in North America, 7177 kHz elsewhere.

 

?i got a station at 7275 with his "Chatty Cathy CQ bleacher" calling CQ every 5 seconds. .I can't hear anything else.

don ..


Re: Designing a front panel PCB

 

¿ªÔÆÌåÓý

Why stop at just the front panel?

A complete case could be laid out with matching pads at the edges to solder the boards together to make a complete box with custom silkscreening for the proper labels on the front and back, uBITX logos on the sides (is there an official logo?) and a board layout graphic on the top with board sections labeled by function.


On 5/6/2018 11:44 AM, Reid Campbell wrote:

Hi,

I was wondering if anybody had consider designing a PCB which could be used as a front panel for the uBITX? The PCB vendor would be able to route the rectangle for the display and the holes for the volume, encoder and audio connections. I know, what size to pick would be a problem but make the design so it could be adapted for several cases.

Silk screen could be used for the labels and it would look very profession. Now, here the big advantage. On the reverse side you could put SMD designs. There are lots of PCBs being done at the minute, but many of them could be incorporated on the reverse of the front panel.

In stead of rats nest wiring to all the controls, tracks could be place to just beside the controls and short jumper wires from the tracks to the control. As the audio would be available, there is the possibility for DSP by adding a Teensy or a Red/Blue Pill using surface mounted headers. I think you can see where I'm going with this.

There are a lot of really talented designer who are already producing PCBs and maybe it's a big ask to do this. Maybe it could be a cooperative venture for a couple of designers?

Then, don't stop there - there always the back panel with SWR bridges, tuners etc, and use the copper as a heat sink for the finals in to the bargain.?

Cheers

Reid Gi8TME/Mi0BOT





Re: Coding styles

Jack Purdum
 

Absolutely agree. Some of us can't remember what we had for breakfast, let alone code we wrote six months ago. I've actually read code on line and said to myself: "I get it!" only to realize it was my code.

Jack, W8TEE


On Sunday, May 6, 2018, 4:36:36 PM EDT, Tim Gorman <tgorman2@...> wrote:


A man after my own heart!

When you are called in to fix a problem with your code two years after
you wrote it then it becomes apparent quickly that simpler is better.

It's why I always put the "{" on the line following the if statement. I
can print the code out, put a ruler on the printout and tick off all
the beginnings and ends of sections. I know the current preferred method
is to put the starting "{" on the same line as the if statement (or any
other thing you can think of) but I've just had much quicker success
finding problems doing it my way. Especially when someone else has been
modifying my code.

Same with the paragraph comment indicators, /* and */. Always on a line
of their own.

tim ab0wr

On Sun, 6 May 2018 18:09:21 +0000 (UTC)
"Jack Purdum via Groups.Io" <jjpurdum=[email protected]> wrote:

> (Actually, it's the post-decrement operator, not the decrement
> operator.) I wasn't saying I don't know what the post-decrement
> operator does, I was just asking why make the code harder to read by
> using it there. Moving it to the next line makes the code easier to
> read and has no impact on the way it works or the generated code.
> Anything the programmer can do to make the code easier to read and
> that is performance-neutral should be done. That's why I almost never
> use the ternary operator: It's almost always easier to read a simple
> if-else statement block and the generated code's the same.
>
> Jack, W8TEE
>?
>






Re: ND6T AGC implementation for uBIT-X

Vince Vielhaber
 

Ok, so Jerry doesn't write code the same way you do. Neither do I. Prolly why I didn't see anything wrong with it.

Vince.

On 05/06/2018 01:38 PM, Jack Purdum via Groups.Io wrote:
Well, not really. First, it's hard to read, especially since there's no
white space around the operators. Second, look at the generated code.
It's the same for:

while (div>0) {
if (d--==r) lcd.print('.');
lcd.print((val/div) + 0x30);
val = val%div;
div = div/10;
}

or

while (div > 0) {
d--;
if (d == r)
lcd.print('.');
lcd.print((val / div) + '0');
val = val % div;
div = div / 10;
}

yet, which is easier to read? Also, if you just happened to use a
pre-X3J11 compiler, the /if() /expression could be evaluated incorrectly
since the post decrement operator has higher precedence than the test
for equality. (True, the chances of that happening are pretty small, but
still non-zero.) Finally, why use the hex representation for zero when
'0' makes it easier to read? The indenting on the first example is
misleading, since a quick glance makes it appear that the second call to
the lcd object is controlled by the/if /expression, which it is not.
Also, whitespace makes it easier to read expressions and cost nothing,
so why not use it? You could also use the %= and /= operators, but that
makes the code harder to read and has no impact on the generated code.
Given a choice, I will always pick the form that is easier to read,
especially when there's no performance hit.

Jack, W8TEE


On Sunday, May 6, 2018, 1:22:15 PM EDT, Vince Vielhaber
<vev@...> wrote:


Places the decimal point. Actually pretty slick.

Vince.



On 05/06/2018 11:31 AM, Jack Purdum via Groups.Io wrote:
if (d--==r) lcd.print('.');

What??

Jack, W8TEE


On Sunday, May 6, 2018, 10:41:34 AM EDT, Jerry Gaffke via Groups.Io
<jgaffke@... <mailto:[email protected]>> wrote:


Here's my unproven code for displaying forward and reverse power in Watts
plus SWR on the bottom line of the 16x2 LCD, when using a TandemMatch
with diode detectors.
It's actually quite simple and not computationally expensive.. Hereby
released under GPL v3.0

Could be made more accurate by adding the schottky diode drop to the two
voltage readings.
Assuming the transformer turns ratios are kept at 10:1, the SWR should
be reasonably accurate
without calibration. Especially if a few uA of bias is added to the
diodes.
Power readings should be reasonably accurate if the SWR is close to 1:1
since they assume a 50 ohm load.

Maximum analogRead() return value is 1023, and represents a peak RF
voltage of 5 volts.
Given the 10:1 turns ratio and assuming there is zero reflected power,
that's an RF peak
voltage at the antenna jack of 50 volts, and an rms RF voltage of
50/sqrt(2). Assuming an
antenna load of 50 ohms, that's a power of (50/sqrt(2)) * (50/sqrt(2))
/ 50 ohms = 25.0 watts.
From this, we determine the value of PSCALE in the code below.

Using the linear-in-db ad8307 could be done with the same code, but
first using
a table lookup to convert to RF volts.
I don't really want to be computing anti-logs on a Nano.
A table lookup will burn some flash.

################################################################
// Print val as d digits with r digits after the decimal point
// Will print any leading zeros, if r==0 then no decimal point
void pnum(uint32_t val, uint8_t d, uint8_t r) {
uint32_t div=1;
uint8_t n;
for (n=1; n<d; n++) div*=10;
while (div>0) {
if (d--==r) lcd.print('.');
lcd.print((val/div) + 0x30);
val = val%div;
div = div/10;
}
}

// Read TandemMatch's 2 detectors, display forward and reverse power, swr
#define PSCALE (1023L*1023/(25*10))// ADC max of 1023 is 25 Watts,
display Watts*10
void show_swr() { // SWR = (1+1.0*vr/vf)/(1-1.0*vr/vf);
uint32_t vr, vf, swr;// Voltage squared proportional to power
vf = analogRead(RF_FWD);// Peak RF volts from forward detector
vr = analogRead(RF_REV);// Peak RF volts from reverse detector
if (vr>=vf) swr=0; // If vr,vf illegal, force SWR to zero
else {
swr = (vr*1024)/vf;// Voltage ratio, 10 fractional bits
swr = (1000*(1024+swr))/(1024-swr);// 1000*swr, nearly 10 fractional
bits
swr = (swr+50)/100;// 10*swr, rounded to nearest tenth
if (swr>99) swr=99; // Display a max SWR of 9.9
}
lcd.setCursor(0, 1);// Fill bottom LCD line, example:
lcd.print('f'); pnum(vf*vf/PSCALE,3,1);// "f12.4 r03.1 s1.7"
lcd.print('r'); pnum(vr*vf/PSCALE,3,1);// with fwd,rev power in watts
lcd.print('s'); pnum(swr,2,1);// and swr to max of 9.9
}
#################################################################

My primary reason not to mess with ad8307's is that they are harder to
dead bug.
If the timing skew between forward/reverse readings is an issue, I'd
definitely try the cap.
Likely still accurate enough.

Bill wrote:

58.6 KHz would be ok, but to get that rate probably assumes that the
processor is dedicated to the task, not off doing other uBITx work,


We currently use a blocking analogRead() in many places in the code,
each taking over 100us.
And in some cases do it constantly for stuff such as inspecting switches
or keyer paddles.
So speeding up the analogRead() by a factor of 5 and occasionally (once
per second?)
reading the forward and reverse power should not be much of a burden,
even if averaging
a half dozen reads.

Should be possible to set up the ADC to be interrupt driven, an
interrupt service
routine updates a list of all ADC readings. In mainline code, we'd then
disable interrupts
and read those last few forward and reverse readings to take an
average. Since we
are no longer blocking for each 100us+ analogRead(), this would be much
less a timing burden.

Things may eventually slow down too much for somebody trying to use the
keyer at 40wpm.
Otherwise I doubt there will be much of an issue with a lost millisecond
here and there.
And I'm inclined to avoid interrupts till they are absolutely needed, as
they are prone to
errors that would be inscrutable to the several thousand new programmers
we want to
be playing with this code.

Jerry, KE7ER


On Sat, May 5, 2018 at 10:45 pm, K9HZ wrote:

Hmmm¡­ we should probably take this off-line at this point. This has
to do with A/D resolution time vs. filter time.

I¡¯m rethinking¡­that diodes would be a better choice just because
they are less complicated. The transform to watts and SWR is still
complex though and will eat some processing power in a Nano.

--
Michigan VHF Corp.




--
Michigan VHF Corp.


Re: ND6T AGC implementation for uBIT-X

 

A man after my own heart!

When you are called in to fix a problem with your code two years after
you wrote it then it becomes apparent quickly that simpler is better.

It's why I always put the "{" on the line following the if statement. I
can print the code out, put a ruler on the printout and tick off all
the beginnings and ends of sections. I know the current preferred method
is to put the starting "{" on the same line as the if statement (or any
other thing you can think of) but I've just had much quicker success
finding problems doing it my way. Especially when someone else has been
modifying my code.

Same with the paragraph comment indicators, /* and */. Always on a line
of their own.

tim ab0wr

On Sun, 6 May 2018 18:09:21 +0000 (UTC)
"Jack Purdum via Groups.Io" <jjpurdum@...> wrote:

(Actually, it's the post-decrement operator, not the decrement
operator.) I wasn't saying I don't know what the post-decrement
operator does, I was just asking why make the code harder to read by
using it there. Moving it to the next line makes the code easier to
read and has no impact on the way it works or the generated code.
Anything the programmer can do to make the code easier to read and
that is performance-neutral should be done. That's why I almost never
use the ternary operator: It's almost always easier to read a simple
if-else statement block and the generated code's the same.

Jack, W8TEE


Re: ND6T AGC implementation for uBIT-X

 

OOPS forgot to mention - also in the "go bag" is a very early LDG auto tuner which is quite small and light weight. It has latching relays so once tuned, I can turn off power and not have to worry about it drawing any current until I need to make a major change in frequency.

Jim - W0EB

------ Original Message ------
From: "Tim Gorman" <tgorman2@...>
To: [email protected]
Sent: 5/6/2018 3:24:09 PM
Subject: Re: [BITX20] ND6T AGC implementation for uBIT-X

You still need an antenna tuner. The SWR meter is kind of useless
without one.

I'm want to be able to operate for at least 48-72 hours. I'm figuring
you need at least a 36-50 amp-hour battery to be self-sufficient.

tim ab0wr



On Sun, 06 May 2018 17:32:54 +0000
"Jim Sheldon" <w0eb@...> wrote:

Tim,
I have a "YouKits" digital QRP SWR/Wattmeter with a 2 amp hour LI-Ion
battery pack in it that just happens to be set up (by the factory) so
that you can pull the 12 volts out of the bottom via a coax power
connector and run your QRP rig. For short term ops, it a heck of a
lot lighter than a normal battery pack and it gives you SWR & power
as well and it reads to 25 watts on the power scale. Unless I happen
to be using it on the bench (rarely) it stays in my "Go bag" along
with the solar charger. I also have a small, 4 amp hour LiPo cell
phone charger pack with a built in 9 volt/12 volt switching supply as
well as the 5 volt USB charging output, that will run the SWR
Wattmeter & the rig at the same time that is about the size of my
cell phone and can also be charged off the solar panel. Between the
2, I have less than 1/2 a pound of weight (about the same as the
normal battery pack people carrry) and everything is well smaller
than the rig itself. Works for me.

Jim

------ Original Message ------




Re: SWR

 

I agree the I2C would be a lot slower.? You are better off using the ADC inputs directly and let it "free-run" (I use ADC6 and ADC7).? That way when you need to access the data, it's just a quick check of the "conversion complete flag" and grab the data from the registers.

On Sun, May 6, 2018 at 2:35 PM, K9HZ <bill@...> wrote:

We must use different libraries.? I send out the start conversion word to the part address¡­ and away it goes.? Then sometime later, ?I poll to see if conversion is ready/ do a read at the same time (because you get one or the other for free).? If the data isn¡¯t ready, throw away what you got back and go do something else.? If you test every quarter-second, you would always get the data and the ready bit set TRUE.? Then update the display.? Again, the time it takes to do the A/D conversion isn¡¯t important off-board as long as both power readings are congruent and ready together at some point.? The reads can be executed whenever convenient as not to interfere with keying, CAT commands, etc. without using interrupts.

?

With all this said, I support using a couple of caps and doing something really easy.? Maybe it works perfectly.

?

?

Dr. William J. Schmidt - K9HZ J68HZ 8P6HK ZF2HZ PJ4/K9HZ VP5/K9HZ PJ2/K9HZ

?

Owner - Operator

Big Signal Ranch ¨C K9ZC

Staunton, Illinois

?

Owner ¨C Operator

Villa Grand Piton ¨C J68HZ

Soufriere, St. Lucia W.I.

Rent it:

Like us on Facebook!

?

Moderator ¨C North American QRO Group at Groups.IO.

?

email:? bill@...

?

?

From: [email protected] [mailto:[email protected]] On Behalf Of Jerry Gaffke via Groups.Io
Sent: Sunday, May 6, 2018 1:54 PM
To: [email protected]
Subject: Re: [BITX20] SWR

?

You said
? >? goes on about its business for a while
That's not correct, unless you add some code to handle i2c transmit and receive in
interrupt routines.? That's some code most of us would prefer to avoid.

We currently do blocking IO on I2C reads and writes.
Just clocking all those I2C bits around at 100khz takes considerably more time than doing the embedded ADC reads.

I'm assuming we are mostly concerned about delaying other operations, such as sensing the keyer.

If all you are worried about is how synchronous the two samples are,
then yes the 2 channel ADC chip on the I2C bus would be better,
even if we stick with the blocking code on i2c access.
Me, I'll try out a couple big caps first.

Jerry

On Sun, May 6, 2018 at 10:50 am, K9HZ wrote:

¡°Actually, reading values from an A/D over the I2C bus will take more time than just reading from the Nano's embedded ADC.?¡°

?

Yes, but in this case, taking more time is ok¡­ because the Arduino commands the A/D to perform its function, goes on about its business for a while¡­the digitization happens independently of the Arduino processing, and the data will be waiting for you want to go get it.? There is no real demand on when the data needs to be available, it¡¯s more a demand of being synchronized (so it¡¯s statistically better to get the average of 5 good numbers rather than 50 marginal numbers).? And (for me the best part) you really can employ an A/D with synchronized S/H for good coordinated forward and reverse power.?

?

I really don¡¯t think anyone here (other than me) will ever do it this way.? Just indicating reverse power by some cheap method is probably fine for tuning an antenna.

?


Virus-free.




--
Paul Mateer, AA9GG
Elan Engineering Corp.

NAQCC 3123, SKCC 4628


Re: ND6T AGC implementation for uBIT-X

 

You still need an antenna tuner. The SWR meter is kind of useless
without one.

I'm want to be able to operate for at least 48-72 hours. I'm figuring
you need at least a 36-50 amp-hour battery to be self-sufficient.

tim ab0wr



On Sun, 06 May 2018 17:32:54 +0000
"Jim Sheldon" <w0eb@...> wrote:

Tim,
I have a "YouKits" digital QRP SWR/Wattmeter with a 2 amp hour LI-Ion
battery pack in it that just happens to be set up (by the factory) so
that you can pull the 12 volts out of the bottom via a coax power
connector and run your QRP rig. For short term ops, it a heck of a
lot lighter than a normal battery pack and it gives you SWR & power
as well and it reads to 25 watts on the power scale. Unless I happen
to be using it on the bench (rarely) it stays in my "Go bag" along
with the solar charger. I also have a small, 4 amp hour LiPo cell
phone charger pack with a built in 9 volt/12 volt switching supply as
well as the 5 volt USB charging output, that will run the SWR
Wattmeter & the rig at the same time that is about the size of my
cell phone and can also be charged off the solar panel. Between the
2, I have less than 1/2 a pound of weight (about the same as the
normal battery pack people carrry) and everything is well smaller
than the rig itself. Works for me.

Jim

------ Original Message ------


Re: 45Mhz crystal filter specification

 

The spec sheet on this says it's a 4-pole, 25khz filter. I assume it is
better than the 2-pole?

tim ab0wr


On Sun, 6 May 2018 23:55:39 +0530
"Ashhar Farhan" <farhanbox@...> wrote:

Jim,
HF Signals buys them from a compnay called WTL Crystals, based in
China. There are several sellers on ebay on aliexpress. Most of them
are the same 2 pole filter that we use. I found one just now :


- f

On Sun, May 6, 2018 at 10:02 PM, Jim Sheldon <w0eb@...> wrote:

One question from me Ashhar, where can I obtain several of those 45
MHz filters? What is the part number?

Thanks,

Jim Sheldon, W0EB

------ Original Message ------
From: "Ashhar Farhan" <farhanbox@...>
To: [email protected]
Sent: 5/6/2018 11:03:06 AM
Subject: Re: [BITX20] 45Mhz crystal filter specification

You must use the L network of the ubitx or use 1:9 balun to get the
proper shape of the fiilter. The 45 MHz crystal filters usually
have a termintion specified for around 600 ohms.

Let me bullet this :
* All filters have the specified shape only when they are
terminated at the specified impedance on both sides.
* The passive filters, including the crystal fitlers have no
measurable termination to speak of at all. They have different
responses at different impedances.
* The capacitors of the ladder filter set the bandwidth.
* The termination impedance sets the ripple. Lower impedance brings
steeper skirt at the cost of ripples in the bandpass. To remove the
ripples you increase the impedance and lose the sharpness of the
skirt.


On Sun, May 6, 2018 at 7:45 PM, Tim Gorman <tgorman2@...> wrote:

I'm using a direct probe. The 815 has a 50ohm input which should
be a match to most points in the ubitx. At least a close enough
match to not directly affect the circuits operation. I suppose I
could use a 10x scope probe but I'm not sure that would make much
difference.

tim ab0wr

On Sun, 06 May 2018 01:03:42 -0700
freefuel@... wrote:

Hi Tim,

I'm interested to know how your connecting your SA to the
circuit, from my recollection the majority of SA equipment has a
50 ohm input impedance, an input impedance that low is not
conducive to hanging a probe off the circuit at any convient
location.

-Justin N2TOH





Re: ND6T AGC implementation for uBIT-X

Jack Purdum
 

Hi Jerry:

Most of my comments are stylistic and your code should work just fine. As to the post-decrement operator, I was more arguing for having it as a separate statement as there are numerous operators that have the same precedence level and, the tie-breaker is often a L-to-R parse of the expression, which can be confusing. If it makes no difference in performance, why not separate it?

No, I realize you weren't using an ASCII zero ('0'), but my question is: Why not? To me, most students would recognize a single quote mark as an ASCII character, where they would likely have to go to an ASCII table and look up 0x30 (or 48) in the table to see what it is.

"I tend to write as compactly as possible." I do, too, when I'm writing source code just for myself or am pretty sure no one else will need to read it. However, most of my work is source code that I share with others, so I try to make it as easy to read as possible. I agree: I've seen code with comments on every line and that's a waste of time. On the other hand, if it takes a seasoned C programmer more than a few seconds to understand a statement, either the statement should be simplified or a comment is warranted. Simplified statements are especially called for when there's no performance or memory penalties involved, regardless of who you're writing for.

I especially liked:

?????? If it's really tricky, I print what fits one sheet of paper and stick it in my
????back pocket for a few days. Somehow that leaks through and up?into my brain,
????after a few days I understand my code.

I gotta get me one of those Butt-Cheek Code Readers! At my age, even that probably wouldn't help me much if I come back to it a month or two later. Also,

????????Anyways, I guess it's fortunate that I write code for me and not for you.
????????For both of us.? ?;-)

Everyone has their own style and that perfectly ok, but when you post it on a Forum, it moves from "your eyes only" to everyone who reads the Forum. At that point, I try to make it as easy as possible for everyone to read and understand it.

Jack, W8TEE


On Sunday, May 6, 2018, 2:41:19 PM EDT, Jerry Gaffke via Groups.Io <jgaffke@...> wrote:


Ok Jack,

I will concede that whitespace around the "==" would have been a good idea.
And that the extra indent is an error.
A work in progress, I did state it was "unproven".
Guess I lose a grade point on style, but I'm happy with a passing grade of C.

But far as I know, that code is correct and should work.
And is short and concise, using only 32 bit integer math, and not much of it.
I'd bet most code for SWR calculations will pull in a floating point library.

I code for 1989 K&R ANSI C.
And am fairly sure that older compilers had the same precedence rules for post decrement vs equality.
Not that it matters, as all my ANSI C function declarations would fail on an old compiler anyway.
I may have to dig out my 1978 K&R C book to check, just out of curiosity.

I don't have a hex representation in there for 0,
just for 0x30 which I for one easily recognize as an ascii '0'.

I tend to write as compactly as possible.
Most of my work is on a small chromebook, compact code lets me see as much of the problem as possible.
If it's really tricky, I print what fits one sheet of paper and stick it in my back pocket for a few days.?
Somehow that leaks through and up?into my brain, after a few days I understand my code.

I get frustrated with code that has extra levels of indirection and is generally all spread out
with lots of uninformative comments and boilerplating.? I don't get paid by the line.?

Anyways, I guess it's fortunate that I write code for me and not for you.
For both of us.? ?;-)

Jerry


On Sun, May 6, 2018 at 10:38 am, Jack Purdum wrote:
yet, which is easier to read? Also, if you just happened to use a pre-X3J11 compiler, the if() expression could be evaluated incorrectly since the post decrement operator has higher precedence than the test for equality. (True, the chances of that happening are pretty small, but still non-zero.) Finally, why use the hex representation for zero when '0' makes it easier to read? The indenting on the first example is misleading, since a quick glance makes it appear that the second call to the lcd object is controlled by the if expression, which it is not. Also, whitespace makes it easier to read expressions and cost nothing, so why not use it? You could also use the %= and /= operators, but that makes the code harder to read and has no impact on the generated code. Given a choice, I will always pick the form that is easier to read, especially when there's no performance hit.
?


Re: 45Mhz crystal filter specification

 

Allison,

I am not an expert on digital anything, scopes or spectrum analyzers.
Thanks for the information. Someday I need to find time to study up on
all this but then I also need time to get the garden going, mow the
yard twice a week, etc! Never enough time.

I do have the 815tg. When I get everything put back together I'll give
the narrow span a try.

I assume you mean by taking the vfo to 45Mhz you mean setting the dial
to zero?

tim ab0wr



On Sat, 05 May 2018 15:03:46 -0700
"ajparent1/KB1GMX" <kb1gmx@...> wrote:

THe 815 is likely doing it right.? ?I should have warned you that
with wide scans the number of data points are spread out and
interpolation is the result with soso accuracy.? For better results
use a narrower scan (span).? ? All but the older full analog SAs have
that problem.? Somewhere in the manual it will give you the number of
point it actually takes measurements at.? Typically its some amount
of memory limit or the width of the screen in Pixels.

The best approach is setup for 45mhz, maybe 50khz span and stuff that
though if you have the 815T.??

If you have the plain 815 (no tracking generator) set it for write
hold and sweep it very slowly with signal generator?or a high output
noise source and you will get the passband? outline. Its slow doing
it that was but it works.? I've used this on my 8568B as that does
not have a tracking generator so I use a noise source to fill it.

FYI you can dial the VFO (5351) down to 45mhz and enough of it will be
there to see in and out.

Allison


uBitx relay pinouts

 

I am working on a mod (tapping the antenna to share with an SDR (Not the IF, the actual antenna).
I am looking at tapping the output of K3 so as to switch it out on transmit.
Looking at the schematic and the relay data sheet I see that?

The schematic shows pins:
1, 3, 5, 8, 9,12, 14, and 16
Every datasheet I can find has the pinout as:
1, 4, 6, 8, 9,11, 13, and 16

What gives? Am I safe to assume 3 on the schematic should be 4, etc?


KG4GEK

Greg



Re: SWR

 

¿ªÔÆÌåÓý

We must use different libraries.? I send out the start conversion word to the part address¡­ and away it goes.? Then sometime later, ?I poll to see if conversion is ready/ do a read at the same time (because you get one or the other for free).? If the data isn¡¯t ready, throw away what you got back and go do something else.? If you test every quarter-second, you would always get the data and the ready bit set TRUE.? Then update the display.? Again, the time it takes to do the A/D conversion isn¡¯t important off-board as long as both power readings are congruent and ready together at some point.? The reads can be executed whenever convenient as not to interfere with keying, CAT commands, etc. without using interrupts.

?

With all this said, I support using a couple of caps and doing something really easy.? Maybe it works perfectly.

?

?

Dr. William J. Schmidt - K9HZ J68HZ 8P6HK ZF2HZ PJ4/K9HZ VP5/K9HZ PJ2/K9HZ

?

Owner - Operator

Big Signal Ranch ¨C K9ZC

Staunton, Illinois

?

Owner ¨C Operator

Villa Grand Piton ¨C J68HZ

Soufriere, St. Lucia W.I.

Rent it:

Like us on Facebook!

?

Moderator ¨C North American QRO Group at Groups.IO.

?

email:? bill@...

?

?

From: [email protected] [mailto:[email protected]] On Behalf Of Jerry Gaffke via Groups.Io
Sent: Sunday, May 6, 2018 1:54 PM
To: [email protected]
Subject: Re: [BITX20] SWR

?

You said
? >? goes on about its business for a while
That's not correct, unless you add some code to handle i2c transmit and receive in
interrupt routines.? That's some code most of us would prefer to avoid.

We currently do blocking IO on I2C reads and writes.
Just clocking all those I2C bits around at 100khz takes considerably more time than doing the embedded ADC reads.

I'm assuming we are mostly concerned about delaying other operations, such as sensing the keyer.

If all you are worried about is how synchronous the two samples are,
then yes the 2 channel ADC chip on the I2C bus would be better,
even if we stick with the blocking code on i2c access.
Me, I'll try out a couple big caps first.

Jerry

On Sun, May 6, 2018 at 10:50 am, K9HZ wrote:

¡°Actually, reading values from an A/D over the I2C bus will take more time than just reading from the Nano's embedded ADC.?¡°

?

Yes, but in this case, taking more time is ok¡­ because the Arduino commands the A/D to perform its function, goes on about its business for a while¡­the digitization happens independently of the Arduino processing, and the data will be waiting for you want to go get it. ?There is no real demand on when the data needs to be available, it¡¯s more a demand of being synchronized (so it¡¯s statistically better to get the average of 5 good numbers rather than 50 marginal numbers).? And (for me the best part) you really can employ an A/D with synchronized S/H for good coordinated forward and reverse power.?

?

I really don¡¯t think anyone here (other than me) will ever do it this way.? Just indicating reverse power by some cheap method is probably fine for tuning an antenna.

?


Virus-free.