Migrating PIC16F876a to PIC18F252
Using PicBasic Pro 2.43 I've migrated from a PIC16F876a to PIC18F252 to take advantage of additional code space.
The PIC18F252 seems to always find the following statment to be TRUE regardless of the magnitudes of the values, i.e.:
IF (frequency < threshold) THEN GoTo main
Elsewhere, in my code, the variables "frequency" and "threshold" are functioning properly when manipulated mathmatically; however, the IF ( ) THEN statements are not fully reliable.
Has anyone had experience such as this?
Thank you,
Jeff
PbP version involved ????
Hi, Jeff
I had such a behaviour and related it on this forum ...
No help went ...
but simply changing subs position cancelled the problem ( test was located in a sub, at the very end of the program !!! )
Alain
PS: archive only keep 500 posts ... was written before !!!
Could be a bug in PBP, don't ever close your mind to it.
I personally have about 99% faith in PBP. No technology in this World is 100% reliable. While I've never actually discovered a bug in PBP myself, I have found a few in Visual Basic. Very strange - I wrote this rather lager program and, I had a variable named (LoopX) used extensively throughout with (For Nexts) Cut a long story short, in one procedure this variable refused to work. Always returning zero. It was globally declared as an integer. After many black cups of coffee and a lot of lost hair I decided to introduce a new variable into the scope of things, variable called (LoopZ) The procedure began to miraculously, flawlessly perform.
Go figure ...:|