Hi,
I'm sorry to say this but it sounds like you need to take a step back and work thru the basics of programming with PBP. We can keep giving you code here until we've basically written the whole thing for you and you still wouldn't understand how it works.

Pause does just that - it pauses - no other code (except if you're using interrupts) is running while the Pause exeuctes. Like this:
Code:
Main:
  High PortB.0
  Pause 100
  Low PortB.0
  Pause 100
Goto Main
This will blink a LED connected to PortB.0 at 5Hz. If you put another pause in there, like:
Code:
Main:
  High PortB.0
  Pause 100
  Low PortB.0
  Pause 100
 
  Pause 1000
Goto Main
It won't blink at 5Hz because you just told it to pause for another second. The same thing happens with your 4ms pause. The FOR NEXT loop that is supposed to keep running and feeding the PWM module with a new dutycycle evert 210us will stop - completely - for the 4ms duration. But because the PWM is generated by hardware it will keep outputting whatever dutycycle it was last told to do.

The count command is used to count pulses on a pin, I don't think that is what you want?

The following is ONE way of doing it. This compiles fine but I have NOT tested it.
Code:
Phase       VAR BYTE[3]       ' Array used as pointers into lookuptable.
DutyCycle   VAR WORD[3]       ' Array storing the dutycycles retreived from the table
Temp        VAR WORD          ' Temporary variable to avoid hard to understand array indexing
i           VAR BYTE          ' General purpose counter
 
' The lookup table has 186 entries long, to get 120° phase shift we need to
' "start" the second phase at 1/3 of the cycle and the third phase at 2/3
' of the table. 186/3=62 so first phase starts at 0, second phase at 62
' and third phase at 123.
' Initilise pointers.
Phase[0] = 0 : Phase[1] = 61 : Phase[2] = 123
 
Main:
  Gosub GetDuty               ' Retrieve the dutycycle values for all three phases
  GOSUB SetDutyCycle          ' Set the three PWM modules accordingly
 
' Now increment the individual table pointers and make sure they wrap
' around to zero when they reach then end of the table. That way they
' will always stay 62 "steps" (120°) from each other.
 
  For i = 0 to 2
    Phase[i] = Phase[i] + 1
    If Phase[i] > 185 then Phase[i] = 0         'When pointer is > 185 we need to wrap around to 0.
  NEXT
 
  PauseUs 300
 
Goto Main
 
 
SetDutyCycle:
    ' Get value from the array of dutycycles and put it in the dutycycle
    ' registers of the 3 PWM modules. We could have used the array directly
    ' but this way (using a Temp variable) is easier to understand.
 
    Temp = DutyCycle[0]             ' Get dutycyle for phase 1 from the array and store in temp.
    CCP1CON.4 = Temp.0              ' Set the LSB's  
    CCP1CON.5 = Temp.1  
    CCPR1L    = Temp >> 2           ' Set the 8 high bits 
 
    Temp = DutyCycle[1]             ' Same procedure.
    CCP2CON.4 = Temp.0  
    CCP2CON.5 = Temp.1  
    CCPR2L    = Temp >> 2
 
    Temp = DutyCyle[2]              ' Same procedure.
    CCP3CON.4 = Temp.0  
    CCP3CON.5 = Temp.1  
    CCPR3L    = Temp >> 2
RETURN
 
 
' ------------------------------------------------------------------------------
' ---- Subroutine to retreive the three dutycycle values from the table.
' ---- Values will be stored in the DutyCycle array.
' ------------------------------------------------------------------------------
GetDuty:
' This For-Next loop runs three times. Each time it gets the value from the lookuptable
' that Phase[i] is pointing at. The Phase array pointers are incremented in the main loop
' and are always 62 "steps" appart so that a 120° phase shift is preserved.
 
For i = 0 to 2
  LookUp2 Phase[i], [0,18,34,52,68,85,102,119,137,152,170,187,203,220,236,253,267,285,302,_
     318,334,350,367,382,397,413,429,443,459,474,489,504,518,533,547,562,575,589,603,616,_
     630,643,655,669,681,693,706,718,729,740,752,764,774,785,795,806,815,825,835,844,853,_
     861,870,879,887,895,901,909,916,923,929,935,941,946,952,957,962,967,971,974,978,_
     981,984,987,990,992,994,996,997,998,999,999,1000,999,999,998,997,997,996,994,992,_
     990,987,984,981,978,974,971,967,962,957,952,946,941,935,929,923,916,909,901,895,_
     887,879,870,861,853,844,835,825,815,806,795,785,774,764,752,740,729,718,706,693,_
     681,669,655,643,630,616,603,589,575,562,547,533,518,504,489,474,459,443,429,413,_
     397,382,367,350,334,318,302,285,267,253,220,203,187,170,152,137,119,102,85,68,_
     52,34,18,0],Temp
 
 
     ' Lookup2 can't handle an array as the designator so we need to  
     ' put the value in a temporary variable first and then move
     ' it to the array of dutycycles.
 
     DutyCycle[i] = Temp
 
NEXT
 
RETURN
/Henrik.