Searching \ for '[SX] How to use FREQ alias, ISR rate alias (or com' 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: 'How to use FREQ alias, ISR rate alias (or com'.

Exact match. Not showing close matches.
PICList Thread
'[SX] How to use FREQ alias, ISR rate alias (or com'
2007\11\21@151626 by Zootn/a

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

When using SX/B, and mixing SX/B and ASM, I want to setup my code so that the rate of the ISR is dependent on the freq setting. I don't want to use a lot of '{$IFDEF}s -- is this info aliased or set up as a constant by SX/B?

The help file says that computed constants can not be used for ISR rates? I want to able to just change the freq. directive and have the change cascade throughout the code without adjusting other constants by hand.

I.E., I would like to do something like:

DEVICE OSCHS2
FREQ 20_000_000 and then later on in the program use something like
IsrRate CON __freq / 4
INTERRUPT IsrRate and val1 = __freq * val2 and val1 = val2 / IsrRate etc.

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

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=232105
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\11\21@160455 by beann/a

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

Zoot,
 Don't use the INTERRUPT rate parameter, just use "RETURNINT value". That will give you an interrupt routine that runs every "value" cycles.

 SX/B creates a variable named "__FREQMHZ" that holds the frequency in megahertz.

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

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=232105#m232114
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\11\21@160949 by Zootn/a

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

So RETURNINT can be computed constant? var too?

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

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=232105#m232118
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\11\21@164448 by beann/a

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

Oops, I accidently edited your post instead of making a new post.

RETURNINT can use a variable, but I don't think you can use a computed constant...

If you want an interrupt to execute the same times per second, use "INTERRUPT rate" if you want an interrupt to execute the same number of cycles, use "RETURNINT constant".

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

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=232105#m232124
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...