Searching \ for '[SX] Can the SX generate a 32 bit word?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/ubicom/devices.htm?key=sx
Search entire site for: 'Can the SX generate a 32 bit word?'.

Exact match. Not showing close matches.
PICList Thread
'[SX] Can the SX generate a 32 bit word?'
2007\07\31@194607 by datacpsn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, datacps wrote:

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.

:eyes:

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=205515
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)


'[SX] Can the SX generate a 32 bit word?'
2007\08\01@093512 by Sparks-R-Funn/a
flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Sparks-R-Fun wrote:

The SX uses an 8-bit core.  Internally all math and logic operations are done using 8-bit numbers.  Larger numbers can be "processed" through the use of additional instructions and logic.  SX/B adds this additional processing whenever Word variables are used instead of Byte variables.  So the answer to your question is that the SX can generate a 32-bit number if you explicitely program it to do this.  However it can not natively do this with a built-in instruction.

  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
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=205515#m205600
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\08\01@144548 by datacpsn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, datacps wrote:

Thanks Sparks..... I thought it could do it which will save me on getting the CO-Chip. I think I will switch to the SX48 which should have room to do  everything I need it to do and I won't have to add another SX 28. I will still use the FRAM chip to store the values that I need to run in automode.
BTW Sparks you have a great website with a lot of fun stuff. Thanks for all your help.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=205515#m205669
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\08\03@141952 by Sparks-R-Funn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Sparks-R-Fun wrote:

The SX48 should be able to process your 32-bit numbers fine if you are willing to take the time to figure out how to do it.

  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
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=205515#m206127
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\08\04@093210 by datacpsn/a
flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, datacps wrote:

Thanks again Sparks.. I am reading the information on the SX/List I am trying to figure out how to convert the value from my encoders to a 32 bit. In the examples it show how to add and multiply ect.. I have my sub already readiing my encoders then generating the freqout.  I have to look at it and see if there is anyway to convert to 32 bit or I have to change my sub to create the 32 bit value. I am out of RAM so I have to go to the SX/48.  I am ordering the SX/48 board for ten dollars.. You can't beat that .. and you are right about how Parallax and Sparkfun. If it where not for the Stamp I would have never got into this hobby and if it wasn't for this forum and the members here like yourself I would have never been able to complete my projects.  I am just upset I did not get into it sooner because it is so much fun that I am addicted to it.  This is way better than video games.. AS for the MATH it is not my best subject so it will take me a little time to figure it out. I also have to figure a way to store the 32 bit value to the FRAM chip and then run them in a autorun mode.  I am open to suggestions...Thanks again
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=205515#m206270
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\08\05@114356 by peterverkaikn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, peterverkaik wrote:

If you want to do 32bit math easily, check out C4SX:
http://forums.parallax.com/forums/default.aspx?f=7&m=203602
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;).

    regards peter
    ---------- End of Message ----------

    You can view the post on-line at:
    http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=205515#m206456
    Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
    The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

  • 2007\08\06@174217 by datacpsn/a

    flavicon
    face
    In SX Microcontrollers, SX/B Compiler and SX-Key Tool, datacps wrote:

    I looked at the link but I like using SX/B for now. I will try to do it in SX/B if possible I don't know how I will do it yet. It looks like I will have to eventually learn assembly, or C or another language to do more complicated programming. There should be a way to do it with SX/B I was hoping someone pointed me in the right direction......Thanks for the info Peter.

    ---------- End of Message ----------

    You can view the post on-line at:
    http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=205515#m206787
    Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
    The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

    2007\08\07@055612 by beann/a

    flavicon
    face
    In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote:

    Carlos,
     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.

    ---------- End of Message ----------

    You can view the post on-line at:
    http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=205515#m206875
    Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
    The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

    2007\08\07@190957 by datacpsn/a

    flavicon
    face
    In SX Microcontrollers, SX/B Compiler and SX-Key Tool, datacps wrote:

    Wow Bean thanks again. You make it seems so easy. I would of tried to change the entire Sub. It just needed your touch to a few lines and there it is.  This chip and Parallax just keep amazing me. When I think I have to go to a bigger chip or another chip people like yourself have solutions for newbies and others on this forum.

    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..

    ---------- End of Message ----------

    You can view the post on-line at:
    http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=205515#m207090
    Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
    The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

    More... (looser matching)
    - Last day of these posts
    - In 2007 , 2008 only
    - Today
    - New search...