E-Blocks PICmicro USB multiprogrammer V7

For users of Matrix Multimedia Electronics software to discuss projects, circuits and any other electronics concepts.

Moderators: Benj, Mods

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by Benj »

Clicking the restore defaults button also seems to load in a more suitable value for the ICD rate based on your current clock speed setting.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by medelec35 »

Tried various different speeds, and still the same. Two questions.
1) do have to reprogram after changing settings. I did to be on the safe side.
2) What about Debug in config. does that have to be enabled?
16f737 does not have debug.
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by Benj »

Hello

Thats really strange, I even tested the ICD functionality when you returned the board to me. Have you disabled the USB power management setting in device manager just incase it is something to do with this?

1) Yes after changing settings in the Project options window or editing your flowchart you will have to recompile and program.

2) Debug in configuration settings is referring to Microchips debbuging tools. You do not need to enable this and should leave it disabled unless using the Microchip tools.

I cant understand why the chips are being detected and programmed but no ICD. When the message box appears saying the program is not correct please recompile is there a button allowing you to view the expected and received ID array? If so is there ever any data in the incoming array. If you do not have this then it might be worth you uninstalling and reinstalling using the V4.1 full installer. Could be that you have an older version of the EXE or something that is causing this to fail. Just guessing now though :)

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by medelec35 »

I Have set Speed to 39, get a warning message about speed may be too low for operation. (even with speed higher so speed warning does not appear- still don't work :cry:
Programed chip:
Prog1.jpg
(87.11 KiB) Downloaded 4843 times
Put jumper on to ICD, pressed Run and got this:
ICD problem.jpg
ICD problem.jpg (92.61 KiB) Viewed 13698 times
There is recompile button to press. Just telling me hex file is out of date.
Yes, disabled the USB power management setting in device manager.
Flowcode V4.1 is latest available form Matrix multimedia.
Definitely communicating, with PC in ICD mode, since if pull USB out, there is communicating error message appears.
Jumper or pins still doggy, related to that?
Last edited by medelec35 on Wed Aug 26, 2009 11:30 am, edited 1 time in total.
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by Benj »

Hello Medelec

No I dont think this is the jumper at fault this time as the chip is being programmed successfully which proves that the signals are getting through to the target micro.

The ICD screen should look like this.
SS1.JPG
SS1.JPG (13.97 KiB) Viewed 13684 times
SS2.JPG
SS2.JPG (15.96 KiB) Viewed 13683 times
I have just uninstalled V4 and the V4.1 update and installed from fresh using the full v4.1 download to make sure this is working correctly. It looks like you are somehow using an older version of the executable.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by medelec35 »

Thanks Ben You are right about exe. I thought I was running latest version. I was actually running 4.1.0.54. Must of loaded changed back to test something, and did not get round to reinstalling latest version.
However, that has not solved issue. Now I get:
ICD Error Message.jpg
ICD Error Message.jpg (17.93 KiB) Viewed 13703 times
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by Benj »

Hello

OK so the data comoing back is valid but not correct. If you recompile and then try running the ICD again does the data change? Is it still incorrect?

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by medelec35 »

Tried that, still no joy.
Was thinking exe should not have been an issue, since ICD was developed and available on V4 prior to latest edition. All this exe has done was give addition information.. Although that's a good thing.

Again altered speeds... different error codes from screen shot.
ICD Error Message2.jpg
ICD Error Message2.jpg (19.16 KiB) Viewed 13660 times
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by Benj »

Hello

Ok I have tried using the ICD here at 4MHz. The ICD speed is set to 42. I am using a crystal so the clock is accurate. If you are using the internal oscillator then it might be worth upping this value a bit to ensure it is ok. Also would you mind sending me your program and I will give it a go here and see if it is behaiving correctly.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by medelec35 »

do you think +/- 1 to 2% is not accurate enough?
I could use programmer on-board crystal instead of int osc to see if makes a difference.
Will set it up when i get back.
Here is flowchart I am using.
Thought It could be very basic to test ICD function.

Hopefully I have done something stupid, and u will easily spot it :lol:
Attachments
ICD TEST2.fcf
(4.5 KiB) Downloaded 324 times
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by Benj »

Hello

I didnt have a 16F737 to hand but I did have a 16F767 so I tried your program using the same configuration settings that you were using.
No joy was able to replicate the problems you are having.

Then I went back to the configuration settings and enabled the external MCLR.
Still no joy.

So then I disabled the ICD mode and made sure the program was running as expected without the ICD operation.
This indeed worked correctly.

I then swapped the internal oscillator setting for the XT setting for a 4MHz crystal (HS for over 4MHz).
Joy at last, the ICD is working perfectly I cannot make it fail.

Going back to the internal oscillator again made the ICD fail.

I then disabled the power up timer to make sure it was not this effecting the ICD.
Again no joy.

I then switched to a 16F88 and used the internal oscillator here.
Again the ICD was not working.

So it seems for some reason there is a problem with using the ICD and internal oscillators. I will dig in a bit further and see if I can find out why this is happening. Every time the ICD failed I received the same ID numbers so hopefully this will help me to troubleshoot where this is going wrong.

Please can you perform the above list of tasks and make sure the ICD starts working on your device when using the external crystal clock source.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by Benj »

Hello Medelec

Success I know why!!!!

Ok when the ICD is enabled the program will run until it gets to the first icon in your flowchart. It will then wait there until told to proceed.

Flowcode is expecting the clock speed to be 4MHz however when the chip first starts using the internal oscillator the clock speed is set to 31.25KHz.

It is only when the first flowchart block is called that the clock speed is switched to the 4MHz setting.

So to work around this problem is fairly simple. You can do this using a custom component or any other component you happen to have in your program. Select the component and click the custom code button. In the custom code window select the Initialization macro and click edit. In here add your line of C code to configure the internal oscillator. Now click OK to exit the custom code windows and delete the icon containing the oscillator frequency change.

Note: You do actually have to call the component somewhere in your program to allow the initialization code to be included into the C code. This is why I use the LED component at the start of the attached program.

Your program should now work as expected with the ICD :mrgreen: This has been confirmed on my 16F767 device.
Attachments
ICD TEST 3.fcf
(4.5 KiB) Downloaded 337 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by medelec35 »

Thanks Ben. Unfortunately made no difference :cry:
ICD Error Message3.jpg
ICD Error Message3.jpg (124.93 KiB) Viewed 13667 times
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by Benj »

Hello

Hm... Lets see.

A few thoughts come to mind.

You could try upping the communication speed to 50 to ensure the clock speed is not somehow out of tolerance.

You could also try resending the program. If the Flowcode program changes in anyway eg you get a star on the title bar indicating a save required then you must recompile and program before the ICD will operate again.

Also you could check the compiled C code to see if the number coming back from the ICD is correct, this will show if it is the flowcode window instance that is changing or the ICD comms not working correctly.

Failing this what OS are you running and are you using any USB hubs or non standard hardware eg Laptops, notebooks etc.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by medelec35 »

System:
OS Name MicrosoftΒ® Windows Vistaβ„Ά Home Premium
Version 6.0.6001 Service Pack 1 Build 6001
Other OS Description Not Available
OS Manufacturer Microsoft Corporation
System Manufacturer HP-Pavilion
System Model GQ504AA-ABU a6220.uk
System Type X86-based PC
Processor Intel(R) Core(TM)2 Duo CPU E4400 @ 2.00GHz, 2000 Mhz, 2 Core(s), 2 Logical Processor(s)
BIOS Version/Date Phoenix Technologies, LTD 5.21, 27/07/2007
SMBIOS Version 2.4
Windows Directory C:\Windows
System Directory C:\Windows\system32
Boot Device \Device\HarddiskVolume1
Locale United Kingdom
Hardware Abstraction Layer Version = "6.0.6001.18000"
User Name Martin-PC\Martin
Time Zone GMT Daylight Time
Installed Physical Memory (RAM) 2.00 GB
Total Physical Memory 2.00 GB
Available Physical Memory 1.05 GB
Total Virtual Memory 5.06 GB
Available Virtual Memory 2.71 GB
Page File Space 3.12 GB

Still don't work with speed set at 50.
Programmer has always been plugged directly in to Tower PC. Not a laptop or hub. guess your thinking less than 5V.

Perhaps these files with give you a clue?
Attachments
ICD TEST 3.casm
(60.18 KiB) Downloaded 313 times
ICD TEST 3.c
(3.29 KiB) Downloaded 281 times
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by Benj »

Hello Medelec

Do you have the external MCLR enabled or disabled? It might be worth trying it enabled as the USB pic uses this to reset the micro before ICD operation starts.

Your C code all looks correct to me.

You can confirm what the ICD ID should be by looking at the compiled C code when you program your device.

#define ICD_ID0 0x90
#define ICD_ID1 0x0d
#define ICD_ID2 0x22
#define ICD_ID3 0xc0
#define ICD_ID4 0xe6
#define ICD_ID5 0x91
#define ICD_ID6 0x5a
#define ICD_ID7 0xe2

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by medelec35 »

The 1st line from Error message also shows what code should be, Is that info pulled form defines or is that permanently shown because that's how sw was developed? 2nd line is always different when it should be the same. I have used a 100k R to pull mclr up, and enabled mclr as external. Still the same.

Do you have any test software, that could of been used when ICD was first developed to determine problem?
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by Benj »

Hello Medelec

When you say you used a resistor for the MCLR. does this mean you are programming chips off the main multiprogrammer board? Eg using your own hardware. If so then what are the lengths of the cables you are using? You should not have to provide any extra component for the MCLR running on the multiprogrammer board.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by medelec35 »

did not have meter to hand, so assumed resistor is required. Found meter, and resistor is not required, so removed resistor. Makes no difference though.
Programmer EB006 V7 is still used for programming, and using original lead that arrived with programmer.
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by Benj »

Have you tried using a external crystal oscillator to see if this solves the problem. This might confirm if it is the internal oscillator still at fault.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by medelec35 »

Thanks Ben, I will try that. I have installed latest flowcode on laptop with XP operating system, and will try ICD on that. This is a wild guess, but PC I'm using ICD on, is same PC which did not compile very 1st V4
See:
http://www.matrixmultimedia.com/mmforum ... =29&t=6481
Could that have something to do with it?

Will let you know about running ICD on laptop and also using external crystal.

Very odd about crystal since you stated it worked with internal crystal on 16F767. Also Since scoped was measuring exactly 2.000 seconds intervals, internal osc must be OK.
Martin

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by medelec35 »

Tired both PCs and still the same. Tried external osc set on xt, still the same.
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by Benj »

Hello Medelec

So your laptop is also not working for the ICD and external crystals are also not working. Hm thats very strange. Nothing in your computers description caught my eye either.

Hopefully something will come to mind soon but im drawing a blank at the moment.

If you are using the external crystal then have you removed the osccon line from your LED initialize routine?

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by medelec35 »

Some Success!!!
Working OK off 19.66MHz crystal. Not ideal , since in the real world I'm working with int 4 MHz.
Odd thing is 2 sec delay did not work when not in ICD mode, but 1 ms did work , so was not config problem. Still getting there.
Will let you know.

YAY got it working at 4MHz for a short time at a speed of 44. Default 41 seems a bit too low or there is an intermittent fault. Strange thing I change speed to say 80 reprog, then back to 44 and again reprogram no longer works!
All I did was to change jumper to reprog. not change software at all. Very odd! is speed that ultra critical? tried loads of times to get it working. feel like giving up. lost confidence in ICD well this board anyway. I have noticed if ICD jumper is removed, get exact same hex numbers returned, as though jumper is connected. That makes troubleshooting more awkward!
Can this board be swapped for another one please. spent too long going around in circles. unless you have the ultimate solution?
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: E-Blocks PICmicro USB multiprogrammer V7

Post by Benj »

Hello Medelec

I noticed this line in your message.
All I did was to change jumper to reprog.
Which jumper are you changing? You should be able to reprogram and use the ICD without changing any jumpers.

If your not moving a jumper then yes send the board back to me and I will perform a series of tests on the ICD and send out a replacement for you.

Post Reply