Math are good... but depending your OSC speed, you may want to use a serie of @ NOP instead.
Have a look in the manual about PAUSEUS limitations.
Math are good... but depending your OSC speed, you may want to use a serie of @ NOP instead.
Have a look in the manual about PAUSEUS limitations.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Based on the pseudo C code on page http://www.myke.com/lcd.htm,
i made my own code. I have attached it with this post.
Can someone chech it out and tell if what i've done is correct?
I tested the commands using Dincer's JavaScript LCD Simulator V 1.05.
(http://www.geocities.com/dinceraydin.../djlcdsim.html)
This code should display the digit "1" on the display.
Last edited by shahidali55; - 6th June 2007 at 18:43.
might be kinda nice to have a least-significant-digit location set. for instance if you need to display a variable that changes from 1 digit (0-9) to 3 digits (100, etc), and you need to display 4 of them at a time, the code starts to get very lengthy....
i normally do an IF+THEN and if less than X, then add a space, but doing this for 4 variables, with 1 to 3 digits gets be rather long, and very hard to debug...
LCDOUT $FE, 1, DEC VAR [10], "Hello" 'display decimal value of <VAR> with least significant digit at space 10
Sorry i don't follow youcould you shed some light on that?
Why not updating only some fields on the LCD? Do you need Left/Right Aligned thingy?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
if you say this:
VAR = 1
LCDOUT $FE, 1, " ", DEC VAR 'three spaces
you will get on the screen
>___1< but lets say your variable becomes 100, you will get:
>___100< i want to get it to say:
>_100<
so the first digit of the variable is the "setpoint," and if its one or 5 digits long, the first one will always be in the same place. not too big of a deal, but if you want to run 2 or 3 variables on the screen at the same time (and vary from 1 to 100), then it kinda sucks to program that....
This is why i asked
just clear the specific LCD areas where you need to write to.. then yes you must implement some kind of text justification. For that, you'll need to implement a kind of LEN(YourVar) who return the length of your variable, amount of character.Why not updating only some fields on the LCD?
Think about a simple loop, begin with a variable (says LENof) set to 1. Divide your variable to display by ten.. if the result is still greater increment Lenof variable... loop until your result is still greater than 10. once your done, you know the LENof your variable. Then it's just a matter to use or not REP " "\AmountOfSpace the right way for your text justification.
That's one way.
Last edited by mister_e; - 21st April 2008 at 20:31.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks