On 1 Dec 2008, at 19:49 , Joep Suijs wrote: >>> Where the last two functions set the justification bit each time. >>> I think we need different names for these functions. And why would >> Why? > > function get_AD_result() return byte > function get_AD_result() return word > > gives the compiler message: > jallib.jal:32: function signature is different
OK, I meant: function get_AD() return byte function get_AD_word() return word >> No. The user can have 8 bits or 10. Byte or word. That should be >> enough. >> I lost you here. See above. The user can get the upper 8 bits in a byte, or the full 10 bits in a word. After that, she can shift all she wants. > You stated: Where the last two functions [2x get_AD_result()] set the > justification bit each time. > > I assumed (maybe wrong) that the justification bit is not a param and > thus 'assume the user will have an option to tell *how* the > justification is set'. No. Justification only adds confusion. > > Then you reply that "The user can have 8 bits or 10. Byte or word. > That should be enough." ??? What about you remark that the > justification bit is set each time the conversion is called? This is easier in the functions, since you do not have to shift. So the get_AD() would justify to the left and just return ADRESH. The function get_AD_word() would justify to the right and return ADRESH * 256 + ADRESL. Most of the time 8 bits are enough. I have experienced that the 10th bit needs special hardware preparations to be stable. --- ir EE van Andel [EMAIL PROTECTED] http://www.fiwihex.nl Fiwihex B.V. Wierdensestraat 74, NL7604BK Almelo, Netherlands tel+31-546-491106 fax+31-546-491107 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jallib?hl=en -~----------~----~----~----~------~----~------~--~---
