Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB

Sponsor

controlSUITE™ software
Comprehensive.
Intuitive.
Optimized.

Real-world software for real-time control. Details Here!

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | BasicX | Multitasking and use of Pow() function

Discussion forum for the BasicX family of microcontroller chips.

Multitasking and use of Pow() function - Santhosh Jayarajan - Mar 2 11:41:24 2009

Group,
I have noticed that when I use the Pow() statement in a task the task locks and the program stops running.
Here are the details:
I have used a Sharp distance sensor and as a part of the sub I use a Pow() statement to get the actual distance.This sub I use as a task to be scanned every 10 msec.
When the Pow () or ^ statement is executed the program locks and the microcontroller has to be reset.When this statement is removed everything is fine.
Anyone with the same problem?Any Solutions?

Santhosh Jayarajan

[Non-text portions of this message have been removed]

------------------------------------



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )


Re: Multitasking and use of Pow() function - Tom Becker - Mar 2 11:50:42 2009

> ... scanned every 10 msec.

Assign enough stack for the task? Does it run if you slow that rate down?
Tom
------------------------------------



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Multitasking and use of Pow() function - Santhosh Jayarajan - Mar 2 19:42:50 2009

Group,
I used a 30 byte stack.Slowing down did not help.This problem is not seen when I use /,*,+,-.Only seen when Pow() or ^ is used.
Is 30 byte stack adequate?Other task(there are 5) do not have any such problems.

Santhosh Jayarajan

--- On Mon, 3/2/09, Tom Becker wrote:
From: Tom Becker
Subject: Re: [BasicX] Multitasking and use of Pow() function
To: b...@yahoogroups.com
Date: Monday, March 2, 2009, 8:50 AM

> ... scanned every 10 msec.

Assign enough stack for the task? Does it run if you slow that rate down?

Tom

[Non-text portions of this message have been removed]

------------------------------------



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Multitasking and use of Pow() function - Tom Becker - Mar 2 20:20:56 2009

> ... I used a 30 byte stack.

There is a good chance that's insufficient. Try increasing it, first
generously; if your code starts working, then trim it back until you run
into trouble again. If you can locate it, Mike Perks' bxDism will help,
probably exactly, determine the stack requirements of your code.

Tom
------------------------------------



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Multitasking and use of Pow() function - Santhosh Jayarajan - Mar 2 21:19:12 2009

Tom,
Thanks for the support.Let me try your suggestions.
Santhosh
MALAYSIA

Santhosh Jayarajan

--- On Mon, 3/2/09, Tom Becker wrote:
From: Tom Becker
Subject: Re: [BasicX] Multitasking and use of Pow() function
To: b...@yahoogroups.com
Date: Monday, March 2, 2009, 5:20 PM

> ... I used a 30 byte stack.

There is a good chance that's insufficient. Try increasing it, first

generously; if your code starts working, then trim it back until you run

into trouble again. If you can locate it, Mike Perks' bxDism will help,

probably exactly, determine the stack requirements of your code.

Tom

[Non-text portions of this message have been removed]

------------------------------------

______________________________
controlSUITE™ software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!



(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )