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) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd..
See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.