I really like mB Pro's assignable 'Symbol' feature and use it a lot in my projects, but on this project I was just programming away without thinking fully about the context of the variables I was using and did this:
Code: Select all
'------------------------------------------------------------------------------
Symbol RELAY_1 = PE_GPAB.0
Symbol RELAY_2 = PE_GPAB.1
Symbol RELAY_3 = PE_GPAB.2
Symbol RELAY_4 = PE_GPAB.3
Symbol RELAY_5 = PE_GPAB.4
Symbol RELAY_6 = PE_GPAB.5
Symbol RELAY_7 = PE_GPAB.6
Symbol RELAY_8 = PE_GPAB.7
Symbol RELAY_9 = PE_GPAB.8
Symbol FUEL_PUMP = PE_GPAB.9
Symbol VENT_FAN = PE_GPAB.10
Symbol RELAY_10 = PE_GPAB.11
Symbol TS_POWER = PE_GPAB.12
Symbol PM_SLEEP = PE_GPAB.13
Symbol RS232_EN = PE_GPAB.14
dim PE_GPAB as Word
'--------------------------------------------------------------------------------------
' rest of program...........
The Language Reference Manual states that direct bit manipulation can done on Byte type variables.
Can we actually do this on Word (or larger data types?) this easily?
If not, is it something you could add easily to future versions?
I am not using that code in my program now, changed the Symbol assignments to two separate Byte variables just in case it would compile but not run on the PIC after examining the 'def' file for the PIC and seeing only declarations for bits 0-7 and B0-B7.
Just curious and would like the feature if possible as it would result in less program lines to mass modify the group and faster to pass along a SPI bus as one Word instead of as two separate Bytes...? (at least in mBasicPro, not sure about the coding size it would generate as a inline function or library routine)
Thanks again for a Great evolving product, Mhz. B^)
[edit] p.s. Sorry, forgot, using mBasic Pro V4 Beta when this happened. And not sure if it should be in the 'Beta Bug reports' instead of here? Kind of fits both. ?
Mhz.