Here you can find a step-by-step tutorial about the 80-40-20 meter transceiver

This tutorial is based on the hardware from www.pa0kn.nl

 

Our first multilayer board design with Eagle.....

 

A board with Atmega128, AD9851 DDS, rotary encoder with switch, Automatic Gain Control, MIC-clipping, range 80, 40 and 20 meters. Size of a cigarette packet.

Here the result

 

 

And here a seperate display PCB for a Nokia 6100 (Epson-type) display. Ultra-thin.

 

 

Both boards

 

 

And here the display working

 

 

Assembled

 

 

 

 

 

 

With an analog gauge on a digital display

 

 

 

Ready to be used for foxhunting

 

                  

 

Here some Bascom-AVR code

Will put the complete code for the 80-40-20 meter transceiver on this page. Here first some snippets...

The AD9851 is a highly integrated device that uses advanced DDS technology, coupled with an internal high-speed, high performance D/A converter, and comparator, to form a digitally-programmable freqency synthesizer and clock generator function. When referenced to an accurrate clock source, the AD9851 generates a stable frequency and phase-programmable digitized analog output sinewave.

 

 

9851_data Alias Portd.7
9851_clk Alias Portd.6
9851_fqud Alias Portd.5

Config 9851_fqud = Output
Config 9851_clk = Output
Config 9851_data = Output

There is a tool on the Analog Devices site to calculate the 40-bit word to generate Desired Output Frequency from a Ref Clock Frequency.

Design Tools: ADIsimDDS (Direct Digital Synthesis)
 

A Frequency Tuning Word is calculated that has to be send to the AD9851 to let it generate the right frequency (and this is EXACT)

And here the Bascom-AVR to calculate that Frequency Tuning Word and to shift it out to the AD9851. You can noticed that the 30 Mhz crystal that is used here, is actualy a  29.999.647 hz crystal:

Sub To_ad9851
Local Lauf As Byte

Frequ_gen_d = Frequ_gen
Frequ_gen_d = Frequ_gen_d * 23.861210 '= 2 ^ 32 / 29.999647 = delta phi pro Hz

' 2^32=4294967296 :179.997882 = 23.861210

' 6 x REFCLCK

Frequ_gen_d = Round(frequ_gen_d)


W = Frequ_gen_d

For Lauf = 1 To 32
9851_data = W.0
Waitus 1

9851_clk = 1 'Clock
Waitus 1
9851_clk = 0
Waitus 1

Shift W , Right , 1 'LSB to MSB (W0 till W31)
Next Lauf


W = &B00000001 '0000001 'W32 to W39; here setting of 6x REFCLOCK
For Lauf = 1 To 8
9851_data = W.0
Waitus 1

9851_clk = 1 'Clock
Waitus 1
9851_clk = 0
Waitus 1

Shift W , Right , 1
Next Lauf

9851_fqud = 1 'FQ_UD takes the 40 bit
Waitus 1
9851_fqud = 0

End Sub

Animated splash start-up screen:

As part of the 80-40-20 meter transceiver, we thought it would be nice to have a splashing start-up screen. Well, we got one, a animated globe. But if the rest of the program will fit in the remaining 40 Kbytes of the Atmega128 that will be the question. If not, a single, not moving globe will do.

Animated_globe.gif is taken as the source. With Karlis Blumentals www.blumentals.net this gif-picture is brought down to 30 stand-alone BMP-pictures. Size 73 x 73 pixels.

 



And with the LCD Converter from www.mcselec.com these BMP’s are turned into DATA-lines. We have noticed that the LCD_EPSON.LBX, the library to drive the LCD-screen (Nokia 6100 type) has some problems crossing the 64 kBytes boundry of the Atmega128. Pictures got blurred, so we used the graphical subroutines from www.display3000.com Real animated, but we had to offer 80 Kbytes just for a nice start-up screen.

The code so far...

$include "globe00.txt"
$include "globe02.txt"
$include "globe04.txt"
$include "globe06.txt"
$include "globe08.txt"
$include "globe10.txt"
$include "globe12.txt"
$include "globe14.txt"
$include "globe16.txt"
$include "globe18.txt"
$include "globe20.txt"
$include "globe22.txt"
$include "globe24.txt"
$include "globe26.txt"
$include "globe28.txt"

 

Some pictures:

Splash!!

On the top the chosen frequency, in de blue box USB or LSB, on the bottom left S-meter, and at the right the step for changing the frequency, 100 Khz.
 

Characterset stored in EEPROM:  
$eeprom 'starts eeprom data

Data &H00 , &H00 , &H00 , &H00 , &H00 ' space
Data &H00 , &H06 , &H5F , &H06 , &H00 ' !
Data &H07 , &H03 , &H00 , &H07 , &H03 ' ''
Data &H24 , &H7E , &H24 , &H7E , &H24 ' #
Data &H24 , &H2B , &H6A , &H12 , &H00 ' $
Data &H63 , &H13 , &H08 , &H64 , &H63 ' %
Data &H36 , &H49 , &H56 , &H20 , &H50 ' &
Data &H00 , &H07 , &H03 , &H00 , &H00 ' '
Data &H00 , &H3E , &H41 , &H00 , &H00 ' (
Data &H00 , &H41 , &H3E , &H00 , &H00 ' )
Data &H08 , &H3E , &H1C , &H3E , &H08 ' *
Data &H08 , &H08 , &H3E , &H08 , &H08 ' +
Data &H00 , &HE0 , &H60 , &H00 , &H00 ' ,
Data &H08 , &H08 , &H08 , &H08 , &H08 ' -
Data &H00 , &H60 , &H60 , &H00 , &H00 ' .
Data &H20 , &H10 , &H08 , &H04 , &H02 ' /
Data &H3E , &H51 , &H49 , &H45 , &H3E ' 0
Data &H00 , &H42 , &H7F , &H40 , &H00 ' 1
Data &H62 , &H51 , &H49 , &H49 , &H46 ' 2
Data &H22 , &H49 , &H49 , &H49 , &H36 ' 3
Data &H18 , &H14 , &H12 , &H7F , &H10 ' 4
Data &H2F , &H49 , &H49 , &H49 , &H31 ' 5
Data &H3C , &H4A , &H49 , &H49 , &H30 ' 6
Data &H01 , &H71 , &H09 , &H05 , &H03 ' 7
Data &H36 , &H49 , &H49 , &H49 , &H36 ' 8
Data &H06 , &H49 , &H49 , &H29 , &H1E ' 9
Data &H00 , &H6C , &H6C , &H00 , &H00 ' :
Data &H00 , &HEC , &H6C , &H00 , &H00 ' ;
Data &H08 , &H14 , &H22 , &H41 , &H00 ' <
Data &H24 , &H24 , &H24 , &H24 , &H24 ' =
Data &H00 , &H41 , &H22 , &H14 , &H08 ' >
Data &H02 , &H01 , &H59 , &H09 , &H06 ' ?
Data &H3E , &H41 , &H5D , &H55 , &H1E ' @
Data &H7E , &H09 , &H09 , &H09 , &H7E ' A
Data &H7F , &H49 , &H49 , &H49 , &H36 ' B
Data &H3E , &H41 , &H41 , &H41 , &H22 ' C
Data &H7F , &H41 , &H41 , &H41 , &H3E ' D
Data &H7F , &H49 , &H49 , &H49 , &H41 ' E
Data &H7F , &H09 , &H09 , &H09 , &H01 ' F
Data &H3E , &H41 , &H49 , &H49 , &H7A ' G
Data &H7F , &H08 , &H08 , &H08 , &H7F ' H
Data &H00 , &H41 , &H7F , &H41 , &H00 ' I
Data &H30 , &H40 , &H40 , &H40 , &H3F ' J
Data &H7F , &H08 , &H14 , &H22 , &H41 'K
Data &H7F , &H40 , &H40 , &H40 , &H40 ' L
Data &H7F , &H02 , &H04 , &H02 , &H7F ' M
Data &H7F , &H02 , &H04 , &H08 , &H7F ' N
Data &H3E , &H41 , &H41 , &H41 , &H3E ' O
Data &H7F , &H09 , &H09 , &H09 , &H06 'P
Data &H3E , &H41 , &H51 , &H21 , &H5E ' Q
Data &H7F , &H09 , &H09 , &H19 , &H66 ' R
Data &H26 , &H49 , &H49 , &H49 , &H32 ' S
Data &H01 , &H01 , &H7F , &H01 , &H01 ' T
Data &H3F , &H40 , &H40 , &H40 , &H3F ' U
Data &H1F , &H20 , &H40 , &H20 , &H1F ' V
Data &H3F , &H40 , &H3C , &H40 , &H3F ' W
Data &H63 , &H14 , &H08 , &H14 , &H63 ' X
Data &H07 , &H08 , &H70 , &H08 , &H07 ' Y
Data &H71 , &H49 , &H45 , &H43 , &H00 ' Z
Data &H00 , &H7F , &H41 , &H41 , &H00 ' [
Data &H02 , &H04 , &H08 , &H10 , &H20 ' \
Data &H00 , &H41 , &H41 , &H7F , &H00 ' ]
Data &H04 , &H02 , &H01 , &H02 , &H04 ' ^
Data &H80 , &H80 , &H80 , &H80 , &H80 ' _
Data &H00 , &H03 , &H07 , &H00 , &H00 ' `
Data &H20 , &H54 , &H54 , &H54 , &H78 ' a
Data &H7F , &H44 , &H44 , &H44 , &H38 ' b
Data &H38 , &H44 , &H44 , &H44 , &H28 ' c
Data &H38 , &H44 , &H44 , &H44 , &H7F ' d
Data &H38 , &H54 , &H54 , &H54 , &H18 ' e
Data &H08 , &H7E , &H09 , &H09 , &H00 ' f
Data &H18 , &HA4 , &HA4 , &HA4 , &H7C ' g
Data &H7F , &H04 , &H04 , &H78 , &H00 ' h
Data &H00 , &H00 , &H7D , &H00 , &H00 ' i
Data &H40 , &H80 , &H84 , &H7D , &H00 ' j
Data &H7F , &H10 , &H28 , &H44 , &H00 ' k
Data &H00 , &H00 , &H7F , &H40 , &H00 ' l
Data &H7C , &H04 , &H18 , &H04 , &H78 ' m
Data &H7C , &H04 , &H04 , &H78 , &H00 ' n
Data &H38 , &H44 , &H44 , &H44 , &H38 ' o
Data &HFC , &H44 , &H44 , &H44 , &H38 ' p
Data &H38 , &H44 , &H44 , &H44 , &HFC ' q
Data &H44 , &H78 , &H44 , &H04 , &H08 ' r
Data &H08 , &H54 , &H54 , &H54 , &H20 ' s
Data &H04 , &H3E , &H44 , &H24 , &H00 ' t
Data &H3C , &H40 , &H20 , &H7C , &H00 ' u
Data &H1C , &H20 , &H40 , &H20 , &H1C ' v
Data &H3C , &H60 , &H30 , &H60 , &H3C ' w
Data &H6C , &H10 , &H10 , &H6C , &H00 ' x
Data &H9C , &HA0 , &H60 , &H3C , &H00 ' y
Data &H64 , &H54 , &H54 , &H4C , &H00 ' z
Data &H08 , &H3E , &H41 , &H41 , &H00 ' {
Data &H00 , &H00 , &H7F , &H00 , &H00 ' |
Data &H00 , &H41 , &H41 , &H3E , &H08 ' }
Data &H02 , &H01 , &H02 , &H01 , &H00 ' ~


$data
 
The menu:

 

 

 

 

Nice picture

 

 

Thanks to:


Thanks to Mark Alberts
the creator of Bascom-AVR
www.mcselec.com

Thanks to Theo Kleijn
www.pa0kn.nl
He has made the hardware for the board and together we have made the Bascom-AVR code working

Flags can be downloaded at www.3DFlags.com

Ben Zijlstra - Ben's HobbyCorner - 2009