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

C164ci Simulation - Show CAPCOM pin toggling in Logig Analyzer

Hi,

is it possible for the C164ci target in simulation mode to make the pin toggling of the CAPCOM output visible inside the Logic Analyzer (PK-166)?

I am using the CAPCOM6 in Edge Aligned mode, cnfigured for PWM usage. I would like to debug the output signalCOUT60 (P1L.1) and COUT61 (P1L.3) using the Logic Analyzer.

/* PWM0 and PWM1 signal frequency configuration */
D_PWM1 = 1;
D_PWM2 = 1;
/* Configuration of the PWM outputs */
CC6MSEL = 0x0022;
/* 5V -> 10bits */
CTCON = 0x001C;
/* 10230 = 100% full scale */
T12P = 10230;
T12OF = 0;

Thank you in advance for any hints or experiences,
Sammy

Parents
  • Here is your example that demonstrates PWM on P1L.1 and P1L.3 using the simulator.

    #include <reg164ci.h>
    
    void main(void) {
    
      /* Configuration of the PWM outputs */
      CC6MSEL = 0x0022;
    
      /* Period = 10230 */
      T12P = 10230;
      T12OF = 0;
    
      /* PWM0 and PWM1 50% DC */
      CC60 = 10230 >> 1;
      CC61 = 10230 >> 1;
    
      CTCON = 0x001C;
    
      for(;;);
    }
    

    -Chris

Reply
  • Here is your example that demonstrates PWM on P1L.1 and P1L.3 using the simulator.

    #include <reg164ci.h>
    
    void main(void) {
    
      /* Configuration of the PWM outputs */
      CC6MSEL = 0x0022;
    
      /* Period = 10230 */
      T12P = 10230;
      T12OF = 0;
    
      /* PWM0 and PWM1 50% DC */
      CC60 = 10230 >> 1;
      CC61 = 10230 >> 1;
    
      CTCON = 0x001C;
    
      for(;;);
    }
    

    -Chris

Children
No data