Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old May 29th 04, 03:30 AM
Ken Scharf
 
Posts: n/a
Default dds + pic

Has anybody here attempted to use a pic to control a dds chip (and
wrote the software himself)? I was looking at G3XJP's article on
his 'pic-n-mix' vfo using an 16C84 to control an AD9850. I can't
belive he was able to get all that functionality into just 1k of
code and 64 bytes of eeprom. (you can find his article as an apnote
on the Analog Devices web site ... AN-557 is the number)

I'm thinking of using the AD9954 dds chip instead of the 9850.

I'm just starting to look at what's required in code to get from
a BCD input to the DDS word. Keep in mind G3XJP didn't hard code
his clock as a constant, it can be adjusted. The formula to
get the DDS word involves some math with fractional parts, it can
be done in interger math with some scaling or lookup tables, but
there isn't much room in a pic. I just ordered some 16F88's with
4k of program space and 256 bytes of eeprom so I would have a little
more room.

Any starting ideas would be welcome!

  #2   Report Post  
Old May 29th 04, 04:01 AM
W3JDR
 
Posts: n/a
Default

It's really not difficult at all once you understand the DDS serial message
structure. I did it in PICBasic with a 14F675 and a AD9850 DDS for my HF Lab
System, including a 9600 baud software UART and a few routines that do
analog capture and log detector calibration
(http://mysite.verizon.net/jdrocci/). The whole code footprint was about 600
words if I recall, and it could be much smaller if it were coded in
assembly, as the Basic compiler loads a number of subroutines that don't
always get called. If you're daunted by the math involved, PICBasic might be
the way to go as it includes multiply & divide capabilities.

Joe
W3JDR


"Ken Scharf" wrote in message
...
Has anybody here attempted to use a pic to control a dds chip (and
wrote the software himself)? I was looking at G3XJP's article on
his 'pic-n-mix' vfo using an 16C84 to control an AD9850. I can't
belive he was able to get all that functionality into just 1k of
code and 64 bytes of eeprom. (you can find his article as an apnote
on the Analog Devices web site ... AN-557 is the number)

I'm thinking of using the AD9954 dds chip instead of the 9850.

I'm just starting to look at what's required in code to get from
a BCD input to the DDS word. Keep in mind G3XJP didn't hard code
his clock as a constant, it can be adjusted. The formula to
get the DDS word involves some math with fractional parts, it can
be done in interger math with some scaling or lookup tables, but
there isn't much room in a pic. I just ordered some 16F88's with
4k of program space and 256 bytes of eeprom so I would have a little
more room.

Any starting ideas would be welcome!



  #3   Report Post  
Old May 29th 04, 04:01 AM
W3JDR
 
Posts: n/a
Default

It's really not difficult at all once you understand the DDS serial message
structure. I did it in PICBasic with a 14F675 and a AD9850 DDS for my HF Lab
System, including a 9600 baud software UART and a few routines that do
analog capture and log detector calibration
(http://mysite.verizon.net/jdrocci/). The whole code footprint was about 600
words if I recall, and it could be much smaller if it were coded in
assembly, as the Basic compiler loads a number of subroutines that don't
always get called. If you're daunted by the math involved, PICBasic might be
the way to go as it includes multiply & divide capabilities.

Joe
W3JDR


"Ken Scharf" wrote in message
...
Has anybody here attempted to use a pic to control a dds chip (and
wrote the software himself)? I was looking at G3XJP's article on
his 'pic-n-mix' vfo using an 16C84 to control an AD9850. I can't
belive he was able to get all that functionality into just 1k of
code and 64 bytes of eeprom. (you can find his article as an apnote
on the Analog Devices web site ... AN-557 is the number)

I'm thinking of using the AD9954 dds chip instead of the 9850.

I'm just starting to look at what's required in code to get from
a BCD input to the DDS word. Keep in mind G3XJP didn't hard code
his clock as a constant, it can be adjusted. The formula to
get the DDS word involves some math with fractional parts, it can
be done in interger math with some scaling or lookup tables, but
there isn't much room in a pic. I just ordered some 16F88's with
4k of program space and 256 bytes of eeprom so I would have a little
more room.

Any starting ideas would be welcome!



  #4   Report Post  
Old May 29th 04, 04:26 AM
Ken Scharf
 
Posts: n/a
Default

W3JDR wrote:
It's really not difficult at all once you understand the DDS serial message
structure. I did it in PICBasic with a 14F675 and a AD9850 DDS for my HF Lab
System, including a 9600 baud software UART and a few routines that do
analog capture and log detector calibration
(http://mysite.verizon.net/jdrocci/). The whole code footprint was about 600
words if I recall, and it could be much smaller if it were coded in
assembly, as the Basic compiler loads a number of subroutines that don't
always get called. If you're daunted by the math involved, PICBasic might be
the way to go as it includes multiply & divide capabilities.

Joe
W3JDR

I'm not familiar with the picbasic, unless thats an extension of the
basic stamp product. I'm fairly good with assembler code, though the
pic processor is new to me (I'm more familiar with the 8051, 80x86
and other Intel processors). The pic seems to be a much simpler
instruction set (more RISC like). Compared to the 8051, the
instructions per clock on the pic look a little better than the
8051 so performance should be good.

The work that needs to be done seems clear to me, the best way to
write the needed basic routines in assembler (for the pic anyway)
will take some study, to get the fewest lines of code required to
fit in the limited space. If anybody has good binary to bcd and
32 bit multiply and divide routines alread written it would help
not to have to re-invent those wheels. (Maybe a search on google
is in order here).

My pet-pieve on ham projects published in magazines are those
authors that DONT make their source code available, but sell
burned proms or pics. Publishing a construction article using
a micro without the source code available is like NOT providing
the schematic, but offering a PCB!!! How are hams going to
improve the state of the art if we don't share!!!

Ok off the soap box!




"Ken Scharf" wrote in message
...

Has anybody here attempted to use a pic to control a dds chip (and
wrote the software himself)? I was looking at G3XJP's article on
his 'pic-n-mix' vfo using an 16C84 to control an AD9850. I can't
belive he was able to get all that functionality into just 1k of
code and 64 bytes of eeprom. (you can find his article as an apnote
on the Analog Devices web site ... AN-557 is the number)

I'm thinking of using the AD9954 dds chip instead of the 9850.

I'm just starting to look at what's required in code to get from
a BCD input to the DDS word. Keep in mind G3XJP didn't hard code
his clock as a constant, it can be adjusted. The formula to
get the DDS word involves some math with fractional parts, it can
be done in interger math with some scaling or lookup tables, but
there isn't much room in a pic. I just ordered some 16F88's with
4k of program space and 256 bytes of eeprom so I would have a little
more room.

Any starting ideas would be welcome!




  #5   Report Post  
Old May 29th 04, 04:26 AM
Ken Scharf
 
Posts: n/a
Default

W3JDR wrote:
It's really not difficult at all once you understand the DDS serial message
structure. I did it in PICBasic with a 14F675 and a AD9850 DDS for my HF Lab
System, including a 9600 baud software UART and a few routines that do
analog capture and log detector calibration
(http://mysite.verizon.net/jdrocci/). The whole code footprint was about 600
words if I recall, and it could be much smaller if it were coded in
assembly, as the Basic compiler loads a number of subroutines that don't
always get called. If you're daunted by the math involved, PICBasic might be
the way to go as it includes multiply & divide capabilities.

Joe
W3JDR

I'm not familiar with the picbasic, unless thats an extension of the
basic stamp product. I'm fairly good with assembler code, though the
pic processor is new to me (I'm more familiar with the 8051, 80x86
and other Intel processors). The pic seems to be a much simpler
instruction set (more RISC like). Compared to the 8051, the
instructions per clock on the pic look a little better than the
8051 so performance should be good.

The work that needs to be done seems clear to me, the best way to
write the needed basic routines in assembler (for the pic anyway)
will take some study, to get the fewest lines of code required to
fit in the limited space. If anybody has good binary to bcd and
32 bit multiply and divide routines alread written it would help
not to have to re-invent those wheels. (Maybe a search on google
is in order here).

My pet-pieve on ham projects published in magazines are those
authors that DONT make their source code available, but sell
burned proms or pics. Publishing a construction article using
a micro without the source code available is like NOT providing
the schematic, but offering a PCB!!! How are hams going to
improve the state of the art if we don't share!!!

Ok off the soap box!




"Ken Scharf" wrote in message
...

Has anybody here attempted to use a pic to control a dds chip (and
wrote the software himself)? I was looking at G3XJP's article on
his 'pic-n-mix' vfo using an 16C84 to control an AD9850. I can't
belive he was able to get all that functionality into just 1k of
code and 64 bytes of eeprom. (you can find his article as an apnote
on the Analog Devices web site ... AN-557 is the number)

I'm thinking of using the AD9954 dds chip instead of the 9850.

I'm just starting to look at what's required in code to get from
a BCD input to the DDS word. Keep in mind G3XJP didn't hard code
his clock as a constant, it can be adjusted. The formula to
get the DDS word involves some math with fractional parts, it can
be done in interger math with some scaling or lookup tables, but
there isn't much room in a pic. I just ordered some 16F88's with
4k of program space and 256 bytes of eeprom so I would have a little
more room.

Any starting ideas would be welcome!






  #6   Report Post  
Old May 29th 04, 12:39 PM
W3JDR
 
Posts: n/a
Default

Ken,
PICBasic isn't a "Basic Stamp". It's a true compiler that you program in
Basic and it produces PIC object code that can be programmed into any PIC.
There are also several "C" compilers that have similar capabilities. I like
PICBasic because it takes care of all the initialization housekeeping, has a
watchdog timer, and contains many useful high-level directives for things
like software A-D conversion, software UART, SPI serial I/O, math, & much
more. The best product is made by made by Micro Engineering Labs
(www.melabs.com) and they call it PICBasic Pro, but their product is a
little pricey. There's also a $20 version from www.oshonsoft.com that's
essentially the same. Both compilers make PIC programming a breeze, and also
produce relatively tight & fast code. Also, you can mix Basic & assembler in
your source program if you wish.

Joe
W3JDR

"Ken Scharf" wrote in message
...
W3JDR wrote:
It's really not difficult at all once you understand the DDS serial

message
structure. I did it in PICBasic with a 14F675 and a AD9850 DDS for my HF

Lab
System, including a 9600 baud software UART and a few routines that do
analog capture and log detector calibration
(http://mysite.verizon.net/jdrocci/). The whole code footprint was about

600
words if I recall, and it could be much smaller if it were coded in
assembly, as the Basic compiler loads a number of subroutines that don't
always get called. If you're daunted by the math involved, PICBasic

might be
the way to go as it includes multiply & divide capabilities.

Joe
W3JDR

I'm not familiar with the picbasic, unless thats an extension of the
basic stamp product. I'm fairly good with assembler code, though the
pic processor is new to me (I'm more familiar with the 8051, 80x86
and other Intel processors). The pic seems to be a much simpler
instruction set (more RISC like). Compared to the 8051, the
instructions per clock on the pic look a little better than the
8051 so performance should be good.

The work that needs to be done seems clear to me, the best way to
write the needed basic routines in assembler (for the pic anyway)
will take some study, to get the fewest lines of code required to
fit in the limited space. If anybody has good binary to bcd and
32 bit multiply and divide routines alread written it would help
not to have to re-invent those wheels. (Maybe a search on google
is in order here).

My pet-pieve on ham projects published in magazines are those
authors that DONT make their source code available, but sell
burned proms or pics. Publishing a construction article using
a micro without the source code available is like NOT providing
the schematic, but offering a PCB!!! How are hams going to
improve the state of the art if we don't share!!!

Ok off the soap box!




"Ken Scharf" wrote in message
...

Has anybody here attempted to use a pic to control a dds chip (and
wrote the software himself)? I was looking at G3XJP's article on
his 'pic-n-mix' vfo using an 16C84 to control an AD9850. I can't
belive he was able to get all that functionality into just 1k of
code and 64 bytes of eeprom. (you can find his article as an apnote
on the Analog Devices web site ... AN-557 is the number)

I'm thinking of using the AD9954 dds chip instead of the 9850.

I'm just starting to look at what's required in code to get from
a BCD input to the DDS word. Keep in mind G3XJP didn't hard code
his clock as a constant, it can be adjusted. The formula to
get the DDS word involves some math with fractional parts, it can
be done in interger math with some scaling or lookup tables, but
there isn't much room in a pic. I just ordered some 16F88's with
4k of program space and 256 bytes of eeprom so I would have a little
more room.

Any starting ideas would be welcome!






  #7   Report Post  
Old May 29th 04, 12:39 PM
W3JDR
 
Posts: n/a
Default

Ken,
PICBasic isn't a "Basic Stamp". It's a true compiler that you program in
Basic and it produces PIC object code that can be programmed into any PIC.
There are also several "C" compilers that have similar capabilities. I like
PICBasic because it takes care of all the initialization housekeeping, has a
watchdog timer, and contains many useful high-level directives for things
like software A-D conversion, software UART, SPI serial I/O, math, & much
more. The best product is made by made by Micro Engineering Labs
(www.melabs.com) and they call it PICBasic Pro, but their product is a
little pricey. There's also a $20 version from www.oshonsoft.com that's
essentially the same. Both compilers make PIC programming a breeze, and also
produce relatively tight & fast code. Also, you can mix Basic & assembler in
your source program if you wish.

Joe
W3JDR

"Ken Scharf" wrote in message
...
W3JDR wrote:
It's really not difficult at all once you understand the DDS serial

message
structure. I did it in PICBasic with a 14F675 and a AD9850 DDS for my HF

Lab
System, including a 9600 baud software UART and a few routines that do
analog capture and log detector calibration
(http://mysite.verizon.net/jdrocci/). The whole code footprint was about

600
words if I recall, and it could be much smaller if it were coded in
assembly, as the Basic compiler loads a number of subroutines that don't
always get called. If you're daunted by the math involved, PICBasic

might be
the way to go as it includes multiply & divide capabilities.

Joe
W3JDR

I'm not familiar with the picbasic, unless thats an extension of the
basic stamp product. I'm fairly good with assembler code, though the
pic processor is new to me (I'm more familiar with the 8051, 80x86
and other Intel processors). The pic seems to be a much simpler
instruction set (more RISC like). Compared to the 8051, the
instructions per clock on the pic look a little better than the
8051 so performance should be good.

The work that needs to be done seems clear to me, the best way to
write the needed basic routines in assembler (for the pic anyway)
will take some study, to get the fewest lines of code required to
fit in the limited space. If anybody has good binary to bcd and
32 bit multiply and divide routines alread written it would help
not to have to re-invent those wheels. (Maybe a search on google
is in order here).

My pet-pieve on ham projects published in magazines are those
authors that DONT make their source code available, but sell
burned proms or pics. Publishing a construction article using
a micro without the source code available is like NOT providing
the schematic, but offering a PCB!!! How are hams going to
improve the state of the art if we don't share!!!

Ok off the soap box!




"Ken Scharf" wrote in message
...

Has anybody here attempted to use a pic to control a dds chip (and
wrote the software himself)? I was looking at G3XJP's article on
his 'pic-n-mix' vfo using an 16C84 to control an AD9850. I can't
belive he was able to get all that functionality into just 1k of
code and 64 bytes of eeprom. (you can find his article as an apnote
on the Analog Devices web site ... AN-557 is the number)

I'm thinking of using the AD9954 dds chip instead of the 9850.

I'm just starting to look at what's required in code to get from
a BCD input to the DDS word. Keep in mind G3XJP didn't hard code
his clock as a constant, it can be adjusted. The formula to
get the DDS word involves some math with fractional parts, it can
be done in interger math with some scaling or lookup tables, but
there isn't much room in a pic. I just ordered some 16F88's with
4k of program space and 256 bytes of eeprom so I would have a little
more room.

Any starting ideas would be welcome!






  #8   Report Post  
Old May 29th 04, 04:06 PM
xpyttl
 
Posts: n/a
Default

"Ken Scharf" wrote in message
...

Has anybody here attempted to use a pic to control a dds chip (and
wrote the software himself)?


Wander on over to
http://www.amqrp.org/elmer160/board/index.html
and click the 'Test Software.ZIP' link. In the source is just a few lines
to control the DDS. That particular program does everything but the kitchen
sink, and the DDS part is just a tiny fraction. The advantage here is that
the DDS code is split out, and you can see just how simple it really is.

Then, click on the 'VFO Software.ZIP' link. That piece of code for the same
hardware is really focused on the VFO capability, and has all sorts of
features.

I think Craig still has the original code still in there from WB2V that
allows you to calibrate your oscillator against WWV. If not, the original
'SigGen' code does. Google for SigGen, WB2V, WB9KZY or AA0ZZ.

...


  #9   Report Post  
Old May 29th 04, 04:06 PM
xpyttl
 
Posts: n/a
Default

"Ken Scharf" wrote in message
...

Has anybody here attempted to use a pic to control a dds chip (and
wrote the software himself)?


Wander on over to
http://www.amqrp.org/elmer160/board/index.html
and click the 'Test Software.ZIP' link. In the source is just a few lines
to control the DDS. That particular program does everything but the kitchen
sink, and the DDS part is just a tiny fraction. The advantage here is that
the DDS code is split out, and you can see just how simple it really is.

Then, click on the 'VFO Software.ZIP' link. That piece of code for the same
hardware is really focused on the VFO capability, and has all sorts of
features.

I think Craig still has the original code still in there from WB2V that
allows you to calibrate your oscillator against WWV. If not, the original
'SigGen' code does. Google for SigGen, WB2V, WB9KZY or AA0ZZ.

...


  #10   Report Post  
Old May 29th 04, 05:07 PM
Ken Scharf
 
Posts: n/a
Default

xpyttl wrote:
"Ken Scharf" wrote in message
...


Has anybody here attempted to use a pic to control a dds chip (and
wrote the software himself)?



Wander on over to
http://www.amqrp.org/elmer160/board/index.html
and click the 'Test Software.ZIP' link. In the source is just a few lines
to control the DDS. That particular program does everything but the kitchen
sink, and the DDS part is just a tiny fraction. The advantage here is that
the DDS code is split out, and you can see just how simple it really is.

Then, click on the 'VFO Software.ZIP' link. That piece of code for the same
hardware is really focused on the VFO capability, and has all sorts of
features.

I think Craig still has the original code still in there from WB2V that
allows you to calibrate your oscillator against WWV. If not, the original
'SigGen' code does. Google for SigGen, WB2V, WB9KZY or AA0ZZ.

..


The amqrp.org site has lots of good stuff there, thanks.

Google turned up http://www.njqrp.org/ham-pic/projects.htm
Lots of good code there. Best way to learn how to program
a new micro is to look at code already written for it. Thanks!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 RadioBanter.
The comments are property of their posters.
 

About Us

"It's about Radio"

 

Copyright © 2017