If it IS something with the configuration of the port then you should be able to recreate that with less code than you have now.
I don't think I have any 4520's to test and even if I did there's no way I (or I believe anyone else) could recreate your full setup without goig thru a lot of effort.
Have you tried not using the HPWM command and instead setting the dutycycle registers manually?
I haven't yet been able to tell exactly how things are configured on the 4520 but it looks to me as if there's one CCP module and one ECCP module on the 40-pin devices. If that's the case then there might be some differences between them. However, if both modules are of the ECCP module on the 40-pin devices then of course there should be no difference. Obviously only one of them has the bridge drive mode etc (which you don't use anyway).
/Henrik.
Bookmarks