Posted by Nobody/Anonymous on January 21, 2007
Can you help us please with the following problem:
We made a PWM configuration (PIC18f452) to drive two motors using the CCP1CON and CCP2CON registers. It is the program code:
CCPR1L=DUTY_PWM1>>2; // Config. duty cicle (MSB) PWM1
CCPR2L=DUTY_PWM2>>2; // Config. duty cicle (MSB) PWM2
This program works very well, but we have to put it into the FREERTOS, so the problem is that both of them are using the same register CCPCON1.
Thanks so much for your help. We´ll waiting your best answer.
RE: PWM CONFIGURATION
Posted by Nobody/Anonymous on January 22, 2007
You can generate the tick interrupt from any peripheral that can generated a fix period interrupt. I'm not familiar with the PIC, but other processors I have used have been able to generate the tick from the watchdog timer. Look at the function prvSetupTimerInterrupt() in port.c for the PIC18 port. This is where the timer interrupt is configured. You can change it as required.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.