Search found 23 matches

by NoSmoke
Wed Jan 27, 2010 8:00 pm
Forum: Compiler
Topic: Another Thing I Can't Figure Out
Replies: 4
Views: 3102

I have had similar oddities. Sometimes having to move declarations around, or having to put each on a separate line. A bit annoying but entirely workaroundable. David B. gave me an explanation some months ago on the Forum - I think that was one of the last times he appeared here. A pity. I would sa...
by NoSmoke
Wed Jan 27, 2010 7:33 pm
Forum: Compiler
Topic: Another Thing I Can't Figure Out
Replies: 4
Views: 3102

octal wrote:Looks like a compiler bug.
if you put all three on the same line it works.

Code: Select all

//Dim AEnable as Boolean
Dim AEnable, BRun, CRun as Boolean
CRun = false 
Yes, that's what I finally did to resolve the problem
maybe a pb du to the optimizer !!!
pb?
by NoSmoke
Wed Jan 27, 2010 4:05 am
Forum: Compiler
Topic: Another Thing I Can't Figure Out
Replies: 4
Views: 3102

Another Thing I Can't Figure Out

Can anyone please tell me why the following code produces the "Error 46" below? If the first line is removed or, if in the third line, CRun is changed to BRun, or, if Boolean in the first line is changed to Integer, it works. I've searched both SF and MPLAB docs and can find no mention of the Error ...
by NoSmoke
Tue Jan 26, 2010 9:19 pm
Forum: Compiler
Topic: Odd Program Start Issue
Replies: 11
Views: 5786

BTW, why are both Clock = 8 and setting OSCCON required? If Clock =8 is removed, the SUART prints garbage. Setting the OSCCON sets the actual clock setup in hardware, the "Clock = 8" tells the compiler itself what speed things are running at for calculating the delays and such. As mentioned before,...
by NoSmoke
Tue Jan 26, 2010 1:54 am
Forum: IDE
Topic: USB Programmer Faster?
Replies: 0
Views: 3145

USB Programmer Faster?

I have an Easy ICD2 programmer with serial port and have found debugging functions to be painfully slow. Was wondering then if a USB version would be significantly faster (or maybe not if the com speed ain't the bottleneck)?

TIA for any suggstions...
by NoSmoke
Tue Jan 26, 2010 1:51 am
Forum: Compiler
Topic: Odd Program Start Issue
Replies: 11
Views: 5786

Raistlin wrote:It's always a good idea to pop a delay at the beginning of your code to let the pic settle. A few hundred milli secs will do it.
Tried that and it works with about 400ms. I guess I'll just leave it at that, unless an explanation pops up, and attribute it to a programmer quirk.
by NoSmoke
Mon Jan 25, 2010 11:04 pm
Forum: Compiler
Topic: Odd Program Start Issue
Replies: 11
Views: 5786

If I enable MCLR and do a reset or power off/on, "Hello" is printed only once (as it should be). If I put in an Include Intosc as suggested, Hello now prints _five_ times! Here's the Include code: // Internal oscillator module (Intosc.bas) // Place as 1st include in program to set internal osc b/f f...
by NoSmoke
Sun Jan 24, 2010 11:26 pm
Forum: Compiler
Topic: Odd Program Start Issue
Replies: 11
Views: 5786

Have noticed that the "Hello World"s begins printing during the programming process. If a add a delay statement to the start of the program (long enough for the programming process to complete), all works normally. The PIC is being powered by the programmer - maybe the power supply is a little light...
by NoSmoke
Sun Jan 24, 2010 5:22 pm
Forum: Compiler
Topic: Odd Program Start Issue
Replies: 11
Views: 5786

Can you give a brief example and also tell us how you are programming the PIC. Device = 18F4520 Clock = 8 Include "SUART.bas" 'Note: S/W UART defaults to inverted signal ' (it then works with a PC serial port) Include "Convert.bas" dim x as integer, in as byte config OSC = intiO7, 'Enable internal ...
by NoSmoke
Sat Jan 23, 2010 8:57 pm
Forum: Compiler
Topic: Odd Program Start Issue
Replies: 11
Views: 5786

Odd Program Start Issue

If I write a simple program that starts by printing a text spring (to the s/w UART connected to a PC), the text string is always "printed" four times. After that, output to the s/w UART is normal.

Can anyone suggest what might be happening here?

TIA
by NoSmoke
Fri Jan 22, 2010 4:22 am
Forum: Wiki Announcements
Topic: SF Library Reference file as PDF
Replies: 4
Views: 9786

Thanks for a useful document.

Just a suggestion though - would it be possible to add a Table of Contents?
by NoSmoke
Sun Jan 17, 2010 8:29 pm
Forum: Compiler
Topic: Strange SE Limitation
Replies: 9
Views: 5313

I can appreciate why scaled integer math would run faster and take less storage but why not use flt pt if storage and sufficient cycles are available? From my POV - Scaled integer maths is white hat programming when considering the devices in use. Becoming familiar with the approach will allow code...
by NoSmoke
Sat Jan 16, 2010 2:52 am
Forum: Compiler
Topic: Strange SE Limitation
Replies: 9
Views: 5313

Not that floats are a good idea anyway - scaled integer maths is by far a better choice for 99% of applications I can appreciate why scaled integer math would run faster and take less storage but why not use flt pt if storage and sufficient cycles are available? Also, how to display a flt pt value?...
by NoSmoke
Sat Jan 16, 2010 2:47 am
Forum: Compiler
Topic: Strange SE Limitation
Replies: 9
Views: 5313

The FloatToStr function in the system library "convert.bas" will exceed the free version limitations, if you want an alternative then try using the FloatToStrSE module found in the User Wiki http://www.sfcompiler.co.uk/wiki/pmwiki.php?n=SwordfishUser.FloatToStrSE (written by Florin Medrea) OK & tha...
by NoSmoke
Fri Jan 15, 2010 3:51 am
Forum: Compiler
Topic: Strange SE Limitation
Replies: 9
Views: 5313

Strange SE Limitation

I have SwordFishSE and have recently tried the FloatToStr function. Even a nominal program with that instruction gives: "Program variable allocation exceeds Swordfish Special Edition (SE) maximum" :shock: My example program is: .......... Device=18f4520 Clock=8 Include "convert.bas" dim zz as string...