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

Receiving OK response for AT command via PIC Microcontroller

char rcv[10]; void main() { UART1_Init(9600); Delay_ms(2000); TRISB=0x00; UART1_Write_Text("at"); UART1_Write(13); //Enter key = CF + LF UART1_Write(10); delay_ms(500); while (1) { PORTB.RB0=1; // Endless loop while(!UART1_Data_Ready()); // If…
KB29
  • 1
  • 1
0
votes
1 answer

interface is not receiving string from mikroC Pro

I want to send string from mikroC pro to PC using C# interface. my code is: void main() { while (1) { if (UART1_Data_Ready()) { UART1_Write_Text("mikroC"); Delay_ms(1000); } } } but when…
Fatima Zohra
  • 2,929
  • 2
  • 17
  • 17
0
votes
1 answer

ZigBee stack/library compatible with MikroC

Is there an existing ZigBee Library/Stack that is comaptible with MikroC? I am planning to use MRF24J40B from Microchip as the transceiver and PIC18F27J53 Microcontroller as ZigBee stack controller. I can't seem to find a ZigBee stack compatible…
edmandie
  • 71
  • 1
  • 4
0
votes
1 answer

PIC18f452 port listening issue

Why doesn't this code work? All that I want is portb to toggle when I press a button. main trisb=0 trisa=0xff while true if ra0<>0 then portb = not portb end if wend .end
-1
votes
2 answers

create 250ms delay in MikroC

I'm looking to create 250ms delay function with MikroC. In the code below, I don't understand what 165 in the 2nd for section does. void MSDelay(unsigned int itime); // this is the prototype void MSDelay(unsigned int itime) { unsigned int i; …
-1
votes
2 answers

Convert if statements to for loop?

I've written a function in mikroC that scan the pressed key in a 4x4 keypad void scan_key() { PORTB = 0B11111110; if ( PORTB == 0b11101110){ Row = 1; Column = 1; return; } if ( PORTB == 0b11011110){ …
Eng.Fouad
  • 115,165
  • 71
  • 313
  • 417
-1
votes
1 answer

Send SMS GSM Click

"I'm using the example code of Mikroe for the GSM click with a few additional lines of code to send a sample text message. But I'm having problems with the 'sendSMSmsg' function where msg is undeclared identifier. I tried to define it on top of the…
Dorokun192
  • 63
  • 7
-1
votes
2 answers

Timer based interrupt in PIC microcontroller using mikroC for PIC

I am facing a problem while implementing a timer based interrupt in mikroC for PIC. I want to toggle a port pin for 8 times if there is a keypress at PORTC.F0 and there should be a delay of say 100ms between the toggles. Normally this would be very…
Ace
  • 11
  • 4
-1
votes
1 answer

Connect with DHCP server and get IP address

I want to get a IP address from DHCP server to my PIC 18F4520 device, and I used mikroc SPI Ethernet Library to program my PIC. I made a code and it is not working. I want to get IP address and display it on a LCD.Can any one help me how to do…
-2
votes
1 answer

Errors on MikroC

I am programming the pic16f1823 using mikroC and I am getting some very strange errors. When I declare an integer an error appears and when I try to declare a char* array I get an error which says Too many chars. And one of the weirdest errors are…
MOHAMMED SALEH
  • 143
  • 1
  • 15
-2
votes
2 answers

How to generate note without library?

I'm trying to generate note for example Do , do's frequency is 523. I wrote some codes but, i did not work Systick 8 mhz void note1(void){ // Note Do for (int i = 0; i < 523; i++){ GPIOE->ODR = 0x4000; delay_ms(1); …
user6214140
-2
votes
4 answers

Converting array to number in (Mikro) C

I'm running into some coding troubles. I am reading serial input into my program, and it saves the numbers into an array. Now I want to convert this array into an integer to do calculations, where Array index 0 represents the one digits, index 1 the…
DowinskiField
  • 133
  • 2
  • 15
-2
votes
1 answer

UART1_Write(13); is not running

I'm using a PIC16F688 to read from analog channel 2 and average the values of the pressure sensor and then convert the 4 bytes to digital using ASCII character method. I don't need any kind of delay after sending the results to…
-2
votes
1 answer

How to call a procedure that uses const and *?

I'm trying to implement a function about drawing a circle void drawCircle(const circleType * circle) Above is displayed how it's defined in the header file. I'm trying to use it in a program: drawCircle(circle); The circle is a struct (circleType)…
Nognir616
  • 1
  • 3
-2
votes
1 answer

PIC in C - creating own keypad scan routine using RC0-3

I have been asked to create my own routine which will scan the keypad, but only using PORTC and using RC0-3, I only need to return 4 values, which are 1,2,4,5 which, if im correct, are in a 2x2 arrangement on a 4x4 keypad. The keypad I am using is a…
Joeliomason
  • 159
  • 2
  • 16
1 2 3
8
9