This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MAC unit and shifting using simulator

Hi everybody,
I have got following problem. I use ST10F269 and uVision3. In my program I must use shifting instructions CoSHL, CoSHR and CoASHR. The manual says I can perform up to 16 shifts, but I am able to get only 8 at maximum. Where is the problem? Is that only a problem with simulator?
Thanks for suggestions. Jan

  • 16 shifts are possible when the shift value is in register.

    Take a look to the CPU user's guide which lists all the available instructions.

    Reinhard

  • Thank you for your answer Reinhard, but you are wrong. User's guide says that there are three possibilities how to use shift instructions.
    1. CoSHL #data5 - so 5 bit immediate data
    2. CoSHL Rwn - shifting through an register
    3. CoSHL [Rwn] - shifting through the indirect addressing

    All those possibilities work up to 8 bits only. I hope this is only the problem with simulator in uVision. So far I can't in uVision3 translate project and built the program to be loaded into the board.At the moment I can use debugger in uVision only.
    Jan