Long ago thre was a variable named "long"
Hello out there!
ten years ago there existet a variable called "Long" which made it easier to caculate more precise without usung floating point tools. I´m counting distances in 8 bit which lowers my precision to about 2-3% of the distance.
What happened to "Long" ?
is there a simple cure?
Re: Long ago thre was a variable named "long"
It is available on PIC18F processors. To enable it, click on "View" in your PBP header, then select "Compile & Program Options...". In the pop-up window select the checkbox "Use Compiler Long Words (18 Series MCU Only)"
Once activated, it is on all the time (until you turn it back off). If you try to work with a PIC16F processor, you will get compiler errors because of the Long. In other words, turn it on when you need it, and turn it back off when you're done.
Re: Long ago thre was a variable named "long"
Thank you quite a bundle, man!
Re: Long ago thre was a variable named "long"
In my PBP Version this option doesn´t exist, i can simply write X VAR LONG and compile it. Micro code Studio 3.0.0.5
Re: Long ago thre was a variable named "long"
First, it's only available on PIC18F devices. Go to "View/Compile and Program Options". A pop-up will appear. Check the top check box which reads, "Use Compiler Long Words (18 Series MCU Only)"
Your MicroCode Studio version and your PBP version are different. My MicroStudio is Version 5.0.0.5 while my PBP is Version 3.1.0.4. Not sure if you're confusing them.
Re: Long ago thre was a variable named "long"
What about the Word variable size (16 bits I think).
"w0 VAR word"