PDA

View Full Version : MikroC



neekow
- 30th September 2012, 14:27
Hello, I am a Computer Engineering Student. I am taking the course of embedded Systems. I decided to install the MikroC software, 4.15. I wrote my code and when I import the hex file to the programmer, it gives me this warning "WARNING! No configuration words in hex file. In MPLAB use file/export to save hex with config". What should I do to solve it? I'm hoping for a quick reply for I am somehow short on time! I appreciate any help! thank you!

Jumper
- 30th September 2012, 15:48
Hi,

You would be much better off asking the same question at www.mikroe.com/forum which is the place for microC. But the short and fast answer would be to upgrade from 4.15 to the newer 5.61. Upgrades are free if you have a licensed copy.

What kind of programmer do you use could also be of interest when solving the problem.

/me

neekow
- 1st October 2012, 05:45
Thank you, i have fixed a problem, and now my code is being written to the board. However one last problem appeared. I wrote a code that blinks the leds with 0.5 seconds interval. However after running the program and after connecting the leds to the port, the leds do not seem to blink. They light up the whole time? My code is 100% correct. What do uou think the problem is?

Jumper
- 1st October 2012, 09:46
hmm lets see:

you are trying to use PORTA whithout disabling the analog parts
you have the wrong osc settings so the leds will flash after 0.5 light years and not seconds and seem to be always on
you have the wrong osc settings so the leds will flash after 0.5 us and not seconds and seem to be always on
you have managed to setup the tris registers incorrectly even your code is "correct"

Your HW is connected in some weird way

The programmer has managed to write an incorrect hex file to your PIC

The pic has watchdog activated and is contantly resetting before reaching 0.5 s

It is really hard to tell without knowing what pic, your schematic and of course the code and configuration bits.

Anyone else who feel like taking a wild guess??

HenrikOlsson
- 1st October 2012, 12:29
Since the code obviously is 100% correct there must be a hardware issue...

Jumper
- 1st October 2012, 12:59
or an old compiler with tons of bugs, hardly the code's problem. It is rare to find a 100% correct not working code :-)

neekow
- 2nd October 2012, 04:57
Thanks guys. The problem was the pickit. The second i changed, everythkng went went perfectly. Thank you anyways