Trouble with mikrobasic for dsPIC

General discussion on mikroBasic for dsPIC30/33 and PIC24.
Post Reply
Author
Message
tomreeves84
Posts: 41
Joined: 05 Dec 2005 16:26

Trouble with mikrobasic for dsPIC

#1 Post by tomreeves84 » 05 Jan 2006 13:11

I am having some trouble with a chunk of my code in mikrobasic and i was hopeing somebody could help me. When I run the debugger and I get to set point in my code it just starts to jump around the program for no reason. It is confusing the hell out of me!

The line of code is

Vze = Ve * Sin(gammaE)

If anybody can think of any reason why the code would do this I would appreciate the help.

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: Trouble with mikrobasic for dsPIC

#2 Post by zristic » 05 Jan 2006 13:56

Could you please provide more code that demonstrates the problem.
Thanks.

tomreeves84
Posts: 41
Joined: 05 Dec 2005 16:26

#3 Post by tomreeves84 » 06 Jan 2006 16:22

I'm sorry but i cant place any more of the source code on here as it is for work and they would kill me if i started to put my work on the internet. Is there any reason that i could be having this problem that is already known?

xor
Posts: 5465
Joined: 18 May 2005 00:59
Location: NYC
Contact:

#4 Post by xor » 08 Jan 2006 03:36

I think zristic is correct....you will probably have to show more code if you want help. Following is a sample of your equation that compiles okay and goes through the debugger without a problem.

Code: Select all

dim vze as float
dim ve as float
dim gammae as float

main:
vze = 0
ve = 2
gammaE = 90
vze = ve * Sin(gammae)
nop
end.
[color=darkred][b]xor[/b][/color]
[url=http://circuit-ed.com]CircuitED -[/url]

Post Reply

Return to “mikroBasic for dsPIC30/33 and PIC24 General”