Search found 209 matches

by RacerX10
29 Jun 2018 00:07
Forum: mikroC PRO for PIC General
Topic: Need Reminder
Replies: 2
Views: 1147

Re: Need Reminder

janni wrote:RB0 pin state, which happens to be the input of external interrupt, INT0 :) .
thank you kind sir
by RacerX10
28 Jun 2018 22:06
Forum: mikroC PRO for PIC General
Topic: Need Reminder
Replies: 2
Views: 1147

Need Reminder

I've been "out of the game" for a few years and I'm getting my groove back. I'm looking at some of my old source code, and in an interrupt service routing I'm testing : if (INT0_bit) { blah blah } What exactly is that testing .. the RB0 pin or the interrupt status ? Running on 18F4520 Thank you !
by RacerX10
20 Oct 2015 02:40
Forum: mikroC PRO for PIC32 General
Topic: Windows 10 USB Dongle License issue
Replies: 4
Views: 3043

Re: Windows 10 USB Dongle License issue

Maybe give us a hint what was done ?
by RacerX10
17 Apr 2014 22:51
Forum: mikroC PRO for PIC General
Topic: Variables across multiple source files
Replies: 4
Views: 1503

Re: Variables across multiple source files

Actually what I guess I need is with your example, could you define and use some variables ?

Something like

Code: Select all

unsigned int x;
Thanks
by RacerX10
17 Apr 2014 17:56
Forum: mikroC PRO for PIC General
Topic: Variables across multiple source files
Replies: 4
Views: 1503

Re: Variables across multiple source files

Thanks for your reply, that has gotten me VERY close to working. One issue remains : 24 355 Redefinition of 'font [main.c] '. 'font' already defined in 'display.c' main.c I have "font" set up as this in funcdef.h : #ifndef FUNCDEF_H #define FUNCDEF_H // prototype 3 LCD configuration #define GLCD_Dat...
by RacerX10
15 Apr 2014 23:59
Forum: mikroC PRO for PIC General
Topic: Variables across multiple source files
Replies: 4
Views: 1503

Re: Variables across multiple source files

It's starting to look to me like you would need to both define the vars in the c file *AND* manifest a 2nd "extern" version of the variables in the .h file .. anybody know if that is correct ??

Seems like a lot of overhead if you have very many variables.
by RacerX10
15 Apr 2014 18:32
Forum: mikroC PRO for PIC General
Topic: determine execution time for GLCD .
Replies: 2
Views: 1131

Re: determine execution time for GLCD .

I usually just toggle a spare pin hi and low before and after whatever I'm trying to time a sequence of code
by RacerX10
15 Apr 2014 16:01
Forum: mikroC PRO for PIC General
Topic: Variables across multiple source files
Replies: 4
Views: 1503

Variables across multiple source files

How do I get variables to be global and seen across multiple source files in the same project ? this is in my "main.c" : sbit GLCD_EN at RB7_bit; but my "display.c" is giving me a 10 324 Undeclared identifier 'GLCD_EN' in expression display.c error another example : this is in my "main.c" : unsigned...
by RacerX10
20 Aug 2013 01:14
Forum: mikroC PRO for PIC General
Topic: Source Files and Header Files.
Replies: 6
Views: 2302

Re: Source Files and Header Files.

I'm interested in this too, I would love to break up my 800 lines of C code into several smaller files.

Maybe somebody could write up a quick HOWTO on the proper way to do this ?

Thanks !
by RacerX10
20 Aug 2013 01:06
Forum: mikroC PRO for PIC General
Topic: Need filter (of sorts)
Replies: 16
Views: 4641

Re: Need filter (of sorts)

Is there something in the compiler that tells you how many cycles (750 from your above post) any particular sequence of code uses ? How did you arrive at that number ?

Thanks
by RacerX10
19 Aug 2013 18:31
Forum: mikroC PRO for PIC General
Topic: Need filter (of sorts)
Replies: 16
Views: 4641

Re: Need filter (of sorts)

What's considered "low clock" and "high rpm" ?

I've got an 8 Mhz crystal on a 18F4520.

Highest RPM / frequency I'd ever encounter in real life equates to about 1 khz signal at the PIC input.

Thanks !
by RacerX10
19 Aug 2013 13:50
Forum: mikroC PRO for PIC General
Topic: Need filter (of sorts)
Replies: 16
Views: 4641

Re: Need filter (of sorts)

Oh, I hoped it would be easily visible with names like minsample and maxsample :( It should have been, but I was looking at it around midnight after a very long and busy day :) Thanks for the explanation, I am able to see how it all works now. I corrected samples_total to unsigned long and it's wor...
by RacerX10
19 Aug 2013 05:38
Forum: mikroC PRO for PIC General
Topic: Need filter (of sorts)
Replies: 16
Views: 4641

Re: Need filter (of sorts)

Referencing the earlier post by Toley .. is it OK to do that much .. "stuff" .. in the ISR ?

Thanks
by RacerX10
19 Aug 2013 03:35
Forum: mikroC PRO for PIC General
Topic: Need filter (of sorts)
Replies: 16
Views: 4641

Re: Need filter (of sorts)

Thanks Janni, as usual you are the best. It will take me a day or two to wrap my brain around what your "removing rare disturbances" code is doing :) At first attempt with that code, I'm getting values for "ave_counts" (TIMER0) that are 2.4x lower than expected value .. eg 6,045 where I'm expecting ...
by RacerX10
18 Aug 2013 05:24
Forum: mikroC PRO for PIC General
Topic: Need filter (of sorts)
Replies: 16
Views: 4641

Re: Need filter (of sorts)

Best solution to your problem depends on details: - how long and how frequent the false pulses may be, The duration of the false pulses is as shown in the DSO grab .. "short" (2 or 3 uS). They are what I would call infrequent. Maybe 2 or 3 in a 10 second span with a 500 Hz (or lower, typically) sig...

Go to advanced search