Welcome, Guest. Please login or register.

Author Topic: Update PIC on Minimig  (Read 24788 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline yaqube

  • Full Member
  • ***
  • Join Date: Feb 2008
  • Posts: 197
    • Show all replies
Re: Update PIC on Minimig
« on: May 11, 2008, 11:10:57 PM »
Quote

boing4000 wrote:

Problem is: tiny bootloader points out to write the flash memory "100% OK" but after a reset (power off) of minimig the old version is still inside the PIC.

Anyone else did update the PIC via RS232?


I've updated the flash memory in the PIC many times and never had any problem.
Two possible reasons:
- You are updating the PIC with the old firmware (maybe it seems to be stupid but sometimes it happens).
- The WRTn (have a look at the chapter 19.4 in the PIC18FXX2 datasheet) Write Protect configuration bits are set to zero. If it is the reason the only solution is to erase the whole chip in an external programmer and program the bootloader once again.
BTW: Who has programmed the bootloader in your PIC?
 

Offline yaqube

  • Full Member
  • ***
  • Join Date: Feb 2008
  • Posts: 197
    • Show all replies
Re: Update PIC on Minimig
« Reply #1 on: May 13, 2008, 08:12:51 PM »
Hey guys, just to be sure that you do everything correctly please follow the procedure:

- connect the Minimig to an appropriate serial port on a PC
- set jumper to MCU position
- switch the Minimig on
- run Tiny Bootloader program on the PC
- choose an appropriate COM port and rate (115200)
- press the "CheckPIC" button

Now you have ca 4 seconds for your PIC to respond.
The bootloader on the PIC responds to incoming transmission within ca a second after its reset. After that time it jumps to a stored program in the flash memory (Minimig firmware).

- Now you have to press the PGM RESET button on the Minimig to establish transmission with the Tiny Bootloader on the PC.

If you succeed you should see the following message in a log window:

Connected to \\.\COM1 at 115200
  Searching for PIC ...
  Found:18F 252o/452o

If you don't you will see:

Connected to \\.\COM1 at 115200
  Searching for PIC ...Not found,
  ERROR!

The same applies to the FLASH writting. After you choose a hex file you want to write you should press "Write Flash" and immediately reset the PIC on the Minimig.
If you succeed you will see the following message:

Connected to \\.\COM1 at 115200
  HEX: 6 days old, INHX8M,18Fcode, total=14552 bytes.
  Searching for PIC ...
  Found:18F 252o/452o
  WRITE OK  at 20:55,   time:7.173 sec

I hope it will be helpful for those people who want to update the PIC firmware. It is a must if you want the Minimig to be able to write to the ADF images (this feature will be available in the upcoming firmware release).
If you still have problems please describe them as much as possible so I could be able to help you.
 

Offline yaqube

  • Full Member
  • ***
  • Join Date: Feb 2008
  • Posts: 197
    • Show all replies
Re: Update PIC on Minimig
« Reply #2 on: July 26, 2008, 08:13:08 PM »
I can help you with the HI-TECH compiler. Send me a pm with your problem described.

PS. C isn't strange, it's only simple  :-D
 

Offline yaqube

  • Full Member
  • ***
  • Join Date: Feb 2008
  • Posts: 197
    • Show all replies
Re: Update PIC on Minimig
« Reply #3 on: July 27, 2008, 01:30:38 AM »
Use STD not PRO edition. I don't know why but in PRO edition you cannot use sprintf and printf together.