¿ªÔÆÌåÓý

Date

Re: preview: Raduino v1.25 with capacitive touch CW keyer

 

One slight not-so-obvious advantage of this scheme: ?
? Shorting that keyer paddle to case ground with your body would count as key-down.
Could well be not-so-obvious advantages to using Allard's third pin scheme
that I am not seeing just yet.

Jerry


On Tue, Oct 3, 2017 at 12:40 pm, Jerry Gaffke wrote:
Not obvious the third pin is required for the capacitive touch keyer.
The dit and dah Nano input pins could also have open-drain outputs,
so drive the pin low and then release it to slowly float back up.
Read from the pin after it is released to see how long it takes
the pullup resistor to get the pin high again.

There should be plenty of web hits on how to do a bidirectional open-drain pin under Arduino.
Likely implemented as a tristate output, the output is enabled when actively driving the pin low.?


Re: W8TEE Software Release 1.07-10 to Remove digitalWriteFast library

Mike Bryce
 

Jack,
found some time to get the code snipet in place
compiled without errors

however, same result. for every two clicks, the digits move.
same thing with the sw1-SW3 buttons. two clicks changes the messages

WPM is a bit odd, my default is 22 turn one click and speed goes to 220 wpm.

Like this:
push button until WPM is selected.
rotate encoder on click, speed jumps to 221, reverse the encoder, and wpm will go down until it hits 119 wpm then jumps to 20 wpm.

I'm going to try another encoder

mike wb8vge


Re: A bit OT, blame it on W8TEE

Mike Bryce
 

John,

just wire in the ports you need. No sense building all 8 if you only need three or four antennas

mike, wb8vge


10 turn pot

 

I received a 10 turn pot today, installed and changed the sketch for a 300 kHz span. It works great, however I found the tuning a bit too coarse. I changed the span to 100 khz, tuning was much better, but unfortunately, on my pot, it appears that there is just enough resistance left at the upper end? (300 hz) to keep the vfo from jumping to the next 100 hz step. Where in the sketch can I change the tuning value to address this?

Also, for all you other newbies...don't do what I did and forget? to hold the function button while powering up the radio after loading the new software. It took me 15 minutes to figure out why the new settingsite weren't working.

I managed to work? PV8 in northern Brazil last night around 2200 local time with my end fed half wave, so all is well.

73
Brent


Re: A bit OT, blame it on W8TEE

John P
 

On Tue, Oct 3, 2017 at 11:34 am, Mike Bryce wrote:
I designed the board and laid it out using diptrace. I had a few made. They are expensive, because of the size of the board. The photo is deceptive as it's about 9" square.
Really a nice job. I'd be interested in seeing the schematic. I've been thinking of a remote antenna switch, but I don't need 8?ports!
?
--
John - WA2FZW


Re: A bit OT, blame it on W8TEE

Jack Purdum
 

Mark:

Where is the display_fields[field].width object defined? I don't seem to have the source code.

Jack, W8TEE



From: Mark Pilant <mark@...>
To: [email protected]
Sent: Tuesday, October 3, 2017 3:03 PM
Subject: Re: [BITX20] A bit OT, blame it on W8TEE

Another way to minimize LCD activity is to only display the text "delta".

The following function is one I created to display text on an LCD.? The
display being "broken" into a number of "fields" (row, column, and width)
and when the function is called to display the text, it will only display
the positions having changed.

This function will also clear out anything in the row after the field.
I have found this very handy.

One other note, the changes to the display are done under mutex control
because the program using this function is multi-threaded.

I hope this helps, and doesn't confuse things too much.? Although I will
be happy to answer any questions.

- Mark

---------------------------------------------------------------------------------

/* Define the display information. */
#define ROW_MAXIMUM? ? ? ? 4
#define COLUMN_MAXIMUM? ? ? 20

#define FULL_ROW_WIDTH? ? ? COLUMN_MAXIMUM
#define HALF_ROW_WIDTH? ? ? (COLUMN_MAXIMUM - (COLUMN_MAXIMUM / 2))

/* Display fields. */
#define? ? DISP_DATE_TIME? 0
#define? ? DISP_WEEKDAY? ? 1
#define? ? DISP_SCHEDULE? ? 2
#define? ? DISP_PROG_NAME? 3
#define? ? DISP_ZONE_INFO? 4
/* Must be last. */
#define? ? DISP_MAX? ? ? ? 5

char? ? ? ? ? ? old_display_data[ROW_MAXIMUM][COLUMN_MAXIMUM];

void display_text(uint8_t field, const char *text)
{
? ? uint8_t? ? ? ? cur_column;
? ? uint8_t? ? ? ? row;
? ? uint8_t? ? ? ? start_column;
? ? uint8_t? ? ? ? text_len = strlen(text);

? ? /* Make sure the field number is valid. */
? ? if (field >= DISP_MAX) return;

? ? row = display_fields[field].row;
? ? start_column = display_fields[field].column;

? ? /* Only display the changed text. */
? ? for (cur_column = 0; cur_column < display_fields[field].width; cur_column++) {
? ? ? ? /* If the end of the string, we are done. */
? ? ? ? if (text[cur_column] == '\0') break;

? ? ? ? /* If the the character is different, write it and save for next time. */
? ? ? ? if (old_display_data[row][start_column + cur_column] != text[cur_column]) {
? ? ? ? ? ? /* Lock the display mutex so the display may be updated. */
? ? ? ? ? ? pthread_mutex_lock(&display_mutex);

? ? ? ? ? ? lcd_setCursor(row, start_column + cur_column);
? ? ? ? ? ? lcd_printc(text[cur_column]);

? ? ? ? ? ? /* We're done so unlock the display mutex. */
? ? ? ? ? ? pthread_mutex_unlock(&display_mutex);

? ? ? ? ? ? old_display_data[row][start_column + cur_column] = text[cur_column];
? ? ? ? }
? ? }

? ? /* If there is anything left in the row, clear it out. */
? ? while (cur_column < display_fields[field].width) {
? ? ? ? /* Lock the display mutex so the display may be updated. */
? ? ? ? pthread_mutex_lock(&display_mutex);

? ? ? ? lcd_setCursor(row, start_column + cur_column);
? ? ? ? lcd_printc(' ');

? ? ? ? /* We're done so unlock the display mutex. */
? ? ? ? pthread_mutex_unlock(&display_mutex);

? ? ? ? old_display_data[row][start_column + cur_column] = ' ';
? ? ? ? cur_column++;
? ? }
}







Re: A bit OT, blame it on W8TEE

Jack Purdum
 

I don't know where this code came from, but display_fields[] is an array of objects, but I don't know what. Who has the complete code?

Jack, W8TEE



From: Michael Hagen <motdog@...>
To: [email protected]
Sent: Tuesday, October 3, 2017 3:52 PM
Subject: Re: [BITX20] A bit OT, blame it on W8TEE

I am trying to make a complete program with setup() and a loop() with
your code.

I think it would be real useful.

I am stuck here, what is display_fields a function somewhere?
Compiler was asking, and I don't know enough to fix it?

Maybe you have a complete example?


On 10/3/2017 12:03 PM, Mark Pilant wrote:
> row = display_fields[field].row;

Thanks,

Mike, WA6ISP

--
Mike Hagen, WA6ISP
10917 Bryant Street
Yucaipa, Ca. 92399
(909) 918-0058
PayPal ID? "MotDog@..."
Mike@...







Re: A bit OT, blame it on W8TEE

 

I am trying to make a complete program with setup() and a loop() with your code.

I think it would be real useful.

I am stuck here, what is display_fields a function somewhere?
Compiler was asking, and I don't know enough to fix it?

Maybe you have a complete example?


On 10/3/2017 12:03 PM, Mark Pilant wrote:
row = display_fields[field].row;
Thanks,

Mike, WA6ISP

--
Mike Hagen, WA6ISP
10917 Bryant Street
Yucaipa, Ca. 92399
(909) 918-0058
PayPal ID "MotDog@..."
Mike@...


Re: Yet another magnetic loop antenna

John P
 

I uploaded Version 1.1 of the software in the A 40 meter magnetic loop antenna folder. It fixes a bug in the LCD_Print function to add a null to the end of the display buffer (Thanks to eagle-eye Jack P. for noticing)!
--
John - WA2FZW


Re: preview: Raduino v1.25 with capacitive touch CW keyer

 

Not obvious the third pin is required for the capacitive touch keyer.
The dit and dah Nano input pins could also have open-drain outputs,
so drive the pin low and then release it to slowly float back up.
Read from the pin after it is released to see how long it takes
the pullup resistor to get the pin high again.

There should be plenty of web hits on how to do a bidirectional open-drain pin under Arduino.
Likely implemented as a tristate output, the output is enabled when actively driving the pin low.?


Re: Fw: [BITX20] A bit OT, blame it on W8TEE

John P
 

On Tue, Oct 3, 2017 at 10:44 am, Jack Purdum wrote:
??? for ( i = Buffer_Length; i <= LCD_Width; i++ )????? // Yep!
Thanks for noticing the bug! The code snippet is out of the mag loop controller code. It's only using about 30% of the capacity of the Uno, so I chose to use Strings because of the convenience and clarity.?
?
--
John - WA2FZW


Re: A bit OT, blame it on W8TEE

 

Another way to minimize LCD activity is to only display the text "delta".

The following function is one I created to display text on an LCD. The
display being "broken" into a number of "fields" (row, column, and width)
and when the function is called to display the text, it will only display
the positions having changed.

This function will also clear out anything in the row after the field.
I have found this very handy.

One other note, the changes to the display are done under mutex control
because the program using this function is multi-threaded.

I hope this helps, and doesn't confuse things too much. Although I will
be happy to answer any questions.

- Mark

---------------------------------------------------------------------------------

/* Define the display information. */
#define ROW_MAXIMUM 4
#define COLUMN_MAXIMUM 20

#define FULL_ROW_WIDTH COLUMN_MAXIMUM
#define HALF_ROW_WIDTH (COLUMN_MAXIMUM - (COLUMN_MAXIMUM / 2))

/* Display fields. */
#define DISP_DATE_TIME 0
#define DISP_WEEKDAY 1
#define DISP_SCHEDULE 2
#define DISP_PROG_NAME 3
#define DISP_ZONE_INFO 4
/* Must be last. */
#define DISP_MAX 5

char old_display_data[ROW_MAXIMUM][COLUMN_MAXIMUM];

void display_text(uint8_t field, const char *text)
{
uint8_t cur_column;
uint8_t row;
uint8_t start_column;
uint8_t text_len = strlen(text);

/* Make sure the field number is valid. */
if (field >= DISP_MAX) return;

row = display_fields[field].row;
start_column = display_fields[field].column;

/* Only display the changed text. */
for (cur_column = 0; cur_column < display_fields[field].width; cur_column++) {
/* If the end of the string, we are done. */
if (text[cur_column] == '\0') break;

/* If the the character is different, write it and save for next time. */
if (old_display_data[row][start_column + cur_column] != text[cur_column]) {
/* Lock the display mutex so the display may be updated. */
pthread_mutex_lock(&display_mutex);

lcd_setCursor(row, start_column + cur_column);
lcd_printc(text[cur_column]);

/* We're done so unlock the display mutex. */
pthread_mutex_unlock(&display_mutex);

old_display_data[row][start_column + cur_column] = text[cur_column];
}
}

/* If there is anything left in the row, clear it out. */
while (cur_column < display_fields[field].width) {
/* Lock the display mutex so the display may be updated. */
pthread_mutex_lock(&display_mutex);

lcd_setCursor(row, start_column + cur_column);
lcd_printc(' ');

/* We're done so unlock the display mutex. */
pthread_mutex_unlock(&display_mutex);

old_display_data[row][start_column + cur_column] = ' ';
cur_column++;
}
}


Re: A bit OT, blame it on W8TEE

Mike Bryce
 

After endless hours and more diet coke that should be allowed by law, I got the RTC to display on the LCD along with the antenna port.

I have this grandiose idea of when the switch is off (But power still applied to the Nano) that the display would show date/time.
Turn on the switch and the date/time would scoot over to the bottom of the display like I have it here. I'd simply pull a digital pin to ground to let the Nano know if I want clock or switch.
tried for weeks the other night and other than finding out that interrupts aren't the way to go, I went to bed.

The flicker is still a sore in my side. I know the LDC.clear call is the problem.
I've read about using CASE, and haven't tried it yet.

All i do know is after Jack kinda pushed on me about learning to code this thing, I know more about the Ardunio today than last week.

Here's the result of 36 hours of orange compile errors.

I'm Mike, WB8VGE



Re: A bit OT, blame it on W8TEE

Mike Bryce
 

Right now, I'm not sure. If there is enough interest, I'd do a short run of 50 or so.
I'm thinking about $20ish a pop
The photo is deceptive, the board is about 9" square. Double sided, plated through holes, FR4 board, soldermask on both sides, silkscreen on both side.
The relays are 16 A and each port has two in series. when no power, all ports are ground.
I have yet to connect it to my spectrum analyzer but the last version worst case port to port on 50 mhz was 59 db down. On 1mhz, 85 db down

Mike, WB8VGE


Re: A bit OT, blame it on W8TEE

Mike Bryce
 

On Tue, Oct 3, 2017 at 09:58 am, John P wrote:
On Tue, Oct 3, 2017 at 09:24 am, Jack Purdum wrote:
Wow...nice looking board. How much is the board?
And where do you get it?
?
--
John - WA2FZW
John,

I designed the board and laid it out using diptrace. I had a few made. They are expensive, because of the size of the board. The photo is deceptive as it's about 9" square.

Here is a close up of the way I mount the SO-239 connectors.
I'm Mike, WB8VGE


Re: Fw: [BITX20] A bit OT, blame it on W8TEE

Vince Vielhaber
 

Yeah, and/or:

static char oldrig[21];

since strcpy won't malloc any space for you. I actually intended it to be
that way but forgot the [21]. I also changed it all 3 or 4 times before I
sent it.

Vince.

Opps...pressed the wrong key!


----- Forwarded Message -----
From: Jack Purdum <jjpurdum@...>
To: "[email protected]" <[email protected]>
Sent: Tuesday, October 3, 2017 12:42 PM
Subject: Re: [BITX20] A bit OT, blame it on W8TEE

Vince:
Should this be rewritten as:
?? ??static char *oldrig;

Jack, W8TEE

From: Vince Vielhaber <vev@...>
To: [email protected]
Sent: Tuesday, October 3, 2017 12:29 PM
Subject: Re: [BITX20] A bit OT, blame it on W8TEE


To cure the flicker, store what you already wrote to the display (eg.
rig).?? If it's the same as it was, don't rewrite it.

void printrig(char *rig)
{
static oldrig;

?? ?? if(!strcmp(rig,oldrig))
?? ?? ?? ?? return;
?? ?? else
?? ?? ?? ?? strcpy(oldrig,rig);

?? ?? ...

}

So to print the rig to the display, your print routine would remember the
old value of rig and compare it to the new value.?? If they're the same,
it
returns.?? If they're not, the old value is updated.?? From there you just
do your normal print however you're doing it.?? That's just one way of
doing it, there are many others.

Vince.



I got inspired and added some more code that would display the rigs used
on the LCD. I could switch up to 8 different transceivers/antennas.
Got way over my head on that one as the LCD would flicker. I narrowed it
down to my use of LCD.clear statements.

So trashed the rig select and put in a RTC that on the very bottom line.

Sure wish I knew what I'm doing.
I'm Mike, WB8VGE

--
?? Michigan VHF Corp.?? ??
?? ?? ?? ?? ?? ?? ??










--
Michigan VHF Corp.


Re: Fw: [BITX20] A bit OT, blame it on W8TEE

Jack Purdum
 

John:

There's a subtle bug in your code that could cause problems. In the for loop, the second expression:

??? for ( i = Buffer_Length; i <= LCD_Width; i++ )????? // Yep!

puts a space where the NULL should go (i.e., 0-19 is ASCII, 20 is NULL), which means trying to print the string will go on until a byte in memory is 0. The expression should be i < LCD_Width. Also, padding the way you do does not write a NULL at the end of the String, so you also need to add:

??? Buffer[i] = NULL;

after the for loop ends. It will appear to work as it tries to print on the LCD past the display memory.

I wrote a short version using what I think your code might look like. I don't have an LCD display handy, so I just used the Serial object.

#define LCD_Width 20

void setup() {
? int i;
//? String Info = "This is a command string";
? char Info[] = "This is a com";
? Serial.begin(9600);
?
? // put your setup code here, to run once:
?char Buffer[LCD_Width + 1];??
// int? Buffer_Length = Info.length ();????????????? // Length of data
? int Buffer_Length = strlen(Info);
?
?if ( Buffer_Length > LCD_Width )??????????????????? // Make sure not too long
??? Buffer_Length = LCD_Width;?????????????????????? // If too long, truncate
// Info.toCharArray ( Buffer, Buffer_Length + 1 );?? // Copy data to internal buffer
strncpy(Buffer, Info, Buffer_Length + 1);
?if ( Buffer_Length < LCD_Width )??????????????????? // Need padding?
??? for ( i = Buffer_Length; i < LCD_Width; i++ )??? // Yep!
??????? Buffer[i] = ' ';
?Buffer[i] = '\0';
// LCD_Display.setCursor ( 0, Line_No );???????????? // 1st character position on Line_No
// LCD_Display.printstr ( Buffer );????????????????? // Display it
? Serial.print(Buffer);
? Serial.print("@");???????????????????????????????? // So we can see the padding
}

void loop() {
}

I compiled your code using the String class, which is an extremely powerful class, but with that power comes a lot of wasted memory, and it took 3088 bytes of memory. I then commented out the String class calls and recompiled it and it used 1952 bytes of memory. Also, you could replace the for loop with:

? memset(&Buffer[Buffer_Length], ' ', LCD_Width - Buffer_Length);

Which may take a little more memory, but will execute very fast since it is usually written in hand-tweaked assembler. The String class is especially expensive here since you needed to convert it back to a char array anyway.

Jack, W8TEE


From: John P <j.m.price@...>
To: [email protected]
Sent: Tuesday, October 3, 2017 12:57 PM
Subject: Re: Fw: [BITX20] A bit OT, blame it on W8TEE

In addition to what Jack said about not re-writing something that is already on the display, instead of clearing the display (or just a single line) before writing, I just pad the string to be written with trailing space characters (to over-write) whatever might already be there.

For example:

?char Buffer[LCD_Width + 1];????????????????????????????????? ?// Need a regular array for print function
?int? Buffer_Length = Info.length ();????????????????????????? // Length of data
?if ( Buffer_Length > LCD_Width )?????????????????????????? ?// Make sure not too long
??? Buffer_Length = LCD_Width;?????????????????????????????? // If too long, truncate
?Info.toCharArray ( Buffer, Buffer_Length + 1 );?????? // Copy data to internal buffer
?if ( Buffer_Length < LCD_Width )??????????????????????????? // Need padding?
??? for ( i = Buffer_Length; i <= LCD_Width; i++ )????? // Yep!
??????? Buffer[i] = ' ';
?LCD_Display.setCursor ( 0, Line_No );?????????????????? ?// 1st character position on Line_No
?LCD_Display.printstr ( Buffer );??????????????????????????????? // Display it

--
John - WA2FZW



Re: A bit OT, blame it on W8TEE

John P
 

On Tue, Oct 3, 2017 at 09:24 am, Jack Purdum wrote:
Wow...nice looking board. How much is the board?
And where do you get it?
?
--
John - WA2FZW


Re: Fw: [BITX20] A bit OT, blame it on W8TEE

John P
 

In addition to what Jack said about not re-writing something that is already on the display, instead of clearing the display (or just a single line) before writing, I just pad the string to be written with trailing space characters (to over-write) whatever might already be there.

For example:

?char Buffer[LCD_Width + 1];????????????????????????????????? ?// Need a regular array for print function
?int? Buffer_Length = Info.length ();????????????????????????? // Length of data

?if ( Buffer_Length > LCD_Width )?????????????????????????? ?// Make sure not too long
??? Buffer_Length = LCD_Width;?????????????????????????????? // If too long, truncate

?Info.toCharArray ( Buffer, Buffer_Length + 1 );?????? // Copy data to internal buffer

?if ( Buffer_Length < LCD_Width )??????????????????????????? // Need padding?
??? for ( i = Buffer_Length; i <= LCD_Width; i++ )????? // Yep!
??????? Buffer[i] = ' ';

?LCD_Display.setCursor ( 0, Line_No );?????????????????? ?// 1st character position on Line_No
?LCD_Display.printstr ( Buffer );??????????????????????????????? // Display it

--
John - WA2FZW


Re: Hendricks BITX20A kit

 

Hello

Yep, I looked at the circuit and the Hendricks kit already has pads for the DDS.
The key question is what can we leave leave out of the board ?
I have not built the board yet.

The VFO seems mostly self contained so I guess I could leave out all
of the components of the VFO part of the circuit and feed the DDS to
the pads.

I will look into that.

Thanks
73
KB1HKO

On Tue, Oct 3, 2017 at 11:03 AM, KM4TRT via Groups.Io
<garello@...> wrote:
Hello,
I also have the same kit and am using the supplied VFO circuitry with the
Pacific antenna's digital dial.
I get great reception and have transmitted 1300-2000 miles using a Carolina
Windom in the attic and also a LNR 40/20/10 end fed at about 10 watts.
However I get signal reports of "off frequency" or "distorted audio". Im
still having trouble with the digital dial interfering with the freq. (i use
it to get approximately to desired frequency, then disconnect and tune so my
audio sounds good. Maybe switching to the DDS is the answer.
I would thing that comparing the Hendrix 20 schematic to the Bitx40
schematic would give you clues as where to tie in.
Andy KM4TRT