Questions tagged [mikroc]

mikroC PRO for PIC is a full-featured ANSI C compiler for PIC devices from Microchip®.

126 questions
0
votes
1 answer

float to short conversion error in mikroC

I wrote a code in mikroc where pwm signal is applied to motor. Now since dutycycle passed to PWM inbuilt function needs to be short datatype and my pid output is of float type i casted float to short.But the problem is that for values less than or…
dcmotor
  • 58
  • 1
  • 12
0
votes
2 answers

Function declaration in Mikroc

I wrote a Code for dc motor speed control in Mikroc But during build it gives error as " undeclared identifier "for all the variables. Can any one help me what is the problem in the code. I used pic18f8722. I have done coding in Java but very less…
user4380889
  • 31
  • 1
  • 4
0
votes
0 answers

UART between pic and matlab gui

I have a trouble with interfacing pic microcontroller with pc using MATLAB GUI Matlab gives me this error "Warning: A timeout occurred before the Terminator was reached " Here is the mikroc code: void main() { char x,send; TRISD = 0x00; …
0
votes
2 answers

PIC16F1459 I2C Master Ack Issue with 24LC32

I'm facing a weird issue. I've always used bit bangin I2C functions on my PIC16F1459, but now I want to use the MSSP (SPI,I2C Master Slave Peripheral). So I've started writing the functions according to the datasheet, Start, Stop, etc. The problem I…
Jean-francois
  • 316
  • 1
  • 9
0
votes
5 answers

UART1_Read_Text() issue

I am using PICKit3, MikroC PRO for PIC v6.0.0, PIC18F45 @ 8MHz and RN-42 bluetooth module. I'm connecting to the RN-42 module both from the laptop and from my Android app and i am sending a password. The weird thing is that the PIC sometimes says…
Ted Tedson
  • 316
  • 1
  • 6
  • 15
0
votes
1 answer

How to define new port in c for microcontroler

I need to define virtual port or variable bind with [porta.1,porta.2,portc.1,portc.2] Because some pins of all available port in micro controller(PIC18F4550) in in use and i have not any free port; I need help in C programming for…
m s
  • 65
  • 1
  • 9
0
votes
1 answer

Converting float to character array in MikroC program for PIC Microcontroller

I was trying to modify a program i got on the internet, which i found here: Interfacing Ultrasonic distance sensor ASCII output using PIC Microcontroller I need to do some calculations on the distance before i can output it to the LCD display.I…
gkapagunta
  • 188
  • 1
  • 11
0
votes
1 answer

Uart on PIC16F690 and Bluetooth issue

I have spent so much time trying to get the UART to work with Bluetooth module. I am using PICkit 2 programmer to burn the code to PIC16F690. When I use the UART tool, I can transmit and receive data correctly. I am able to echo whatever I am…
Ammar
  • 1,203
  • 5
  • 27
  • 64
0
votes
1 answer

MikcoC Hardware interrupt

I am trying to program a PIC 16F876A using mikroC. I need the program to run when I push a button to a certain point, stop and wait till the button is pushed again before finishing. I have read that using a hardware interrupt is the way to do this…
0
votes
1 answer

MikroC, dsPIC UART receive interrupt issue

I'm communicating with an other device over UART. I'm requesting certain information by sending commands to the device. I'm repeating the command until I receive a usable answer. The problem I have is that the ISR I use works fine when you're…
Felix
  • 89
  • 1
  • 12
0
votes
1 answer

MikroC, Drawing line graph

I'm trying to create a function that will draw a line graph within a specific window on a GLCD screen. Lets say that the window's x-axle runs from pixel 24 through 205 (left to right) and the y-axle runs from pixel 55 through 5 (low to high). I'll…
Felix
  • 89
  • 1
  • 12
0
votes
3 answers

timer & overflow interrupt MikroC code

void TimerFunction() { TIMSK=(1<
0
votes
1 answer

Setting number of memory banks to 8 on MikroC

I am trying to set number of Memory banks in a project to 8 in #define at the start of the project but I can't find any way to do it. I am working on P16F877A
Mo Adel
  • 1,136
  • 1
  • 16
  • 29
0
votes
1 answer

My project doesnt' work in mikroC

This is my project for reverse parking...this code is working without IF statements. When I put IF statements in code my hardware don't respond. (IF statements in the void…
0
votes
2 answers

how to solve overflow errors on mikroC for PIC?

My program has several images, I want to do something like a menu with LCD and a keypad. It was working fine untill the moment that I got two erros: > Recursion or cross-calling of 'lcd_write' > Not enough RAM for call stack I read something about…
mafap
  • 371
  • 3
  • 18
  • 40
1 2 3
8 9