Hi Acetronics
I had the same problem, when you use the macro, be careful about the letters upper and lower case thingy, I mean Blocks and blocks are different when you use MPASM. Darrel wrote blocks in LCDbar_INC file in the difintions, so you have to use blocks, not Blocks in the macro, the same applies for lines and boxed. This worked fine for me.
For example:
Code:
' In LCDbar_INC file you will find the following definitions that darrel wrote:
ASM
lines = 0x10000001 ; Define the Styles
boxed = 0x10000002
blocks = 0x10000003
ENDASM
' No need to change them nay way...
In your code, you will use this macro:
; BARgraph Value, Row, Col, Width, Range, Style
@ BARgraph _VOL_L, 2, 0, 20, 255, Blocks ' Doesn't work
; BARgraph Value, Row, Col, Width, Range, Style
@ BARgraph _VOL_L, 2, 0, 20, 255, blocks ' Works fine
In order to change to Blocks, Lines, and Boxed. Instead of block, lines, and boxed, you have to change the following in LCDBar_INC file:
Code:
ASM
Lines = 0x10000001 ; Define the Styles
Boxed = 0x10000002
Blocks = 0x10000003
ENDASM
And this too:
Code:
if ((Style >= Lines) & (Style <= Blocks)) ; Is Style a valid constant ?
MOVE?CB Style, _BAR_style
else ; NO, treat it like a variable
MOVE?BB Style, _BAR_style
endif
After that you can use Blocks, Lines, and Boxed in your code macro.
Bookmarks