2 Attachment(s)
How to use LCDbar_INC.bas
This is so simple to use. :)
Here's an example of a BARgraph that follows an A/D input.
http://www.darreltaylor.com/files/BAR_Example1.gif
Code:
; Initialize your hardware and LCD first.
DEFINE ADC_BITS 8 ' Number of bits in ADCIN result
ADCON1.7 = 1 ' Right Justify AD result
INCLUDE "LCDbar_INC.bas" ' Include the BARgraph routines
Value VAR WORD ' Must be a WORD even though AD is 8bit
LCDOUT $FE, 1 ' Clear Screen
Loop1:
ADCIN 0, Value
LCDOUT $FE,2,"Value=",DEC Value," "
; syntax- BARgraph Value, Row, Col, Width, Range, Style
@ BARgraph _Value, 2, 0, 16, 255, lines
GOTO Loop1
convert code to PDS (proton development suit)
hi Darrel
thanks for very nice projects
I want to use but I use Proton Suit (crownhill I am registered user) I can convert it but I didn't understand this row how can I convert PDS
BARtemp = BAR_value * BAR_width is ok
BARtemp = DIV32 BAR_range is ok
'*************************************************
Remainder = R2 but not ok how can I calculate
remender from div32 command
regards
ahmet/TURKEY
????????????????????????????
Hi, Darrel
Could you explain those lines to me :
ASM
lines = 0x10000001 ; Define the Styles
boxed = 0x10000002
blocks = 0x10000003
ENDASM
(From LCD_Bar.inc ) ...
My MPLAB 7.30 seems not to understand it ( comes in red ) ... nor me !!!
Alain