¿ªÔÆÌåÓý

W8TEE Software Release 1.07-10 to Remove digitalWriteFast library


Jack Purdum
 

I've uploaded a new version that removes the digitalWriteFast library for anyone who is having issues with it.

Jack, W8TEE



From: Mike Bryce <prosolar@...>
To: [email protected]
Sent: Monday, October 2, 2017 7:17 PM
Subject: Re: [BITX20] W8TEE Software Release 1.07-09

Vince,

that¡¯s what I¡¯ve read about the WProgram.h
I used the URL Jack inserted into the code.
That¡¯s where I got the file.



Mike, WB8VGE



> On Oct 2, 2017, at 6:09 PM, Vince Vielhaber <vev@...> wrote:
>
> How old is your digitalWriteFast library?? WProgram.h hasn't been used in quite some time.? It was replaced with Arduino.h
>
> Vince.
>
>
>






Mike Bryce
 

Jack,

That fixed the problem on this end. No compile errors now.

The only issue I have now is a flaky encoder.

Mike, Wb8VGE


Jack Purdum
 

What encoder and what are the symtoms?

Jack, W8TEE



From: Mike Bryce <prosolar@...>
To: [email protected]
Sent: Monday, October 2, 2017 8:55 PM
Subject: Re: [BITX20] W8TEE Software Release 1.07-10 to Remove digitalWriteFast library

Jack,

That fixed the problem on this end. No compile errors now.

The only issue I have now is a flaky encoder.

Mike, Wb8VGE



Mike Bryce
 

¿ªÔÆÌåÓý

It¡¯s one of those cheap encoders off eBay.

It simply won¡¯t tune correctly. It¡¯s like the digits change only with 2 or 3 clicks. Or jumps from 7.012 to 7.290 with a few clicks

I¡¯ve installed the .01 caps

If I push the switch, I can step through the various menus and select what I need.?

I¡¯ve got some other encoders, haven¡¯t tried them yet. I¡¯m suspecting it¡¯s a fubar encoder


Mike, WB8VGE



On Oct 2, 2017, at 10:21 PM, Jack Purdum via Groups.Io <jjpurdum@...> wrote:

What encoder and what are the symtoms?

Jack, W8TEE



From:?Mike Bryce <prosolar@...>
To:?[email protected]?
Sent:?Monday, October 2, 2017 8:55 PM
Subject:?Re: [BITX20] W8TEE Software Release 1.07-10 to Remove digitalWriteFast library

Jack,

That fixed the problem on this end. No compile errors now.

The only issue I have now is a flaky encoder.

Mike, Wb8VGE




Jack Purdum
 

That worries me, as I'm using the cheap KY-040 encoder myself but it performs flawlessly for me. Anyone else having issues?

Jack, W8TEE



From: Mike Bryce <prosolar@...>
To: [email protected]
Sent: Monday, October 2, 2017 10:45 PM
Subject: Re: [BITX20] W8TEE Software Release 1.07-10 to Remove digitalWriteFast library

It¡¯s one of those cheap encoders off eBay.

It simply won¡¯t tune correctly. It¡¯s like the digits change only with 2 or 3 clicks. Or jumps from 7.012 to 7.290 with a few clicks

I¡¯ve installed the .01 caps

If I push the switch, I can step through the various menus and select what I need.?

I¡¯ve got some other encoders, haven¡¯t tried them yet. I¡¯m suspecting it¡¯s a fubar encoder


Mike, WB8VGE



On Oct 2, 2017, at 10:21 PM, Jack Purdum via Groups.Io <jjpurdum@...> wrote:

What encoder and what are the symtoms?

Jack, W8TEE



From:?Mike Bryce <prosolar@...>
To:?[email protected]?
Sent:?Monday, October 2, 2017 8:55 PM
Subject:?Re: [BITX20] W8TEE Software Release 1.07-10 to Remove digitalWriteFast library

Jack,

That fixed the problem on this end. No compile errors now.

The only issue I have now is a flaky encoder.

Mike, Wb8VGE






Mike Bryce
 

Jack,

put in a new encoder and no joy.

I feel two 'clicks' and with every two clicks, the display moves on digit.
7.021.6
turn two clicks
7.021.5

push the switch button, and I can step though the menus, change keyer speed (it's jumpy, too) and back to freq display

mike, wb8vge


Jack Purdum
 

Mike:

This is a kludge, but try this (new lines in yellow):

at line 1574 add:

?? static int passCounter = 0;

add these lines between 1593-1594:

??? 1593????? if (encoderDirection) {
??????????????????? passCounter++;??????????????????????? // Got a speedbump
??????????????????? if (passCounter < 2) {????????????????// Double-speedbump yet?
??????????????????????? break;????????????????????????????????????// Nope...
??????????????????? } else {
??????????????????????? passCounter = 0;????????????????? // Yep...
??????????????????? }
??? 1594 ?????? if ((unsigned long) (fasttuneStart - fasttuneEnd) < DEFAULTTRIGGER) {??? // They're spinning fast...
I can't test this right now, but give it a shot and see what happens.

Jack, W8TEE


From: Mike Bryce <prosolar@...>
To: [email protected]
Sent: Tuesday, October 3, 2017 12:47 AM
Subject: Re: [BITX20] W8TEE Software Release 1.07-10 to Remove digitalWriteFast library

Jack,

put in a new encoder and no joy.

I feel two 'clicks' and with every two clicks, the display moves on digit.
7.021.6
turn two clicks
7.021.5

push the switch button, and I can step though the menus, change keyer speed (it's jumpy, too) and back to freq display

mike, wb8vge



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


Jack Purdum
 

Dollar to a donut that it's because the setCursor() function has the X coordinate wrong. Look in loop() where the display is updates and mess around with the X coordinate. What it is doing is printing one digit character too far to the right:

?? WPM: 22????????? // Original value
?? WPM: 221 ?????? // New value 21 -printed one digit char too far to the right.

This is because I can't test the spacing on all displays. Could erase the entire field and redraw, but you might get flickering then.

Jack, W8TEE


From: Mike Bryce <prosolar@...>
To: [email protected]
Sent: Tuesday, October 3, 2017 4:51 PM
Subject: Re: [BITX20] W8TEE Software Release 1.07-10 to Remove digitalWriteFast library

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



 

¿ªÔÆÌåÓý

Different encoders have different numbers of ¡°steps per rotation.¡± Some are 12, some are 24. The software has to deal with each differently. If you¡¯re having to turn two clicks for one software step, it sounds like Jack has a 24 and you have a 12.?

-Mark

On Oct 2, 2017, at 9:47 PM, Mike Bryce <prosolar@...> wrote:

Jack,

put in a new encoder and no joy.

I feel two 'clicks' and with every two clicks, the display moves on digit.
7.021.6
turn two clicks
7.021.5

push the switch button, and I can step though the menus, change keyer speed (it's jumpy, too) and back to freq display

mike, wb8vge


Jack Purdum
 

Actually, it depends on how the library interprets the pulse chain. It is true that different encoders have difference steps per rotation, but quadrature encoders send out four pulse from the library, so only two, and some one. IF your encoder sends out "double pulses", simply create a static int counter variable and don't return a direction value until two pulses have been read.

Jack, W8TEE



From: "Smitty, KR6ZY" <mark-groupsio@...>
To: [email protected]
Sent: Monday, October 9, 2017 2:16 PM
Subject: Re: [BITX20] W8TEE Software Release 1.07-10 to Remove digitalWriteFast library

Different encoders have different numbers of ¡°steps per rotation.¡± Some are 12, some are 24. The software has to deal with each differently. If you¡¯re having to turn two clicks for one software step, it sounds like Jack has a 24 and you have a 12.?

-Mark

On Oct 2, 2017, at 9:47 PM, Mike Bryce <prosolar@...> wrote:

Jack,

put in a new encoder and no joy.

I feel two 'clicks' and with every two clicks, the display moves on digit.
7.021.6
turn two clicks
7.021.5

push the switch button, and I can step though the menus, change keyer speed (it's jumpy, too) and back to freq display

mike, wb8vge



 

Hummmm this is strange. My encoder just started doing what Mikes encoder is doing. Loaded -10 no help....changed encoders with a known good one off my Antenna Analyzer no help....sometimes turning 6 to 10 clicks before I get a response

don


 

BTW...Frequency works fine....


 

wait a minute.....now the WPM works fine......

Stby let me find what screws up the WPM....


 

OK see if you can follow this

Initial pwr I get 20 WPM displayed all the other displays correct.
Click on SW1 and I can scroll thru the msgs (turning the knob)...all 9 of em
Click on SW2 and the msgs scroll as soon as you make one click on the encoder....and they keep scrolling until you hit SW3
Click on SW3 and I can scroll thru the msgs just like SW1

Frequency changes no problem

click to WPM and the display might go to 3 digits or you can twist the knob 10 times before it moves 1 or 10 or 100

And most of the time the SW's don't have the right messages numbers displayed

I can't get the WPM to work again....it does once an a while can't find a pattern

Did this on USB power and my 12 volt ps.

what da ya think Jack ???

don


Jack Purdum
 

This makes no sense. I'll start checking it tomorrow.

Jack, W8TEE



From: kc1at via Groups.Io <kc1at@...>
To: [email protected]
Sent: Wednesday, October 11, 2017 8:09 PM
Subject: Re: [BITX20] W8TEE Software Release 1.07-10 to Remove digitalWriteFast library

OK see if you can follow this

Initial pwr I get 20 WPM displayed all the other displays correct.
Click on SW1 and I can scroll thru the msgs (turning the knob)...all 9 of em
Click on SW2 and the msgs scroll as soon as you make one click on the encoder....and they keep scrolling until you hit SW3
Click on SW3 and I can scroll thru the msgs just like SW1

Frequency changes no problem

click to WPM and the display might go to 3 digits or you can twist the knob 10 times before it moves 1 or 10 or 100

And most of the time the SW's don't have the right messages numbers displayed

I can't get the WPM to work again....it does once an a while can't find a pattern

Did this on USB power and my 12 volt ps.

what da ya think Jack ???

don



Virus-free.


 

Jack the schematic has the voltage coming out of the buck converter as 5.9V....but the instructions has you adjusting it to 7.6 to 7.9V ????
Will check that out when I get back home this afternoon,

don


Jack Purdum
 

The 7.6-7.9V is correct. I've asked Farrukh to correct the schematic and I've asked for the file, but so far, no response from him.
Jack, W8TEE


From: kc1at via Groups.Io <kc1at@...>
To: [email protected]
Sent: Thursday, October 12, 2017 8:26 AM
Subject: Re: [BITX20] W8TEE Software Release 1.07-10 to Remove digitalWriteFast library

Jack the schematic has the voltage coming out of the buck converter as 5.9V....but the instructions has you adjusting it to 7.6 to 7.9V ????
Will check that out when I get back home this afternoon,

don



Virus-free.


Jack Purdum
 

Don:

To disable the Autoscroll feature on SW2...okay, my bad...it's a bug. Insert the following line:

????????? encoderDirection = 0;

between lines 1675 and 1676. I will do a new release later, but it may not be until after I get back from vacation.

Jack, W8TEE



From: Jack Purdum via Groups.Io <jjpurdum@...>
To: [email protected]
Sent: Wednesday, October 11, 2017 9:39 PM
Subject: Re: [BITX20] W8TEE Software Release 1.07-10 to Remove digitalWriteFast library

This makes no sense. I'll start checking it tomorrow.

Jack, W8TEE



From: kc1at via Groups.Io <kc1at@...>
To: [email protected]
Sent: Wednesday, October 11, 2017 8:09 PM
Subject: Re: [BITX20] W8TEE Software Release 1.07-10 to Remove digitalWriteFast library

OK see if you can follow this

Initial pwr I get 20 WPM displayed all the other displays correct.
Click on SW1 and I can scroll thru the msgs (turning the knob)...all 9 of em
Click on SW2 and the msgs scroll as soon as you make one click on the encoder....and they keep scrolling until you hit SW3
Click on SW3 and I can scroll thru the msgs just like SW1

Frequency changes no problem

click to WPM and the display might go to 3 digits or you can twist the knob 10 times before it moves 1 or 10 or 100

And most of the time the SW's don't have the right messages numbers displayed

I can't get the WPM to work again....it does once an a while can't find a pattern

Did this on USB power and my 12 volt ps.

what da ya think Jack ???

don



Virus-free.



Jack Purdum
 

I can't reproduce the WPM bug and mine SW fields do display the last-selected messages.\

Jack, W8TEE



From: Jack Purdum via Groups.Io <jjpurdum@...>
To: [email protected]
Sent: Wednesday, October 11, 2017 9:39 PM
Subject: Re: [BITX20] W8TEE Software Release 1.07-10 to Remove digitalWriteFast library

This makes no sense. I'll start checking it tomorrow.

Jack, W8TEE



From: kc1at via Groups.Io <kc1at@...>
To: [email protected]
Sent: Wednesday, October 11, 2017 8:09 PM
Subject: Re: [BITX20] W8TEE Software Release 1.07-10 to Remove digitalWriteFast library

OK see if you can follow this

Initial pwr I get 20 WPM displayed all the other displays correct.
Click on SW1 and I can scroll thru the msgs (turning the knob)...all 9 of em
Click on SW2 and the msgs scroll as soon as you make one click on the encoder....and they keep scrolling until you hit SW3
Click on SW3 and I can scroll thru the msgs just like SW1

Frequency changes no problem

click to WPM and the display might go to 3 digits or you can twist the knob 10 times before it moves 1 or 10 or 100

And most of the time the SW's don't have the right messages numbers displayed

I can't get the WPM to work again....it does once an a while can't find a pattern

Did this on USB power and my 12 volt ps.

what da ya think Jack ???

don



Virus-free.