thank you for digest number 2287(ls7166)
Archiver
Posts: 46,084
Hi Mark,
Please bear in mind that the example I offered has not been tested
other than that it tokenized ok. I have worked with the 7266, which is
basically the same chip but supports 2 encoders. So, I took parts of
my 7266 code and modified it to support the different register config
on the 7166. Sorry if I mislead you into thinking that the example had
been tested, it hasn't, I don't have the 7166 chip to test with.
The DEGUG line you mention shouldn't be a problem, so there is
probably something else very suttle that I missed in my example.
Please go thru each register setting and see if I set the 7166 up
correctly.
As far as the 3 byte count value, it is simply a 24bit binary value.
I think the 7166 can count in BCD by the way so that may be the
easiest way to get what you want. Each byte would then be 2 digits
of the decimal count.
Tracy Allen has some excellent math examples on his
www.emesystems.com web site that may help you accomplish
getting the value displayed the way you want it. If you haven't
checked out his stamp reference info, please do so. It is the best
stamp math reference going.
Let me know if I can help further,
Dennis
> From: "lakewood5982003" <598@m...>
> Subject: thank you for digest number 2287
>
> hello all, i want to thank the kind gentlemen for explainnig the
> command functions of the ls7166 chip, i now understand how it works.
> i think maybe the program example didn't work on account of my error
> in using the debug function, i wrote a line- DEBUG DEC ENCODERBYTE,
> but did not see anything on the pc screen, so perhaps i am doing
> something wrong with respect to the debug function. also where could
> i get info on combining the three bytes to form a number that will be
> combined to form a decimal output?
>
> thanks again, mark
[noparse][[/noparse]Non-text portions of this message have been removed]
Please bear in mind that the example I offered has not been tested
other than that it tokenized ok. I have worked with the 7266, which is
basically the same chip but supports 2 encoders. So, I took parts of
my 7266 code and modified it to support the different register config
on the 7166. Sorry if I mislead you into thinking that the example had
been tested, it hasn't, I don't have the 7166 chip to test with.
The DEGUG line you mention shouldn't be a problem, so there is
probably something else very suttle that I missed in my example.
Please go thru each register setting and see if I set the 7166 up
correctly.
As far as the 3 byte count value, it is simply a 24bit binary value.
I think the 7166 can count in BCD by the way so that may be the
easiest way to get what you want. Each byte would then be 2 digits
of the decimal count.
Tracy Allen has some excellent math examples on his
www.emesystems.com web site that may help you accomplish
getting the value displayed the way you want it. If you haven't
checked out his stamp reference info, please do so. It is the best
stamp math reference going.
Let me know if I can help further,
Dennis
> From: "lakewood5982003" <598@m...>
> Subject: thank you for digest number 2287
>
> hello all, i want to thank the kind gentlemen for explainnig the
> command functions of the ls7166 chip, i now understand how it works.
> i think maybe the program example didn't work on account of my error
> in using the debug function, i wrote a line- DEBUG DEC ENCODERBYTE,
> but did not see anything on the pc screen, so perhaps i am doing
> something wrong with respect to the debug function. also where could
> i get info on combining the three bytes to form a number that will be
> combined to form a decimal output?
>
> thanks again, mark
[noparse][[/noparse]Non-text portions of this message have been removed]