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!