Welcome, Guest. Please login or register.

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

Description:

0 Members and 1 Guest are viewing this topic.

Offline boing4000Topic starter

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 222
    • Show all replies
    • http://www.amigademo.de
Update PIC on Minimig
« on: May 11, 2008, 10:12:14 PM »
I used tiny bootloader to update the PIC via RS232 port and null-modem cable.
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?

Sorry for having that much trouble with everything arround minimig... but I still like it!
 

Offline boing4000Topic starter

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 222
    • Show all replies
    • http://www.amigademo.de
Re: Update PIC on Minimig
« Reply #1 on: May 11, 2008, 10:53:32 PM »
It is set to MCU. Tiny bootloader can also read the PICs output while booting etc.
I also checked the cable, it is working.
 

Offline boing4000Topic starter

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 222
    • Show all replies
    • http://www.amigademo.de
Re: Update PIC on Minimig
« Reply #2 on: May 11, 2008, 11:19:01 PM »
Thank you yaqube for your detailed answer.
The firmware is downloaded from Dennis website and I also checked the file date several times to be sure.

This PIC was programmed by ACube, if there is a write protection set, it could be done by them and would not be nice if they did!
Is there any way to find out the write protection is set?
Tiny bootloader says the update succeed (100% OK).

Additional... ACube also provides the current firmware for PIC and FPGA on theirs website. It would be illogical that there is a WP set and no customer could use it.

Is it normal that the PIC can not be found by tiny bootloader?
I set it to "UDP send" and "$41 18F 252o/452o" by hand.
If this is wrong, please tell me what settings ware working in your case.
 

Offline boing4000Topic starter

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 222
    • Show all replies
    • http://www.amigademo.de
Re: Update PIC on Minimig
« Reply #3 on: May 12, 2008, 12:07:43 PM »
Hi Oliver,

I will try to read out the PIC memory. Tiny bootloader can not do that afaik. What program did you use to read and write the PIC via minimigs RS232?

My background is trained electronic technician but a long time without practice in doing such things. Mostly working in IT business, fixing PC, networks and other crap ;-)
I am happy for any info, the rest I will do by myself and share my experience to others.
 

Offline boing4000Topic starter

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 222
    • Show all replies
    • http://www.amigademo.de
Re: Update PIC on Minimig
« Reply #4 on: May 12, 2008, 02:37:26 PM »
OH MAN !! I think ACube did not use any bootloader for the PIC at all!

That may be the reason why "tiny bootloader" tool can not find the PIC. The only output I receive via terminal or anything else is "Minimig Controller build 07-10-2007...".
That could be the explanation for having trouble in updating the PIC.

Is it still possible to reprogramm this PIC with a propper bootloader and then using the RS232 update?
 

Offline boing4000Topic starter

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 222
    • Show all replies
    • http://www.amigademo.de
Re: Update PIC on Minimig
« Reply #5 on: May 12, 2008, 04:43:54 PM »
Thanks koaftder, I will make it so but first have to build one.
Good to know that there is still a way to reprogram a PIC.
 

Offline boing4000Topic starter

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 222
    • Show all replies
    • http://www.amigademo.de
Re: Update PIC on Minimig
« Reply #6 on: May 13, 2008, 03:26:47 PM »
Hello Oliver,

thank you very much for this amount of information!!

Now I am very sure that ACube did not use a bootloader at all.
The minimig firmware is apparently directly written in the PICs memory starting at $000000.

Problem is how to erase the flash memory and reprogram it with tiny bootloader. My trials until now did not work. I build an adaptive board for the PIC to use minimigs serial connection via MAX232 and the oscillator to make the PIC operating.
Its a kind of WLoader (http://www.voti.nl/wloader/index_1.html) clone of course with adapted pins to 18LF252. Only clock, rx, tx, Vss, Vpp and Vcc is connected.

I connected +5V at MCLR/Vpp and Vcc to make the flash memory writeable. Must Vpp also connected to any serial pin to be clocked/pulsed instead of permanent +5V?

The PIC is responding to tiny bootloaders terminal output but could not be found with "Check PIC" or "Write Flash", it only appears a timeout.

What software can I use to erase the PIC? Maybe tiny bootloader then is able to rewrite it.

Again many questions... It also annoys me to ask and have to make all this steps at all.

Kind regards
 

Offline boing4000Topic starter

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 222
    • Show all replies
    • http://www.amigademo.de
Re: Update PIC on Minimig
« Reply #7 on: May 13, 2008, 03:31:18 PM »
@BraindeaD

I dont mind you, in fact that is exactly the same problem I have. Also this message "send a value 'K' <> ... , revise baudspeed when reset" appears, I think the PIC is sending its startup string and tiny bootloader can not understand it as a valid code.

You do have the same problem, is it also an ACube minimig?
 

Offline boing4000Topic starter

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 222
    • Show all replies
    • http://www.amigademo.de
Re: Update PIC on Minimig
« Reply #8 on: May 13, 2008, 09:04:46 PM »
Hi yaqube,

thank you for explaining the update procedure.
I did this again and again, all over again... thats what I see after the time of searching is over:
Connected to \\.\COM1 at 115200
Searching for PIC ...Not found,
ERROR!

When turning on the Minimig on or doing a PGM RESET short after pressing "Check PIC/Write Flash", this message appear:
Connected to \\.\COM1 at 115200
  Searching for PIC ...
  pic sending unknown data: "K" <>  4Dh=M
Check baudrate & Start Write while PIC is not sending serial data (e.g. in reset)
  ERROR!

Means the tiny bootloader PC programm receive the startup string "Minimig Controller build 07-10-2007..." and nothing about bootloader is detected.

Today I was talking to Vesalia (trader) and they also was puzzled to this. A possible explanation is that there is no bootloader in ACubes PIC. This will be reproduce by Vesalia technician and I am currently waiting for response.

thanks again for this detailed depiction! Sometimes when nothing works, one get a bit doubt in everything you touch.
I still hope that thing will soon work.
 

Offline boing4000Topic starter

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 222
    • Show all replies
    • http://www.amigademo.de
Re: Update PIC on Minimig
« Reply #9 on: May 14, 2008, 11:55:21 AM »
@Oliver
also thank you for offering that kind service to us "poor" minimig users without bootloader!

Im still waiting for Vesalias response in this matter. My attempts with tiny bootloader has failed all the time, so the only way seems to reflash the whole PIC.
Minimig is using a 18LF252, that require a more complex PIC progger to build. I may have the skills but definitely missing some elektronic parts to set up one right now.

Lets see what the solution is :-)

EDIT:
Just found that very raw PIC18Fxxx progger diagram example:
http://home.earthlink.net/~davesullins/software/pic18f.html
Looks very simple, just a parallel inferface with only one resistor and an external 3V power source.
Do you think out of your experience that could work?
 

Offline boing4000Topic starter

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 222
    • Show all replies
    • http://www.amigademo.de
Re: Update PIC on Minimig
« Reply #10 on: May 14, 2008, 03:03:31 PM »
Yes Oliver, thats the same information I found. Using an external progger the PIC can be totaly earsed and rewritten any time. It dont care about any software settings, thisis  only for internal self programming.

Thanks for advising of this progger, I will be extremly careful because this is currently the only PIC I have!

For ACube (italy) I pointed out that there is no access via tiny bootloader possible. The only output of PIC via serial (terminal) is starting instantly with "Minimig build...." and even while resetting the PIC and let tiny bootloader software listen on RS232 it says "PIC is sending unknown data..." as mentioned in  previous post.
 

Offline boing4000Topic starter

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 222
    • Show all replies
    • http://www.amigademo.de
Re: Update PIC on Minimig
« Reply #11 on: May 14, 2008, 06:27:20 PM »
Great job and service Amigakit! I hope that Vesalia in germany (where Im located too) will do something like that. They sold me the Minimig that was build by ACube...

My attempt in reflashing the PIC via that very simple LPT progger failed until now. All wires and connections are correct and I checked it out many times. Also there is a portdiag tool to measure single line state. Everything is working but the PIC can not be detected or read out.
I feel a bit frustrated because nothing is working :madashell:

If only this Xilinx core compiling would work, I could at least try to fix some bugs in blitter.v or something else. Right now minimig feels a bit "closed" or static to me. But it is still working, even after that PIC read attempt!
 

Offline boing4000Topic starter

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 222
    • Show all replies
    • http://www.amigademo.de
Re: Update PIC on Minimig
« Reply #12 on: May 14, 2008, 07:09:08 PM »
Yes you are right, I will first wait for Vesalias response. Perhaps they also can reflash my pic or send another one in exchange. Minimig is operating also with the older version and makes a lot of fun too!

Thanks again for your time and information! It can always be helpful :-)
 

Offline boing4000Topic starter

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 222
    • Show all replies
    • http://www.amigademo.de
Re: Update PIC on Minimig
« Reply #13 on: May 14, 2008, 10:26:30 PM »
Wow thats very nice BraindeaD :-) thank you for your offering!
Sending the PIC to Spain should be no problem. I will come back to this if necessary!
 

Offline boing4000Topic starter

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 222
    • Show all replies
    • http://www.amigademo.de
Re: Update PIC on Minimig
« Reply #14 on: May 15, 2008, 08:34:10 PM »
Today Vesalia insure me to swap the PIC with another one contain tiny bootloader, also for all their minimig customers :-)
They are still waiting for a response from ACube but will do this exchange anyway.