PWM on 12F863

General discussion on mikroC.
Post Reply
Author
Message
kesso
Posts: 2
Joined: 27 May 2005 08:01

PWM on 12F863

#1 Post by kesso » 27 May 2005 08:19

Hi.

I'm trying to use PWM on P12F863.

Code: Select all

void main() {
  Pwm_Init(5000);
}
When I compiled codes above, I got an error.
"Internal error PWM_Init not found"

When I compiled it changing Device to P16F877, It could pass.

I think P12F863 support PWM.
Please tell me how to use PWM on P12F863.
Thanks,

pizon
mikroElektronika team
Posts: 823
Joined: 11 Oct 2004 08:53

Re: PWM on 12F863

#2 Post by pizon » 27 May 2005 09:35

Yes, 12F863 has the PWM module. It is the library that is missing in the definition file.
  • - Go to Defs directory, and open the 12F863.mlk file;
    - Under the //LIBRARY section, at the end of section, add line

    Code: Select all

    #pragma SetLib(PWMlib_P_A)
    - In mikroC, (Re)open your project
We will correct this definition file for the next release.
pizon

kesso
Posts: 2
Joined: 27 May 2005 08:01

#3 Post by kesso » 27 May 2005 10:00

It works fine!
Thanks,

Post Reply

Return to “mikroC General”