PDA

View Full Version : Problem with MCS Plus



ozarkshermit
- 27th January 2011, 16:32
Howdy

I have been trying to use MCS Plus with a PIC18f2520 running at 32 MHZ on it's internal Oscillator. The program runs fine normally, now I'm trying to debug some code using MCS Plus . I suspect it might be the bootloader. I'm using a RS232 to Serial converter that works fine on other chips (at a slower clock speed). When I try to run the ICD, I do not see the normal flashing LED's on the converter, just what looks like two attempts on the Tx LED. Normally, when things are working, both the Tx and Rx LED's flash to show activity. I get the error stating that "MicroCode Studio was unable to connect to the PIC microcontroller executing the ICD Code."

I am using the DEFINE OSC 32 , and DEFINE LOADER_USED 1

Do I need a different bootloader for the 18F2520 to run at 32MHZ? Or is that just not possible?

I have been unable to locate the hex files for the various processor speeds . . .

Ken

Bruce
- 27th January 2011, 20:53
With the MCS loader you need a bootloader .HEX file that's been created for each oscillator speed.

I.E. it will not work if you programmed a loader .HEX file assembled for 4MHz if you're using 32MHz,
20MHz, etc.

ozarkshermit
- 27th January 2011, 21:45
Thanks Bruce

That's what I thought. On MELabs website, regarding MCS Plus, I read the following:

"You need to make sure that the bootloader *.hex file matches the clock speed of your target microcontroller. For example, the file 16F877_20.hex should be used to program a device that will be running at 20MHz. If you don't do this, MicroCode Loader will be unable to communicate with the target microcontroller. You don't have to set the baud rate from the main MicroCode Loader application, as it will be detected automatically for you. MicroCode Loader comes with a number of pre-compiled *.hex files, ready for programming into the target microcontroller."

Great

So where is the pre-compiled*.hex file for a PIC 18F2520 running at 32MHZ?

Ken

Bruce
- 27th January 2011, 22:11
In the MCS loader help file you'll find a lot more info, and an email address to contact Mecanique for different loader files.

ozarkshermit
- 27th January 2011, 22:32
OK, Thanks Bruce

I did a system search and the only file found for a 18f2520 was for 20MHZ

I suppose I could change my configs, etc to run at 20 MHZ - also would have to change the include file . . .and then change everything back after wards . . . a real PITA

Hopefully someone from Mecanique will respond sometime

Ken

ScaleRobotics
- 28th January 2011, 01:50
It is sort of a pain, but it is pretty easy to change. Here is some more information about how to do it. I modified a 18f4520 and a 18F8722 for 40 mhz, and it worked pretty well using this method. http://www.picbasic.co.uk/forum/content.php?r=96-Mechanique-Bootloader-Hex

ozarkshermit
- 28th January 2011, 14:02
It is sort of a pain, but it is pretty easy to change. Here is some more information about how to do it. I modified a 18f4520 and a 18F8722 for 40 mhz, and it worked pretty well using this method. http://www.picbasic.co.uk/forum/content.php?r=96-Mechanique-Bootloader-Hex

Thanks a bunch.

I did get a very fast response from Mecanique, stating that they only support external oscillators. It would be nice if they stated that in their documentation . . .
I definitely will look into your Bootloader info

Ken