• AVR Freaks

PIC24 OC Module

Author
MilanSr
New Member
  • Total Posts : 1
  • Reward points : 0
  • Joined: 2015/08/08 23:25:38
  • Location: 0
  • Status: offline
2020/01/04 10:51:42 (permalink)
0

PIC24 OC Module

Dear all,
I was trying to setup OC module on  PIC24FJ128GB204 to generate single 50us pulse
 

for(i=0;i<10000;i++)
    {
        
        
        OC1TMR = 0;
        OC1CON1 = 0;
        OC1R = 10;
        OC1RS = 810;
        OC1TMR = 0;
        OC1CON1 = 0x1C04;
        
        
        __delay_us(1000);
    }

 
My first impression was that code is OK but after I looked better on leading edge I saw some short additional pulse.
Do you know what is wrong here?
 
Thanks
Milan
 

Attached Image(s)

#1

0 Replies Related Threads

    Jump to:
    © 2020 APG vNext Commercial Version 4.5