mikroC PRO for PIC questions & answers

Development environment fro programing PIC devices
A
Question by amar jay
30 views
April 12, 2024

Is it possible to use MicroC without using the PIC - gui? If not are there other alternatives

A
Answer by Ashish Bajaj

Yes, it is possible to use mikroC PRO for PIC without using the PIC - gui. There are other alternatives available for programming PIC microcontrollers as well.

G
Question by Guest
79 views
March 12, 2024
Usha Kumari
Answer by Usha Kumari

To call an external file in mikroC PRO for PIC, you can use the #include directive followed by the file name. For example: #include "filename.h" to include a header file or #include "filename.c" to include a source file.

M
Question by m .bn
156 views
December 4, 2022

hello I am traying to built pwm motor controller using pic18f4550 and I need help to CHECK and improved my code AND add watchdog timer because my project will run for long time , I will attach my code .


unsigned int adc_rd1 ;
long current_duty1;
unsigned int adc_rd2;
long current_duty2;


void main() {
TRISA.RA2= 1 ;
TRISA.RA3= 1 ;


TRISC = 0 ;
TRISB = 0 ;


PWM1_Init (6000);
PWM1_Start();


PWM2_Init (6000);
PWM2_Start();


ADC_Init();
PORTB.F0 = 1;


while (1) {
adc_rd1 = ADC_Read (2);
adc_rd2 = ADC_Read (3);


current_duty1 = (long) adc_rd1 * 240;
current_duty1 = current_duty1/1023;


current_duty2 = (long) adc_rd2 * 240;
current_duty2 = current_duty2/1023;


if( adc_rd1 > adc_rd2){
Delay_us(50);
pwm1_set_Duty(current_duty1);
pwm2_set_Duty(0); }


else if ( adc_rd2> adc_rd1){
Delay_us(50);
pwm2_set_Duty(current_duty2);
pwm1_set_Duty(0);
}


else {
Delay_us(100);
pwm1_set_Duty(0);
pwm2_set_Duty(0);
}
}
}

G
Question by Graham
110 views
July 19, 2021
S
Answer by Saumya Sharma

Yes, MikroC PRO for PIC does support the 16F18446.

See more questions & answers

Ask a question about mikroC PRO for PIC

Alternative downloads

Python
Free
rating

Create web and desktop applications using an object oriented language.

Java SE Development Kit
Free
rating

Develop and deploy Java applications on desktops and servers.

Microsoft Visual Studio Code
Free
rating

A source code editor with built-in support for JavaScript.