Can the SX generate a 32 bit word?
I read the information on the DDS that uses a 32 bit word command to generate a frequency from 0 to 30 mhz. I also got info that the prop chip can do it but I don't know assembly or Spin.· I have my circuit working perfectly Thanks to Bean with a freqout up top 20Khz with 1 hz accuracy of 1 hz.· The um-fpu chip is 14.00 dollars just to write 32 bit words. Then another 14 for the DDS chip.. I also was wondering what is the highest freqout possible (it does not have to be accurate above 20khz.) It just needs to send a high freqout to pulse a neon transformer and light up a tube. I was testing one and I set my Function generator to 271khz to light the tube I was using.·I did my·PCB layout to include both chips and a fram chip too incase I need to go that route...·I am trying to figure out which way to go on this?
Also the EEPROMs are 2.40 @ I rather buy another sxchip 28 or 48 for 2.51 and get 50 million times better chip.
·
Also the EEPROMs are 2.40 @ I rather buy another sxchip 28 or 48 for 2.51 and get 50 million times better chip.

Comments
You may want to look at the 32-bit math routines found on SxList.com If you want to learn to do 32-bit math on the SX you can save $14.00 - $2.51 = $11.49. If you think it will take you more than an hour or two to set that up and want to save time… $14 might not seem so steep!
I can not speak with authority on the maximum frequency limitation of the SX. However, I expect it will be in the MHz range when coupled with an appropriate oscillator. It should be more than enough to drive your neon transformer.
I hope this helps.
- Sparks
BTW Sparks you have a great website with a lot of fun stuff. Thanks for all your help.
As for the website, I assume you are referring to SparkFun.com. I agree. It is a great site! Unfortunately I had no part in that and am not affiliated with the site. I have noticed, however, that a good formula for success in the hobby world is to give information away for free and charge reasonable prices for your products. Parallax and SparkFun both do a great job of this!
Let us know if you get 32-bit math working. I am sure there will be others interested in doing 32-bit math at some point.
- Sparks
http://forums.parallax.com/showthread.php?p=663042
The cc1b compiler supports 32bit integer, fixed point and floating point math.
It uses operator overloading so you can use the normal expression symbols
* + - / % (eg. float c = a * b[noparse];)[/noparse].
regards peter
· Here is a routine you can add to the program I already wrote for you that will set the frequency to 8 times the value given. It is a modified version of the original subroutine. You can have both in your program.
· This SetFreqX8 works up to 388KHz (by specifying a value of 48500).
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Teacher: What is the difference between ignorance and apathy ?
Student: I don't know and I don't care
Teacher: Correct !
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
Post Edited (Bean (Hitt Consulting)) : 8/7/2007 12:59:51 PM GMT
The code for 32 bit
DO
IF freqWanted < 12208 THEN
freqWanted = freqWanted << 1 ' * 2
INC optReg ' Adjust prescaler
ENDIF
LOOP UNTIL freqWanted >= 12208
Original code
DO
IF freqWanted > 24414 THEN
freqWanted = freqWanted >> 1 ' / 2
DEC optReg ' Adjust prescaler
ENDIF
LOOP UNTIL freqWanted <= 24414
With just a few lines of code you can do it just like that.. I was reading all the other stuff and did not have a clue where to begin. I am out of Ram but you just changed a few lines of the original code and it now generates 32 bit. I don't think I can find the words to thank you bean and the other great members on this site.. I am not sure enough to explain what you did but it looks like you multiplied the freqwanted by 2 and inc the adjust prescale .
new code
IF freqWanted > 70 THEN
optReg = 1 ' Assume prescaler is 1:1
' Adjust prescaler to keep frequency above 12207
original code
IF freqWanted >= 382 THEN
optReg = 4 ' Assume prescaler is 1:8
I posted what I see and hope that maybe this will help other members that may have the same question..