12F629. I can't built it, I got main function is note define

General discussion on mikroC.
Post Reply
Author
Message
chuck
Posts: 1
Joined: 11 May 2010 06:14

12F629. I can't built it, I got main function is note define

#1 Post by chuck » 11 May 2010 06:23

Anyone can give me a hand, it's been many years that I haven't worked with micro.

The routine is very simple, I tried to make a program PWM three channel with 12F629. And my first attempt is failed, after many hours I gave up trying to find the problem with my routine.
Any help?

# include<12f629.h>

void main() {
while(1)
{
output_high(GPI0.0);
delay_ms(500);
output_low(GPI0.0);
delay_ms(500);
}

}

:roll:

User avatar
tihomir.losic
mikroElektronika team
Posts: 2138
Joined: 02 Dec 2009 14:16
Location: Serbia
Contact:

Re: 12F629. I can't built it, I got main function is note de

#2 Post by tihomir.losic » 11 May 2010 09:46

Hello,

first of all, my suggestion to you is: mikroC PRO for PIC:
http://www.mikroe.com/eng/downloads/get ... _setup.zip

Then, you have Knowledge base at our Support Desk, and on this link:
http://www.mikroe.com/esupport/index.ph ... icleid=144
is description about PWM library with example. The example changes PWM duty ratio on RC1 and RC2 pins continually.
If LED is connected to these pins, you can observe the gradual change of emitted light.

I hope that it will help you.

Best regards,

Losic Tihomir
mikroElektronika [Support team]

Post Reply

Return to “mikroC General”