mikroC PRO for PIC is a full-featured ANSI C compiler for PIC devices from Microchip®.
Questions tagged [mikroc]
126 questions
0
votes
1 answer
Convert from int to binary or hex in mikroc
I got an int value from 0 to 255 and I want to convert that value to hex or binary so i can use it into an 8 bit register(PIC18F uC).
How can i do this conversion?
I tried to use IntToHex function from Conversion Library but the output of this…

Ooopscrash
- 11
- 3
0
votes
4 answers
Basic binary conversion fails on PIC
I have the following code, converting dec. to binary (stored as an int) and it runs just fine in C::B :
for(i=0;i<8;i++)
{
carry = start_value%2;
tab[bla] = carry;
bla++;
start_value = start_value/2;
}
for(i=bla; i>0; i--)
…

gqq
- 1
- 1
0
votes
1 answer
PIC16F628A to Arduino RF Communication Fails (433MHz)
I have pic16f628a and Arduino UNO...
I use MikroC for PIC...
I use 433 mhz transmitter and receiver.
My purpose is reading datas from Arduino UNO which I send from PIC16F628A; but I couldn't success it...
The circuit of PIC16F628A (Transmitter):
The…

PIC16F84A
- 143
- 7
0
votes
2 answers
MikroC: Passing pin as parameter to function
I am trying to write a custom delay function in MikroC for the PIC16F882 MCU.
I want to keep checking a particular pin of MCU to see if it changed, throughout the delay function.
But the issue is, I cannot pass a pin as a parameter to a function. Is…

Mohsin Anees
- 698
- 2
- 9
- 25
0
votes
1 answer
dsPIC33 external interrupt
I am trying to understand how to attach external falling edge interrupt to a dsPIC33EP512MU810 micro controller. From browsing the internet I have found the following code:
RPINR0= 0x5400;//set pin 1 as interrupt 1
INTCON2 = 0x0000; /*Setup INT0,…

Mohsin Anees
- 698
- 2
- 9
- 25
0
votes
0 answers
Simple Pacman using MikroC
I'm trying to simulate a simple pacman game using pic 16f877a and compiler MikroCpro for pic but I have two problems and I hope someone can help:
1- I don't know how to create a random fruit. I was trying to use this code:
#include…

Nemo
- 85
- 2
- 11
0
votes
1 answer
SIM300 send sms in Mikroc using PIC16f
I have been trying to send SMS using an SIM300 module. Though module is working fine when tried using Hyper Terminal, but i am not able to send the SMS using PIC.
Below is the code that i tried (LCD also included (Lcd is working…
0
votes
0 answers
interfacing ht12d decoder to PIC microcontroller?
this is my first question here.
i have ht12d ic connected to pic16f84a.. VT pin connected to Rb0/int pin of pic.. and the 4 data lines are connected to 4 pins of PortB.. also am having a digital sensor also connected to rb0/int pin.. whenever there…

drMahmoud
- 1
- 1
0
votes
2 answers
Interfacing my PIC Microcontroller over USB and Controlling with my VB.NET application
Iam devoloping an embedded device using PIC Microcontroller (PIC18F4550).
Iam almost done with the hardware part. I need to control my device via USB using VisualBasic 2010 Express. Source code is compiled using MikroC PRO
My device belongs to an…

Almero Rick
- 118
- 1
- 11
0
votes
1 answer
" Invalid expression" Error for bulian in MiKroc For AVR
I am writing one ds1307 timer with MiKroc For AVR so my code is :
// Lcd module connections
sbit LCD_RS at PORTC2_bit ;
sbit LCD_EN at PORTC3_bit;
sbit LCD_D4 at PORTC4_bit ;
sbit LCD_D5 at PORTC5_bit ;
sbit LCD_D6 at PORTC6_bit ;
sbit…

Soheil Paper
- 1
- 2
- 8
- 25
0
votes
1 answer
add AVR Studio pgm_read_byte function to MiKroc (Electronica)
I have a program in AVR Studio V4 with the following code:
#include
void nlcd_Putc(unsigned char c)
{
unsigned char i;
if (c>127) c=c-64;
for (i = 0; i < 5; i++ )
{
…

Soheil Paper
- 1
- 2
- 8
- 25
0
votes
1 answer
How to Get Last Four Number to String From Character Array in Mikroc Pro
I have character array like bellow,
char ch1_on[]="0123456789";
I need to get last four number (6789) of above variable to int variable. how can i do it?

Dilanka Laksiri
- 408
- 3
- 12
0
votes
1 answer
Conversion from MikroBasic to MikroC
Can anyone help me with this conversion from MikroBasic to MikroC?
in MB:
FormattedDataString = text + "," + text1 + "," + text2
my effort in C :
FormattedDataString = (text + "," + text1 + "," + text2);
char FormattedDataString [100];
…

Sarel Rautenbach
- 3
- 2
0
votes
1 answer
Reading Soft_Uart & Hardware Uart @ same time
OK, so i have accomplished creating a software and hardware UART on PIC18f8680 in MikroC compiler. The Soft_Uart uses timer0 for interrupt and breaks the Soft_UART_read() line by a function called Soft_uart_Break().
everything is working fine, when…

Anum Sheraz
- 1
- 1
0
votes
1 answer
unable to display numbers counting from 0 to 9 in 7 segment display with mikroc
I am very new to micro-controller programing with MIKROC . I am trying to display numbers counting from 0 to 9 in a 7 segment display with mikroc . I have used infinite while loop . Inside the while loop I used function " delay_ms(500) " with other…

Mushfiqul Tuhin
- 666
- 6
- 13
- 31