I am looking for a code snippet do display 8 DMX channel values on a 16x2 LCD (This Line) using Barngraphs + C51 + 8051M.
I searched the hole net but could not find any, there are codes for showing vu-meter but the bargraph is horizontal. I want them vertical.
Any help is wanted
regards
HELP SOON PLEASE.
A simple "NOW" never works. Try "NOW".
"...the bargraph is horizontal. I want them vertical."
Turn the display 90 degrees.
As the wise man once said: "job jobbed".
Try searching the Internet; it's almost complete, with much fewer holes.
I am looking for a code snippet
when that fails I write "the snippet" myself, try that, it works
Erik
Vertical Bar Graphs are harder. First Get The Display working The Net is full of code for that. Then Look UP CG RAM in the LCD Data sheet ( Or the Net) you would have to make custom characters for each the put then on the display in the correct place. DMX is around also you should be able to find it also.
An alternative is to go for a fully graphic display.
If you want them vertical you can use the same code. Just change the LCD routines to "write-custom-chars" and then you can draw the values vertical. You just need to calculate them a little bit because one char has 7*5 (8*5) dots.
If you have two lines (2 chars in one column = 1 bar): The lower and the upper char of the first column are both 50% of the whole value (100% = 10 for example). The lower char displays every value from 0%-49% and the upper one from 50%-100%. I use this methode if I need to read all ADC channels for example.
Simple Calculation: k = 10 = 100% x = input (0-10+)
y=((100/k)*x) --> Input signal in %
1.0) if y <= 49 then clear the upper char 1.1) ROUND( y/7 ) --> amount of filled lines for the lower char
2.0) else if y > 49 then fill the lower char completely 2.1) ROUND( (y-50)/7 ) --> amount of filled lines for the upper char
optional: 3.0) else if y > 10 then fill lower+upper char or ERROR
4.0) else clear lower+upper char
Maybe I'll upload some pictures tomorrow if I have time too.