' RB0 and RB1 are for PWM
' RB2 is for SD
ANSEL = %00000000 ' All pins changed from analogue to digital
OSCCON = $60 ' Internal clock setted to 4Mhz
TRISB = %00000000 ' All PORTB pins are outputs.
HIGH PORTB.2 ' Turn on sd pin to shutdown ir2110
start:
Pause 100 ' Delay for 100ms waiting for mosfets to settle
low PORTB.2 ' Turned off sd pin
Pause 100 ' delay 100ms
PWM PORTB.0,242,255 ' Pulse sent to PORTB.0 at a duty 'value of 242(95% duty cycle) for 255 cycles.
PWM PORTB.1,012,255 ' Pulse sent to PORTB.0 at a duty 'value of 12(5% duty cycle) for 255 cycles.
PAUSE 100
PWM PORTB.0,127,255 ' 50%
PWM PORTB.1,127,255 ' 50%
PAUSE 100
PWM PORTB.0,012,255 ' 5%
PWM PORTB.1,242,255 ' 95%
PAUSE 100
PWM PORTB.0,127,255 '50%
PWM PORTB.1,127,255 '50%
PAUSE 100
GOTO start
END
Bookmarks