05-15-2022 09:55 AM
I corrected that in my edit
05-15-2022 10:24 AM
@MogaRaghu wrote:
Number 1 : 0x01 to 0x09 is the range ( bits 15-12 in final answer )
Number 2 : 0 - 0x55E is the range ( bits 11 - 0 in final answer )
According to the printed specifications, the upper range of #2 is 1599, which is actually x063F (not x55E!)
So here's the code that does input checking. I doubt it is needed.:
Note that we "include upper limit". It will output xFFFF whenever there is an input error, which can be used for further decisions.
05-17-2022 09:06 AM - edited 05-17-2022 09:09 AM
CA , Minor error on the LL for ADDRESS
A quick right click on the IR&C or a constant of 1 would fix it up
A U16 would be a better output datatype with a -1 error value being more typical 🙂
05-17-2022 09:37 AM - edited 05-17-2022 09:43 AM
I adjusted all limits to the printed documentation, where 0 is the lower limit for both parts. (I also corrected the upper limit of #2)
(Of course the term "between" is somewhat open for interpretation. Does it include the boundaries or not??? :D)
Unfortunately, there is no -1 in U16.