¿ªÔÆÌåÓý

Re: W8TEE Corrected Code Rel 3


 

Hi all,

For the issue "DDS output frequency not changing" I added in the block void loop()
an extra line:?
sendFrequency(currentFrequency);

?

so in total this part looks like? (line number 1217):

?

if (currentFrequency != oldFreq) {????????????????????????? // Has the frequency changed?

?

??? sendFrequency(currentFrequency);

?

??? currentTune = millis();?????????????????????????????????? // Yep, but how long ago?

??? if (currentTune - oldTune > EEPROMUPDATEDELAY) {????????? // If greater than 10 seconds...

????? writeEEPROMParameter(READEEPROMFREQ, currentFrequency); // ...blast it to EEPROM

????? oldTune = currentTune;

????? oldFreq = currentFrequency;

??? }

?

73

guido? on7ch


On Fri, Aug 11, 2017 at 9:49 PM, Jack Purdum via Groups.Io <econjack@...> wrote:
There is a release 1.05 and a release 1.06 will likely be coming out early next week. Also, it appears that there needs to be two identical calls in setup() to sendFrequency(); one to clear the registers and one to actually set the frequency:

? encoderMode = ENCODERTUNING; ? ? ? ? ? ? ? ?// tuning
? sendFrequency(currentFrequency); ? ? ? ? ? ?// Appears we need to send it twice to clear the registers
? sendFrequency(currentFrequency);
? ShowFrequency(currentFrequency, 0);
? StartupScreen();

Jack, W8TEE

From: Guido Charita <g.charita@...>
To: [email protected]
Sent: Friday, August 11, 2017 3:00 PM
Subject: Re: [BITX20] W8TEE Corrected Code Rel 3

?
Hi,
?
Trying to get the VFO going, I saw that the DDS output frequency is not changing when turning the rotary encoder.

Only at startup the DDS output is set to the frequency memorized in the EEPROM.
Can somebody help to solve this (software) problem.

I have tried several DDS modules.
I see no pulses on pins 51, 52 & 53 on the 2560_MINI board when rotating the encoder.
?
I use B40SoftwareRel0105.
?
73
Guido? ON7CH
?



On Sat, Jul 22, 2017 at 3:40 AM, Jack Purdum via Groups.Io <econjack@...> wrote:
All:

I've been working with Art and finally have the code working. I was debugging and got careless and sent the wrong file out for use. This is complicated by the fact that my DDS just died. No smoke...no fanfare...just an aneurysm or else something internal. As most of you know, getting a Type II AD9850 isn't easy, but I have 3 coming to me as quickly as possible. Meanwhile, I've attached the *.ino file; the MorseCode.h file is okay.

Sorry for the hassles...

Jack, W8TEE




From: David S via Groups.Io <dcsuk10=[email protected]>
To: [email protected]
Sent: Friday, July 21, 2017 7:14 PM
Subject: Re: [BITX20] W8TEE Assembly Manual and Code Update

Art

Jack's changed the routine that drives the DDS, he's no longer using the library, if you want to test using the new code with the DDS running here's what you need to do.

Towards the top of the code you will find this line
//========================== Symbolic Constants ============================== ===========================
#define MYCALIBRATIONCONSTANT ? ? 125001066.3102821 ? // See manual

Inset this line?
#define BFOFREQUENCY ? ? ? ? ?11998000UL

Search for the following "void sendFrequency"

You should find this routine....

void sendFrequency(int32_t frequency)?
{
? ? uint32_t freq = ?frequency;
? ??
? ? for (int b = 0; b < 4; b++, freq >>= 8) {
? ? ? tfr_byte(freq & 0xFF);
? ? }
? ? tfr_byte(0x000); ? // Final control byte, all 0 for 9850 chip
? ? pulseHigh(FQ_UD); ?// Done!? Should see output
}
?
Comment out the whole routine and replace with this code

void sendFrequency(int32_t frequency) {
?
? DDS.setfreq( (float) BFOFREQUENCY - frequency, 0); ? // Second argument is phase. See library docs
? delay(10); ? ? ? ? ? ? ? ? ? ? ? ? ? ?// wait for AD9850 output to become stable
}

Be sure you don't miss the end bracket, this will revert to using the library and allow you to continue to test until Jack and make the required changes.? The first version of the code sets the VFO to the TX frequency, this modification will set the VFO to the actual required frequency 4.979 (ish) for 7.030 on the display.? Hope that helps.

Jack?

I can't see any pin defined for the Smeter or where the pin voltage would be picked up in the code.

David ?G8DJM



Virus-free.




Join [email protected] to automatically receive all group messages.