Jump to content

sgl_imaging_challenge_2021_2.thumb.jpg.72789c04780d7659f5b63ea05534a956.jpg

Any ideas on repairing a (slightly!) blown motor board ?


Recommended Posts

Archie,

When I loaded the HEX code the programmer fuses are set by the config bits in the code when the code is loaded into the application. I'm wondering if, for example that these bits needed to be changed, and as a result the code as programmed has not programmed correctly.  Now this may be down to me messing with bootloaders the other day, but I just erased and blanked the PIC, loaded the code which set the fuses shown in the attached image, but then errored with 53 errors and 4 IDs...  Clicking the CODE button shows the HEX as per attached image....  Originally the chip I programmed and mounted on the PCB programmed without issue.... but it's raised an element of doubt as to the the replacement PIC being incorrectly programmed causing it not to run....(for arguments sake say the oscillator setting should be HS_PPL and it gets set to HS)

code fuses.png

prog mem.png

Link to post
Share on other sites
  • Replies 218
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Well I've just received a PM from the owner and he's a happy bunny... Yes it's four out of four guys Due to their personal commitments they haven't had the time to put the thing through its pace

Well it's been a busy morning... The SGL member with the damaged MC003 board had a change of heart and contacted me again to see if I would still be willing to attempt to repair  his board.  Natu

We'll it looks like we've scored another goal in extra time The first thing I did this morning was to re-flash the PICs with the same 209 hex file I originally used.  Now as the PICs were solder

Posted Images

No need for apologies Malcolm  (ever 🙂)

Yes, that's why Skywatcher's choice of sockets on this mount was so risky.  (that's my excuse anyway !)

The Synscan hand controller plugs into an EQ5 mount via an RJ45  socket, so the EQmod adapter has an RJ45 plug.

On the synscan goto Dobs, the cable that links the Alt motor board to the Az motor board is the RJ45  at both ends, and the synscan hand controller plugs instead into the RJ12  on the Alt motor cover, right next to the RJ45 socket. 😬

So if you're not concentrating (like I wasn't), it's quite easy to plug the EQMod RJ45 plug into the RJ45 socket on the Dob, and boom.......  resulting in a repair that will cost around £200, and a 4 month wait.

It would have been much safer to have a completely different type of socket linking the two motor boards.

Edited by Astro-Geek
Link to post
Share on other sites

Archie,  I could really do with some help here.

I have installed python, and executing the scripts in that zip file launched a CMD like box asking for the path to the BIN file, which was copied and pasted against the prompt.  I hit return and pointed it to the folder where to put the HEX file and hit enter.  Some text was displayed and then the box was closed.  On checking the path for the HEX file, the folder was empty.  I had to resort to recording the screen in order to see what the messages were...

I've tried locating the output folder directly on the C drive and it still have the same error...

Any ideas

 

python error.png

 

Placing the BIN file in the PUBLIC folder (where everyone has permissions) and then opening the script in the Python IDE and running it from there also results in the same error, so I don't think its a windows user permission issue

Even running the IDE as Administrator has the same issue

 

python error 2.png

Edited by malc-c
Link to post
Share on other sites

Hi Malcolm, I will have a look when I get home.

In the meantime, do you keep any notes on the circuit, especially connectors? I have started roughing out a circuit diagram based on the EQ6.

What would help are photos of both sides of the AZ board. 

Cheers Archie 

Link to post
Share on other sites
2 hours ago, ozarchie said:

Hi Malcolm, I will have a look when I get home.

In the meantime, do you keep any notes on the circuit, especially connectors? I have started roughing out a circuit diagram based on the EQ6.

What would help are photos of both sides of the AZ board. 

Cheers Archie 

Leave that with me Archie,  (something I can manage at last.. 🙂)

I'll take some high res photos of both sides of both boards and post them on here, (they'll be big !)

 

Link to post
Share on other sites

Ok, here's the bigger photos of both sides of both boards.

I had to take them at an angle to avoid the reflection from the ringflash.

They're both almost identical, apart from the obvious missing RJ12 and power socket from the AZ "slave" board.

As malcolm suspected, there's one or two small components near the PIC that maybe telling it whether it's the AZ or the Alt.

Thanks Archie.... 

DSCF4991.thumb.JPG.a51662e803680e32deb3280773205294.JPGDSCF4990.thumb.JPG.83509ba588f337f3e1c0b99d09508cdd.JPGDSCF4989.thumb.JPG.df14f7f2d612a5479305756830503446.JPGDSCF4988.thumb.JPG.44d1c1030fade99e5afa957a030cab6a.JPG

Link to post
Share on other sites

OK, just to rule out an issue with my PicFlash programmer I installed my PICKit2.

With the PIC in the breadboard and the PicKit2 programmer attached I loaded up the code from the post on page 3 and received a warning that the code is too large for the device... but when instructed to program the chip it reported a successful programing.  But verification failed.  I get the same results with the sample EQ6 file contained in the zip file.

If the device is read after a "successful" program the program memory is just 0000 in each location

Any ideas Archie ?

pickit error.png

Edited by malc-c
Link to post
Share on other sites

Yes, that does look odd. I am just resurrecting my PICKIT2 with an 886 in it. I will get back to you.

I am using the same version of Python as you have, but am not seeing that problem.

  1. Windows search > cmd<enter>
  2. C:\users\Name\>cd \users\public<enter>
  3. C:\Users\Public>py -V<enter>
  4. Python3.8.3
  5. py bin2hex.py -o v209.hex -b v209.bin

 

 

PythonCommandLine.PNG

Link to post
Share on other sites
2 hours ago, Astro-Geek said:

Ok, here's the bigger photos of both sides of both boards.

What I find very useful is to load both front and back images into Gimp (my tool of choice) or PS as separate layers. Mirror the bottom side horizontally, then using the Perspective tool, get both layers aligned perfectly. Then all you need to do is toggle the top layer visibility to see how top and bottom components, vias and holes line up. Makes analysis a lot easier.

  • Like 1
Link to post
Share on other sites
33 minutes ago, ozarchie said:

Yes, that does look odd. I am just resurrecting my PICKIT2 with an 886 in it. I will get back to you.

I am using the same version of Python as you have, but am not seeing that problem.

  1. Windows search > cmd<enter>
  2. C:\users\Name\>cd \users\public<enter>
  3. C:\Users\Public>py -V<enter>
  4. Python3.8.3
  5. py bin2hex.py -o v209.hex -b v209.bin

 

 

PythonCommandLine.PNG

 

I followed your instructions, running from the command prompt.  However rather than getting the "Done!" message I was prompted to enter the paths for the source and destination again, which resulted in the same permission error.  Only this time it did produce a 1K hex file... full of 3FFF at each location.  I think it was this confusion that has resulted in me effectively programming a blank PIC in the first instance....

After a bit of faffing around I managed to get it to work.... using the py script from your zipfile.  This produced a 20k hex code with data (see attached).  However when this is loaded into my PicFlash programmer the programming fails with the same 53 program and 4 ID errors.  Loading the 20k hEX file into PicKit2 gives the same warning about the code being too large for the device - it also shows the code is protected (as it does in picflash).

python error3.png

python working.png

hex1.png

Link to post
Share on other sites

Hi Malcolm, I am not really a PIC expert but the issue appears to be the configuration words. As you can see on your pictures, code protect is turned on (by the contents of the .mcf file and hence the contents of the .hex file). This means that once you program it, you can't read it back, so verification fails. Reading it back shows all zeroes.

You can prove this to yourself by

  • deleting the second last line in the hex file (the config bits)  (:20400000FFFFFFFFFFFFFFFFFFFFFFFFFFFFA22FFF3DFFFFFFFFFFFFFFFFFFFFFFFFFFFFAF),
  • saving the file and then
  • using that HEX file to program the device
  • both errors will disappear. (I have attched the edited file for you).

If you load the modified HEX file, set your configs, you can then export the hex file which will then contain the program and your configs. All should the work.

 

 

MC004ee.hex

Link to post
Share on other sites
2 minutes ago, ozarchie said:

Hi Malcolm, I am not really a PIC expert but the issue appears to be the configuration words. As you can see on your pictures, code protect is turned on (by the contents of the .mcf file and hence the contents of the .hex file). This means that once you program it, you can't read it back, so verification fails. Reading it back shows all zeroes.

You can prove this to yourself by

  • deleting the second last line in the hex file (the config bits)  (:20400000FFFFFFFFFFFFFFFFFFFFFFFFFFFFA22FFF3DFFFFFFFFFFFFFFFFFFFFFFFFFFFFAF),
  • saving the file and then
  • using that HEX file to program the device
  • both errors will disappear. (I have attched the edited file for you).

If you load the modified HEX file, set your configs, you can then export the hex file which will then contain the program and your configs. All should the work.

 

 

MC004ee.hex 17.78 kB · 0 downloads

I'll give that a go.  In the PicFlash I originally tried changing the calibration and code / write protect to off and none - but hadn't edited the HEX file....  I also tried changing bit 6 in the PicKit2 settings to disable code protect of programming memory and that didn't work.... I'll give your suggestion a go and report back....

Link to post
Share on other sites

 

 

You will first get a screen like this:

PicKitLoad1.PNG.525c1717e7116df29c6383690c9204b2.PNG

 

But once you set the configuration bits, and export it (File>Export Hex), and reload it, you should get:

PicKitLoad2.PNG.547a65b8464f20dab9fc97e2f3f89584.PNG

 

After that,  you should be able, to program,verify, read etc.

Link to post
Share on other sites

Archie, I still get errors when programming the PIC using the MC004ee.hex file (53 program errors - 0 ID).  I also notice that having removed all the config settings that the Oscillator settings changed as well.  Setting this back to HS made no difference - the code still failed to program.   However, when the same code was loaded into PicKit2, and whilst it too complained about having no config bits set... it did program, and verify and can be read back...... but with no config setting being programmed then is there a chance that the code won't function correctly as the wrong Osc settings have been set ?

Link to post
Share on other sites

Are you saying that the ICSD is getting the 53 programming errors? I am not sure what that means. I have a PICKIT2 with a 28 pin demo board loaded with a 28 pin plastic 16F886 and it programs correctly. What device is reporting the programming errors? The PICKIT2?

Edited by ozarchie
Link to post
Share on other sites

Yeahhhh.... success !!!!!!!!!!

Well as far as I can tell.... having exported the files as instructed and then loaded that back into both PICFLASH and PICKIT2 the code loads, verifies, and can be read back......  I did have to set the OSC to HS (the motor board has a 20mhz xtal on it) but now have two programed PICs 

Archie, thank you for teaching me these techniques... even at 58 I'm loving the learning curve :)

Link to post
Share on other sites
3 minutes ago, ozarchie said:

Are you saying that the ICSD is getting the 53 programming errors? I am not sure what that means. I have a PICKIT2 with a28 pin demo board loaded with a 28 pin plastic 16F886 and it programs correctly.

Those errors are reported using the mikroelctronika PicFlash program.... I'm guessing that it was due to the code protection bits....

Anyway I now have been able to program the PICs without errors after following your instructions.  I missed the part about loading the converted hex code which had the config bits removed and then exporting it with the PIC selected to generate the config settings, and the re-importing it again....

Link to post
Share on other sites

I just want to comment on this thread for anyone else following along....

This thread is NOT about trying to circumvent the copy protection in the Skywatcher Firmware.  I've posted all my trials and tribulations in trying to get a PIC reprogrammed so you can see just how complicated these things are, and the  effort we are putting into getting this board fixed.  The intent is to provide a documented thread for others to follow should they find themselves in a similar situation to the OP where their board has been fried and there is no clarity from the agent, UK distributor and even Synta themselves as to compatibility between new and old boards, or if a replacement for the original boards are available.  This leaves the OP with the choice of a £200 bill for replacing the existing boards, one of which is perfectly serviceable, or giving up on the goto function, which was the main reason the scope was bought for.  The last option is to try and repair the faulty board... which without the help of synta or the UK distributor means we have to resort to reverse engineering.....

My thanks to Archie for his assistance in resolving the PIC code issue.... now to get the board back from the OP and reprogram it for him..... 

Link to post
Share on other sites

Well this is interesting.....

With the PIC in the EasyPIC5 dev board programmed, I connected up a FTDI USB - 5v logic serial adaptor to the PIC serial port and loaded up the SW Firmware loader application

The result is quite pleasing :) :) 

mcver.png

  • Like 1
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.