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

Global Var

HI!!

I declared 3 global var, i call it inside diferent task and every execution this var should be updates but not to do it.
I have a 8051 under evaluation board.
Maybe can be a problem of my small micro?
What do u think about this?

Thanks

Parents
  • OK!
    Im working with an emulator (EPM900) and an evaluation board (MCB900), my micro is Philips P89LPC936, under RTX-51.

    Independent of my PID, the problem is the var update.
    For example:

    void Write (void) _task_ WRITE _priority_ 1 {
            int Ub=0;
            while (1){
                  Ub+=1;
                  TXRX_putByte(Ub); //send to serial port
            }
    void main (void){
            os_start_system (WRITE);
    
    }
    


    The var Ub always is 1, never update the value
    ???????

Reply
  • OK!
    Im working with an emulator (EPM900) and an evaluation board (MCB900), my micro is Philips P89LPC936, under RTX-51.

    Independent of my PID, the problem is the var update.
    For example:

    void Write (void) _task_ WRITE _priority_ 1 {
            int Ub=0;
            while (1){
                  Ub+=1;
                  TXRX_putByte(Ub); //send to serial port
            }
    void main (void){
            os_start_system (WRITE);
    
    }
    


    The var Ub always is 1, never update the value
    ???????

Children
  • Recently i debugg my code in the simulator of uvision and all var are updated!!!
    Why dont work in my board?????????

  • Recently i debugg my code in the simulator of uvision and all var are updated!!!
    Why dont work in my board?????????

    DUH, the simulator simulates.

    if there is e.g. a baudrate error, the simulating thing will still work, if the internal XRAM in the device is not enabled the simulating thing will still work, ....

    if the var you are hunting is in xdata, I'll bet you dollars to doughnuts that you have not modified startup.a51 to enable your XDATA.

    Erik

  • if the var you are hunting is in xdata, I'll bet you dollars to doughnuts that you have not modified startup.a51 to enable your XDATA.

    BTW this newfangled thing that only few know about called a datasheet will tell you what is needed.

    looking at the Keil manual and the startup code will show you why this must be at the start of startup.a51.

    Erik

  • java

    you be please ignoring sir eracs terrrible sarcasem.

    he is be thinking he be funny,,, but he is just crazy yes.

  • rahib,
    what happened? where is praise? where is the submission :) :) :) where is the propaganda ?! it is sir erac you are talking about maaaaaaan !!!!

  • now seriously: your friend did not provide vital data that could have solved his problem earlier and save us time, headache and heartache! instead he offered money. YUK.

  • HI Eric!!
    First thanks for your reply.

    My code startup is:
    START900.A51 because i use Philips P89LPC936.
    It has 512 bytes of xdata.

    I have modificated only this:

    ;  <o> XDATASTART: XDATA memory start address <0x0-0xFFFF>
    ;      the absolute start-address of XDATA memory
    XDATASTART      EQU     0x000
    ;
    ;  <o> XDATALEN: XDATA memory length <0x0-0xFFFF>
    ;      the length of XDATA memory in bytes.
    XDATALEN        EQU     0x200
    ;
    

  • i say no!!!!!!

    i asking his help and ansewrs and he be ignored me

    i think he liking to heat poeple up and spit the bit out yes???

    he say lots but not say much for poeple to be using.

    now he is not sir but he being something other yes!!!!

  • why are taking this so seriously? ok, I sometimes also think that I'd rather jump into a swimming pool filled with Pirenia fish rather than being bashes by Erik, but (un)fortunately he often knows what he is talking about (like this one!). so relax and enjoy the bottomless well of knowledge (gee, I'm poetic!)

  • IF i enable Use On-Chip XRAM i cant compile the aplication because :"ADRESS SPACE OVERFLOW".

  • tamik

    you be wanting downuts you be must be talking by erac

    you be wanting sarchastem you be must talking by erac

    you be wanting anwser by simple problum you must be talking by erac

    you be wanting to know goood ansewr by diffucult problam you be must be talkin gnot by erac

  • OK!!!
    A simple questions:

    Have i configurate START900.A51 for use On-Chip XRAM???
    Is It necessary??

    Thanks

  • you do this ardours task of reading the datasheet and find that e.g. this is an example, not supposedly correct ORL AUXR1,#0x40 will enable the internal xram.
    Then right after the STARTUP: label (the one branched to from 0) you insert the proper instruction based on what you found in the datasheet.

    Erik

  • you be wanting downuts you be must be talking by erac
    while I have had a suspicion the above confirm my suspicion as to who "Erac" is.

    anyhow you are totally wrong.

    When I use the (common in the US) expression "I will bet you dollars to doughnuts" it means the if you will give me a doughnut if I'm right I'll give you a dollar if I'm wrong. Thus this does not mean that I will give anyone a doughnut.

    you be wanting to know goood ansewr by diffucult problam you be must be talkin not by erac
    there is a familiar expression "give a man a log and he will be warm for a day, set him on fire and he will be warm for the rest of his life" NO, NO, I am confusing sayings I was thinking of "give a man a fish and he will eat for a day, teach him to fish and he will eat for the rest of his life"

    THUS, I consider it WRONG to solve peoples probems for them by feeding them the solution, REAL HELP is helping them to help themselves. Thus "here is the code you need" is not real help, whereas "in the datsheet you will find information related to SFR xxx, which will make you see what is wrong" is REAL help. That I prefer not to do this in a dry manner may upset some and some may like it, so what.

    Erik

  • "give a man a log and he will be warm for a day, set him on fire and he will be warm for the rest of his life"

    Might be considered cruel by some, but it certainly appeals to my sense of humour!