If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I want to add BME280 to my Sprouter, but I have 3k2 free space, and I need at least 4k3 free, and a bit more, for some simple calc.
I have a Main-Menu with 23 items and 2-lines on a 2x16 LCD.
My thoughts are;
Replace 45k22 with 46k22 but thats not easy todo,
Or;
Replace 46 Print commands into,
MainMenu: ' Rotary Switch

Probably wrong but compile without using Print, then compile with Print and subtract one fro the other. I suspect that the Print command itself isn't that big, all the clever formatting is a different part of the compiler.

Hello, its great to see you using the ProtonBasic Forum. Support for the ProtonBasic compiler is provided by the community via this forum. The forum provided by and administered by Crownhill Associates.
Several forum members kindly offer their support by helping to moderate messages posted on the forum, this keeps them very busy ! From time to...

Do we want to delete old versions.
what if someone has old code that needs to be modified and recompiled?
Rewriting old code to generate source that will compile in the latest version could be an expensive process.
Time consuming and costly, Don't you think?

The VL53L0X is a new generation Time-of-Flight (ToF) laser-ranging module housed in the smallest package on the market today, providing accurate distance measurement whatever the target reflectances unlike conventional technologies. It can measure absolute distances up to 2m, setting a new benchmark in ranging performance levels, opening the door...

MTH,
Write a small article to the Wiki please. Doing so this piece of great code will not get lost in the forum.

As for the highlighting, I can not remember how that is handled but it may have something to do with the bit names either not being included or different to those you are using in either the bit name or PPI files but without knowing what device you are using I am unable to check that or that or reproduce the issue.

Re: Correct use of bit names

Thanks Stephen for the reply,

Even if I do not disable the interrupt, i.e. GIE = 0, like you did, INTCON = $00 register will stop the `external interrupt', the one I want to disable. However, if I try to write only one bit, in my case INTCON.4 = 0 the external interrupt on RB.0 does not stop.

So I am sticking with writing the whole INTCON at once rather than INTCON.4 alone.

Regarding the highlighting I used the PDS BNF tool from hadv215 to generate the bit names and works great.

I use that type of alignment to make code more friendly to read, never had an issue till now.

Re: Correct use of bit names

Take a look at the device's .def file. You'll see all the bit names that are easy to use and remember. They also highlight green when used within a program. The .def files can be found in "C:\Program Files (x86)\ProtonIDE\PDS\Includes\Defs"

Re: Correct use of bit names

Thanks Les. That is super easy how to set or clear.

For my problem, I did some further tests and I test for the INTCON.4 bit if it is changed. It seems to be changed however, once cleared, the pic still `accepts' external interrupt on INT0. Must be a device problem as clearing the INTCON.4 should stop interrupt on INT0.

I took another approach to solve my problem I was having. Thanks everyone for your inputs.