Search found 88 matches

by Pesticida
17 Nov 2015 14:27
Forum: mikroC PRO for dsPIC30/33 and PIC24 General
Topic: Implementation Arduino Micros() Function
Replies: 5
Views: 3291

Re: Implementation Arduino Micros() Function

Hello and Thanks for the reply, I want just to know if the Code below ok is?! : unsigned long micros() { unsigned long m; unsigned int t; asm { disi #0x4;} /* disable interrupts */ m = timer0_overflow_count; t = TMR2; if ((T2IF) && (t < 65535)) m++; asm { disi #0x0;} /* enable interrupts */ //return...
by Pesticida
16 Nov 2015 16:35
Forum: mikroC PRO for dsPIC30/33 and PIC24 General
Topic: Implementation Arduino Micros() Function
Replies: 5
Views: 3291

Re: Implementation Arduino Micros() Function

Hello Aleksa, I attached the rar File!

Thanks!!!

Regards Antonio
by Pesticida
06 Nov 2015 12:18
Forum: mikroC PRO for dsPIC30/33 and PIC24 General
Topic: Implementation Arduino Micros() Function
Replies: 5
Views: 3291

Re: Implementation Arduino Micros() Function

I tested the Code like this: unsigned long tm1,tm2; char strbuffer[12]; tm1=Micros(); Delay_ms(10); tm2=Micros(); LongWordToStr(tm1,strbuffer); Uart2_Write_Text("Elapsed Time1 = "); Uart2_Write_Text(strbuffer); Uart2_Write_Text("\r\n"); LongWordToStr(tm2,strbuffer); Uart2_Write_Text("Elapsed Time2 =...
by Pesticida
06 Nov 2015 11:34
Forum: mikroC PRO for dsPIC30/33 and PIC24 General
Topic: Implementation Arduino Micros() Function
Replies: 5
Views: 3291

Implementation Arduino Micros() Function

Hello all! I'm trying to implement the Micros() Function for Mikroc: Original Arduino: unsigned long micros() { unsigned long m; uint8_t oldSREG = SREG, t; cli(); m = timer0_overflow_count; t = TCNT0; if ((TIFR0 & _BV(TOV0)) && (t < 255)) m++; SREG = oldSREG; return ((m << 8) + t) * (64 / clockCycle...
by Pesticida
26 Jun 2015 10:57
Forum: mikroC PRO for dsPIC30/33 and PIC24 General
Topic: Mikroc ("pro") for dspic and DMA
Replies: 1
Views: 1623

Mikroc ("pro") for dspic and DMA

Hello I Buy the Mikroc ("pro") for dspic and I think that I can use like on XC16 Compiler the DMA easy, but i can not see any builtin Functions for dma usage. I'm a fan for Mikroc but I think the Dspic Microcontrollers exists years and years and you sell the dspic compiler as Pro compiler,Pro is for...
by Pesticida
06 Mar 2013 19:14
Forum: mikroC PRO for PIC General
Topic: After Update to 6.0 Troubles
Replies: 2
Views: 1082

After Update to 6.0 Troubles

Hello after the Update ,when I'm compiling my Projects I receive this Error:preprocessor did not return ....0 102 Finished (with errors): 06 Mar 2013, 19:10:17 Mp3_Test2.mcppi And when I show on the Code Explorer I can not see the Functions that I Use I see just under Globals :preprocessor did not r...
by Pesticida
08 Aug 2012 12:12
Forum: mikroC PRO for PIC General
Topic: Device ID
Replies: 5
Views: 2473

Re: Device ID

No its not true,on the mikroc programming Software you can write on the ID locations a number,and you can read the same number with the programming software,but I need to read the number at run time!

Regards

Pesti
by Pesticida
07 Aug 2012 18:56
Forum: mikroC PRO for PIC General
Topic: Device ID
Replies: 5
Views: 2473

Device ID

Hello,

I'm writing on my pic 18F4520 to the ID Location for every programmed Device a ID Number.

How can I Read that number when the programm is running!?

Thanks for any help!

Regards Pesti
by Pesticida
20 Oct 2011 06:54
Forum: mikroC PRO for PIC General
Topic: UART1_Read_Text
Replies: 3
Views: 2120

Re: UART1_Read_Text

Hello,

Thanks Sparky ! I will try your suggestion.

Regards Pesti
by Pesticida
19 Oct 2011 12:29
Forum: mikroC PRO for PIC General
Topic: UART1_Read_Text
Replies: 3
Views: 2120

UART1_Read_Text

Hello, I have a Question ,I'm using the UART1_Read_Text Syntax like here: UART1_Read_Text(output, "*!", 10); // reads text until '*!' is found And I have entered a to short string,the Source code is blocking and naturally the Watchdog reset the MCU!while is going in a endless loop and waiting for "*...
by Pesticida
11 Oct 2011 20:52
Forum: mikroC PRO for PIC General
Topic: Timer Problem
Replies: 16
Views: 4011

Re: Timer Problem

Yes I see that a dsPIC33FJ256 with 40 Mhz can generate 1.25 Mhz PWM!

I dont k'now how difficult is to transfair to other pic generation?! :-(
by Pesticida
11 Oct 2011 20:15
Forum: mikroC PRO for PIC General
Topic: Timer Problem
Replies: 16
Views: 4011

Re: Timer Problem

Ok I see on the pdf file it'say:

PWM output: PWM resolution is 1- to 10-bit,
max. PWM freq. @: 8-bit resolution = 156 kHz
10-bit resolution = 39 kHz
by Pesticida
11 Oct 2011 20:10
Forum: mikroC PRO for PIC General
Topic: Timer Problem
Replies: 16
Views: 4011

Re: Timer Problem

Mario Thanks! By the way Your Englisch is more better that my :-) Thats mean when I take a 10 Mhz PLL Settings and I have 40 Mhz ,i can made max ~400 khz. And the conclusion for me is that a 8 bit Microcontroller is not good enough to use for Signal Generation above the 400 Khz. The same Problem I h...
by Pesticida
11 Oct 2011 19:16
Forum: mikroC PRO for PIC General
Topic: Timer Problem
Replies: 16
Views: 4011

Re: Timer Problem

I deleted now all other Interrupts codes. And I reach now 178 Khz. T0CON.TMR0ON = 1;// Timer0 On/Off Control bit:1=Enables Timer0 / 0=Stops Timer0 T0CON.T08BIT = 1;// Timer0 8-bit/16-bit Control bit: 1=8-bit timer/counter / 0=16-bit timer/counter T0CON.T0CS = 0;// TMR0 Clock Source Select bit: 0=Int...
by Pesticida
11 Oct 2011 18:17
Forum: mikroC PRO for PIC General
Topic: Timer Problem
Replies: 16
Views: 4011

Re: Timer Problem

With this settings you can see my waveform: T0CON.TMR0ON = 1;// Timer0 On/Off Control bit:1=Enables Timer0 / 0=Stops Timer0 T0CON.T08BIT = 1;// Timer0 8-bit/16-bit Control bit: 1=8-bit timer/counter / 0=16-bit timer/counter T0CON.T0CS = 0;// TMR0 Clock Source Select bit: 0=Internal Clock (CLKO) / 1=...

Go to advanced search