Hi,
maybe because the comma is missing after {1, "Jack", "367D"}?
Search found 24 matches
- 07 May 2013 18:54
- Forum: mikroC General
- Topic: Array of char??
- Replies: 3
- Views: 1923
- 30 Apr 2013 22:38
- Forum: mikroC General
- Topic: Looking up data in Eeprom
- Replies: 14
- Views: 6694
Re: Looking up data in Eeprom
Hi pwdixon,
of course you are right, but this is a potential problem, which could arise after every new MikroC Pro release...
It would be good to know the MikroE team opinion.
Regards.
of course you are right, but this is a potential problem, which could arise after every new MikroC Pro release...
It would be good to know the MikroE team opinion.
Regards.
- 30 Apr 2013 20:42
- Forum: mikroC General
- Topic: Looking up data in Eeprom
- Replies: 14
- Views: 6694
Re: Looking up data in Eeprom
Not exactly... The standard does not specify this, it is implementation dependent (for GCC, for example, the default is signed ). I am not sure how is it in MikroC Pro, but the good programming practice is to write implementation-independent code. It isn't a big effort (and it is safer) to write uns...
- 30 Apr 2013 17:37
- Forum: mikroC General
- Topic: Looking up data in Eeprom
- Replies: 14
- Views: 6694
Re: Looking up data in Eeprom
Hello Jassan26,
are you sure your program now works correctly?
You declare x-variable as char, but then you check (in the loop) if x<=0xF1...
Shouldn't x be declared rather as unsigned short?
are you sure your program now works correctly?
You declare x-variable as char, but then you check (in the loop) if x<=0xF1...
Shouldn't x be declared rather as unsigned short?
- 30 Apr 2013 17:04
- Forum: mikroC Wish List
- Topic: MikroC and Linux
- Replies: 60
- Views: 71184
Re: MikroC and Linux
Dear Mikroelektronika team, why to bother at all with a Linux version? Wasn't it simpler and better to write the compiler for ALL the main platforms (Linux, OSX, Windows)? Nowadays there is no excuse for writing platform-specific programs! There is an excellent tool called Qt - it is a C++/C++11 bas...
- 04 Jul 2011 20:52
- Forum: mikroC PRO for PIC General
- Topic: High voltage meter
- Replies: 8
- Views: 2951
Re: High voltage meter
Hi Sparky1039,
your circuit is OK, except that the OpAmp would work beyond ABSOLUTE MAXIMUM RATINGS: Vccmax=5.5V.
your circuit is OK, except that the OpAmp would work beyond ABSOLUTE MAXIMUM RATINGS: Vccmax=5.5V.
- 06 May 2011 11:38
- Forum: mikroC PRO for PIC General
- Topic: bit comparison error
- Replies: 6
- Views: 1899
Re: bit comparison error
(...) Variables c and k are not volatile in the original code but in this test code they do nothing so I made them volatile to stop the compiler optimising them out of existence. Maybe there is a better way? (...) Hi Davros, this is a good and elegant way... Your original code works fine under 4.80...
- 06 May 2011 02:30
- Forum: mikroC PRO for PIC General
- Topic: A problem with pointers?
- Replies: 5
- Views: 1785
Re: A problem with pointers?
I(...) So it seems that there is an memory optimizer in the compiler (makes sense), and the memory allocation IS decided at compile time! (...) Well done, you did an interesting test! And yes, you were partially right. In a non multitasking environment you may use a pointer to a non-existing array ...
- 05 May 2011 19:09
- Forum: mikroC PRO for PIC General
- Topic: A problem with pointers?
- Replies: 5
- Views: 1785
Re: A problem with pointers?
(...) but for microcontrollers, I think the compiler allocates the array at compile time (not at run time), therefore the pointer to the array will always stay the same on a microcontroller, and the array does not get de-allocated (...) Hi CVMichael! You can never assume this! Imagine you have 4 fu...
- 05 May 2011 16:57
- Forum: mikroC PRO for PIC General
- Topic: A problem with pointers?
- Replies: 5
- Views: 1785
Re: A problem with pointers?
Hi,
your function sendStuff() returns a pointer to an array, which does not exist anymore. Accessing it gives unpredictable results.
your function sendStuff() returns a pointer to an array, which does not exist anymore. Accessing it gives unpredictable results.
- 05 May 2011 16:37
- Forum: mikroC PRO for PIC General
- Topic: bit comparison error
- Replies: 6
- Views: 1899
Re: bit comparison error
Hi, it looks like you are using variable c just for storing a LSB of PORTC. If so, try this: void main() {unsigned short c, k; ANSELC = 0; // all digital I/O TRISC = 0b00000001; c=PORTC.RC0; // delay routine here if(c==PORTC.RC0) // this bit comparison is no more a problem k=c; } Do the variables c ...
- 02 Mar 2011 18:27
- Forum: mikroC PRO for PIC General
- Topic: Support for 12F1822
- Replies: 15
- Views: 5021
Re: Support for 12F1822
Hi,
thanks for info! I did not expect it looks so bad.
What about PicFlash2? Will it be upgradeable? I own two of them...
Regards
thanks for info! I did not expect it looks so bad.
What about PicFlash2? Will it be upgradeable? I own two of them...
Regards
- 01 Mar 2011 21:53
- Forum: mikroC PRO for PIC General
- Topic: 14 bit integer
- Replies: 8
- Views: 2456
Re: 14 bit integer
(...) Good luck in finding 14bit data types and I wonder if this is doable even in assenbly ? Thanks! Yes, it is possible in assembly language, but it is unconvenient and I'd like to do it in C++... The structure I presented in one of my previous posts should do the job, but - unfortunately - it do...
- 01 Mar 2011 19:23
- Forum: mikroC PRO for PIC General
- Topic: 14 bit integer
- Replies: 8
- Views: 2456
Re: 14 bit integer
(...)explain to us what is the benifit and the reason that you must have 14 bits as this is definitely not the International standard The answer is very simple, and it has NOTHING to do with the international standard. I have an array of 800 unsigned integer constants. Every element is not greater ...
- 01 Mar 2011 19:01
- Forum: mikroC PRO for PIC General
- Topic: 12F1822 PWM Bug??
- Replies: 4
- Views: 2218
Re: 12F1822 PWM Bug??
Do you meanneorob wrote:(...)
APFCON.F7 = 0; //RX on RA1
APFCON.F2 = 0; //TX on RA0
APFCON.F0 = 0; //CCP1 on RA2
(...)
APFCON.B7 = 0; //RX on RA1
APFCON.B2 = 0; //TX on RA0
APFCON.B0 = 0; //CCP1 on RA2
?