I was just using that as an example to show I was getting ascii rather than dec, I have tried 50 and many other numbers along with = and => but without the dec modifier it just does not work guess I will input in dec and shift and try that
I was just using that as an example to show I was getting ascii rather than dec, I have tried 50 and many other numbers along with = and => but without the dec modifier it just does not work guess I will input in dec and shift and try that
Can you provide us the values as you step through the routine?
1. Initial value of V1 from the "GOSUB SINV1"
2. What the details of SHIFTV1 does
3. What the value of V1 is before you perform this "V1 = V1 */$0065"
A little more clarity might help us help you get pointed to the issue.
Regards,
TABSoft
its an old program and not sure of the values, the value is correct from them but its in ascii rather than dec when outputed to lcd if I output to lcd dec3 v1 its fine I can put them on the screen side by side one reads d the other 100
100 dec is d ascii
Look, a byte variable can hold values from 0 to 255, that's it.
All this DEC, HEX, BIN and ASCII stuff is just us humans expressing the same thing in different ways, 100=64=d=01100100.
A character LCD is used to display stuff for humans to read so it "understands" ASCII. If a variable contains the value 100 and you send that to the LCD you'll get 'd' since 100 is the ASCII code for 'd' (exactly as you say). If you want to display the numeric value of the variable AS ASCII then you use the DEC modifier. The DEC modifier does in no way change the value.
If you do LCDOUT $FE, 1, DEC V1 and the display shows a value of more than 100 then If V1>100 then High PortA.5 statement WILL evalute true and the problem is with controling PortA.5.
OK after HenrikOlsson spanking I started checking from his line of thinking putting in a fast blink between steps and it was hanging at a serin command and not getting value into V! also found I was missing an ADCON1 = %1111
statement so it is working, guess I needed a slap
Bookmarks