We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
Anyone can tell me how I can know whether I need to use "using" attribute or not? Attribute "using" ranges 0-3, So which number I have to select? I read Cx51 user guide, it states that:
The using attribute may not be used in functions that return a value in registers. You must exercise extreme care to ensure that register bank switches are performed only in carefully controlled areas. Failure to do so may yield incorrect function results. Even when you use the same register bank, functions declared with the using attribute cannot return a bit value.
Unfortunately, I cannot get point.
Thanks, pak
If you have more contexts than you have register banks, then some of them must share. If the ones that share can interrupt each other, then they have to save values on the stack.
dead simple
you assign main and what it calls to stack 0 you assign ALL interrupts of low priority to stack 1 you assign ALL inyerrupts of high proiority to stack 2
interrupts of the same priority can not interrupt each other
Erik
Thank, Davis. Your explanation make me understand architecture of C51.
actually simple, no need to fiddle ,Thank for making thing simple, Eric. That is what I actually need.
Thanks for suggestion, pak