• A question about code optimization
    Hello all, I am experiencing problems with the following piece of code: lp_R0 = g_tcb[g_running_task].r0_ptr ; // restoring next task settings __asm { MOV R15, lp_R0 MOV R0, [R15] POP R15...
  • ISR Question
    I am trying to generate an interrupt when Timer2 overflows. I cannot get the application to jump to my Timer2 ISR if I have serial interrupts enabled, though. I make sure to clear my RI and TI bits in...
  • Question about PEC
    Hi again, I am using C167. I am using PEC for AD-conversion. I configure PEC as follows: ADCIC = 0x007B; PECC3 = 0x00FF; SRCP3 = (int) (&ADDAT); DSTP3 = (int) (&P3); ADCON = 0x0090; I works...
  • Strange question about Array
    I declare a array, and set the value. ubyte i,ubData[3]; for(i=0;i<3;i++) ubData[i]=i; I debug this program ,the value of array element is correct. But when i download the program into flash...
  • A question about using sdata
    Hello, I am using the medium memory model. In order to deal with a shortage of memory, I am using 'sdata' to store some static variables, and I have declared SDATA to reside in the address range (0x10000...