Search found 22 matches

by manxman
Tue Nov 30, 2010 11:52 am
Forum: Compiler
Topic: Bug when making negative Float comparison
Replies: 7
Views: 4180

Actually, this raises an interesting question, namely what is the best way to perform the arithmetic required to scale an integer value? My current SF project involves a recursive filter loop in which the variable Output is repeatedly scaled by a factor K and then incremented by a new DataValue , i....
by manxman
Fri Nov 26, 2010 5:16 pm
Forum: Compiler
Topic: Bug when making negative Float comparison
Replies: 7
Views: 4180

Thanks for the advice Jerry.

I guess that by using Floats I am being lazy, at least during the development stage of my program where parameters are being optimised. In the final version of my program I will replace Float constants with Integer quotients to maintain the precision you describe.
by manxman
Fri Nov 26, 2010 11:50 am
Forum: Compiler
Topic: Bug when making negative Float comparison
Replies: 7
Views: 4180

I have run a test of comparisons between pairs of random Float values and another test between a random Float and a fixed Integer (which is where I thought the problem might have arisen). It seems that there is indeed no bug in the latest compiler and so I must apologise for needlessly raising the a...
by manxman
Wed Nov 24, 2010 11:53 am
Forum: Compiler
Topic: Bug when making negative Float comparison
Replies: 7
Views: 4180

I am using Version 2.2.0.4 - ICC 1.1.5.5

I will look into this again and report back. I do hope I have not been too hasty!
by manxman
Tue Nov 23, 2010 1:10 pm
Forum: Compiler
Topic: Bug when making negative Float comparison
Replies: 7
Views: 4180

Bug when making negative Float comparison

I have just updated my Swordfish to the latest version and find that the bug when comparing negative Floats still seems to occurs. For example, in my program I want to limit the Float variable Test to be within +/- 20000. A check for Test>20000 works OK but a similar test for less than -20000 does n...
by manxman
Mon Nov 09, 2009 11:51 am
Forum: General
Topic: Maximum voltage into PIC pins
Replies: 5
Views: 4010

:D Cheers Doj. Thanks for your helpful and detailed clarification. As it happens, the 2.5MHz pulses which I am counting peak at around 4.5V so I am safely avoiding those naughty electrons. Actually, I was'nt aware that fundamental electrons had personalities. Presumably, protons chum up with electro...
by manxman
Wed Nov 04, 2009 10:00 am
Forum: General
Topic: Maximum voltage into PIC pins
Replies: 5
Views: 4010

:) Thanks Francis and rmteo. It seems that the safest solution is for me to ensure that the pulses are constrained to no more than VDD+0.3V (=5.3V). This will make for a more reliable product.
by manxman
Mon Nov 02, 2009 3:03 pm
Forum: General
Topic: Maximum voltage into PIC pins
Replies: 5
Views: 4010

Maximum voltage into PIC pins

:? I am using an 18F252 in a project which counts pulses into RA4 (T0CK1) and RC0 (T1CK1). On my board VDD = 5V. What is the maximum voltage of the pulses that I can apply to these pins? Table 22.2 on the datasheet suggests that it is only VDD (5V) but I am not sure I fully understand the specificat...
by manxman
Fri Mar 27, 2009 3:59 pm
Forum: General
Topic: Details of featured product for Mecanique website
Replies: 6
Views: 4448

Article for Swordfish Wiki

:? Steven,

Sorry to be dumb, but I have written an article for the Wiki (in Word) and have 2 pictures to include (as JPG) but cannot email it without your email address nor do I understand the instructions by J Winters!
by manxman
Thu Mar 26, 2009 12:49 pm
Forum: General
Topic: Details of featured product for Mecanique website
Replies: 6
Views: 4448

New product

Thanks for details of the thread. How do I insert images into my post?
by manxman
Wed Mar 25, 2009 7:20 pm
Forum: General
Topic: Details of featured product for Mecanique website
Replies: 6
Views: 4448

Details of featured product for Mecanique website

David,

I have a PIC based product which uses Swordfish for the firmware. How can I send the details to be included in the "Featured Products" section of your website?
by manxman
Thu Mar 12, 2009 12:02 pm
Forum: Compiler
Topic: Bugs in me or Swordfish?
Replies: 1
Views: 1991

Bugs in me or Swordfish?

:? Here are two things which have got me puzzled: In the first, I am simply trying to constrain a Float variable B to be in the range +/- 32767. The following code works OK: If B>32767.0 Then B=32767.0 Endif If B+32767.0<0.0 Then B=-32767.0 Endif However, if I change the second test to: If B<-32767....
by manxman
Mon Aug 25, 2008 11:10 am
Forum: General
Topic: RS232 feeding 2 PC ports
Replies: 0
Views: 3120

RS232 feeding 2 PC ports

:? I have a serial connection from a MAX232 on my PIC board to an RS232 port on my PC. The data are used in a PC graphics and PIC-control application, using both the TX and RX lines. Is there any reason why I cannot split the RX line at the PC into 2 so that I can feed a second RS232 port on the com...
by manxman
Sun Jun 08, 2008 5:42 pm
Forum: General
Topic: I think I am in love
Replies: 5
Views: 4313

:lol: I too coded for a while in Pic Basic Pro until the lack of signed integers, float, procedures, etc, started to feel like swimming in treacle. Swordfish is a brilliant package at a sensible price. However, it needs more vigorous marketing for the developer to reap his just rewards - a search on...
by manxman
Tue Jun 03, 2008 7:08 pm
Forum: Compiler
Topic: Low frequency PWM
Replies: 2
Views: 2339

:oops: I completely forgot to do a search! Yes there are some good ideas, thanks.