This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

URGANT. NEED HELP NOW

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

Parents
  • 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.

Reply
  • 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.

Children
  • 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.