The change is above... <<4 instead of <<5... but as i said... <<5 was wrong anyway... not sure why, but wrong anyways... few years after... no one complaint 
It is more code efficient... and obviously safer to use
CCPR1L = duty>>2
CCP1CON.4=Duty.0
CCP1CON.5=Duty.1
unless you'll screw up the CCP module on that 18F (think about the bit <7:6> of CCP1CON when duty value change). This was my major point here.
Last edited by mister_e; - 11th May 2009 at 22:01.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks