Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Question about Inchworm+

Status
Not open for further replies.
I did have that!

I fixed the code and it WORKS!

I just gotta create a shorter directory and IT IS ALIVE!!!
 
No, I keep getting the error that it doesnt have a valid target Device.

Sorry about blowing up, it appeared that the problem was human error :eek:
 
Here is my code:
Code:
;*** WDT reset toggles RB0
  list p=16F628A
  include <p16F628A.inc>
  __CONFIG 0x3F34
	org			0
	bsf			STATUS, RP0
	movlw		b'00001110'
	movwf		OPTION_REG
	movlw		b'11111110'
	movwf		TRISB
	bcf			STATUS, RP0
	xorwf		PORTB, f
	sleep
	end

And the MPLAB history of what I have done :)

Code:
Connecting to MPLAB ICD 2
ICD0019: Communications:  Failed to open port: (Windows::GetLastError() = 0x2, 'The system cannot find the file specified.
')
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready
ICDWarn0034: Please ensure that your system's serial FIFO buffers are disabled.
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
ICDWarn0020: Invalid target device id (expected=0x83, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
ICDWarn0020: Invalid target device id (expected=0x83, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready
Programming Target...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Validating configuration fields
...Erasing Part
...Programming Program Memory (0x0 - 0x7)
Verifying...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0x1683, Val Read = 0x0)
ICD0275:  Programming failed.
MPLAB ICD 2 Ready
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
ICDWarn0020: Invalid target device id (expected=0x83, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready
Programming Target...
ICDWarn0054:  MPLAB IDE has lost communications with the MPLAB ICD 2.  Would you like to attempt to reconnect?
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
ICDWarn0020: Invalid target device id (expected=0x83, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
...Passed
ICD0082: Failed MPLAB ICD 2 operation
ICD0275:  Programming failed.
MPLAB ICD 2 Ready
Programming Target...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Validating configuration fields
...Erasing Part
...Programming Program Memory (0x0 - 0x7)
Verifying...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0x1683, Val Read = 0x0)
ICD0275:  Programming failed.
MPLAB ICD 2 Ready
Reading...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
ICDWarn0038:  When using auto-calculate write range, reads cover the entire memory range. Do you wish to continue?
...EEPROM
...Program Memory (0x0 - 0x7FF)
.. Config Memory
...User ID Memory
...Read Succeeded
MPLAB ICD 2 Ready
Programming Target...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Validating configuration fields
...Erasing Part
...Programming EEPROM Memory
...Programming Program Memory (0x0 - 0x7FF)
...Programming User IDs
Verifying...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Program Memory
...EEPROM
...User ID Memory
...Verify Succeeded
Programming Configuration Bits
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
.. Config Memory
Verifying configuration memory...
...Verify Succeeded
...Programming succeeded
04-Oct-2007, 17:18:01

MPLAB ICD 2 Ready
Programming Target...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Validating configuration fields
...Erasing Part
...Programming EEPROM Memory
...Programming Program Memory (0x0 - 0x7FF)
...Programming User IDs
Verifying...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Program Memory
...EEPROM
...User ID Memory
...Verify Succeeded
Programming Configuration Bits
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
.. Config Memory
Verifying configuration memory...
...Verify Succeeded
...Programming succeeded
04-Oct-2007, 17:25:49

MPLAB ICD 2 Ready
Reading...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
ICDWarn0038:  When using auto-calculate write range, reads cover the entire memory range. Do you wish to continue?
...EEPROM
...Program Memory (0x0 - 0x7FF)
.. Config Memory
...User ID Memory
...Read Succeeded
MPLAB ICD 2 Ready
Reading...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...EEPROM
...Read Succeeded
MPLAB ICD 2 Ready
Blank Checking...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0x3FFF, Val Read = 0x0)
...Device not blank
MPLAB ICD 2 Ready
Erasing Target Device...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Erase Succeeded
MPLAB ICD 2 Ready
Verifying...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0x1683, Val Read = 0x0)
MPLAB ICD 2 Ready
Programming Target...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Validating configuration fields
...Erasing Part
...Programming EEPROM Memory
...Programming Program Memory (0x0 - 0x7)
...Programming User IDs
Verifying...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0x1683, Val Read = 0x0)
ICD0275:  Programming failed.
MPLAB ICD 2 Ready
Programming Target...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Validating configuration fields
...Erasing Part
...Programming EEPROM Memory
...Programming Program Memory (0x0 - 0x7)
...Programming User IDs
Verifying...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0x1683, Val Read = 0x0)
ICD0275:  Programming failed.
MPLAB ICD 2 Ready
Programming Target...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Validating configuration fields
...Erasing Part
...Programming EEPROM Memory
...Programming Program Memory (0x0 - 0x7)
...Programming User IDs
Verifying...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Program Memory
ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0x1683, Val Read = 0x0)
ICD0275:  Programming failed.
MPLAB ICD 2 Ready
Programming Target...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
...Validating configuration fields
...Erasing Part
...Programming EEPROM Memory
...Programming Program Memory (0x0 - 0x7)
...Programming User IDs
Verifying...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
ICD0200: Operation Aborted (Warning 51).
ICD0275:  Programming failed.
MPLAB ICD 2 Ready
Programming Target...
ICDWarn0052: MPLAB ICD 2 cannot validate a target device. Please make sure that the target device is connected and properly powered. Select "OK" to continue, or "CANCEL" to abort the operation
ICD0200: Operation Aborted (Warning 51).

Hoped that helps
 
ICDWarn0020: Invalid target device id (expected=0x83, read=0x0)
This msg is telling you that the ICD2 is not able to read the target chips device ID. It is a show stopper.

You will not be able to program the chip till you get that fixed.

The problem is either the way you have the ICD2 hooked to the target or
the Inchworm itself. Most often it is the first. What are you doing for a
programming cable since you had a broken connector in your kit?

We need to see your schematic.
If you are using the schematic from Bill's poster you should tripple
check each and every connection. Use a Ohm meter,

Till you get a device ID other then zero the code does not matter.

EDIT:

Sorry about blowing up, it appeared that the problem was human error :eek:

Perhaps an actual apology to the people you barked at would be in order?
 
Last edited:
I still cant get it working, I think the problem is the Connector which I still cant contact dipmicro about. I will just buy new ones at jameco.
 
I found teh error! It is the crappy connector! It isnt biting into the wire, even after I put it into a vice grip and bench press. Does anybody want to sell/give me a working Cable? I will pay for shipping etc.

Now for the formal appology:

Dear Electro-tech-online forum members:

I hearby appologize for my intense, rude, unethical and completely immature behavior. I hope that one day we can put all this aside and forget about the mistakes and things better left not said. I hope that this also rekindles friendships and to people who I have offended, that we may become friends, and hopefully get along very well. I do not mean anything on this forum, only because you are the true friends I have. At school, nobody even knows what a resistor is. The members on here (most) understand the things that makes my world go around. I can get frustrated very easily, not with my friends on here, only because of school, and the people in my environment. At my age, I am learning things that I would otherwise never have even understood the simple equation of ohm's law, or what a resistor is. I just hope that you can understand my position and forgive me for my evils and troubles that I have caused to many.

Thank you.
 
Thank you accepted, glad you're getting the hang of programming microcontrollers. You will someday be the master of 10,000 transistors (Just a guess how many inside a small PIC...)

Sometimes all the cable needs is a little squeeze. It's a crimp cable and each wire is doubled so a single poor crimp should not hurt. (use both pairs when building your target PCB)

I offered you an Inchworm PCB but you probably don't need one. Can I offer you another PCB? I can put a couple of 10pin ICD connectors in the bag...
 
Last edited:
Sure bill!

My teacher at school is trying to set up a C++ class (he programmed Car chips for a while) for our HS, and I was helping him. He also knows C, so I think He would Like that as a gift. His wife also works at the HS, and I would stay after school for hours talking to her. She has a box (about that big :)) of GALs. It is rediclous. Every month she orders hundreds of them, and puts the old ones in a box or gives them to students. I also showed her my binary clock (she teaches digital logic for 7 years now) and she could not wrap her head around it. If I gave him this PCB and gave him a list of stuff to get for it, he would definately love to have the PCB board and I could have the Female Sockets. The problem with the one that I got was that it had shattered into 6 peices. The arms broke off the part with the metal tabs, so it would just fall apart :(.

When I get it, I will make sure to cut the wire a bit to give it a hole to put it in, and cut the wire inbetween so it can get it easier. If you want me to pay for shipping, I can.

Thanks so much!
 

Attachments

  • images.jpeg
    images.jpeg
    2.3 KB · Views: 163
You need to take Bill up on his offer of a board and build it up for yourself. If you do not the petty god of pic programming will see that you do not have a spare. Then he/she/it will introduce a flaw/bug some place and you will not know if the problem is in you target or your Inchworm. If you build the 2nd inchworm you can just swap one for the other and determine if it is the inchworm or the target.

If you ever work on a multi pic or pic to pic communication a 2nd inchworm can come in very handy.

EDIT:::

Does it blink??

Challange: Modify the code to blink two. But have one off when the other is on. Give it a try and post the code when you get stumped.
 
Last edited:
That sound's like a good idea actually. I have the Resistors DIP sockets, but not the caps, ST232 16F877 (I have the A version, but I dont know how to program it :() or the other misc sockets. I am restocking my stuff soon here.
 
Krumlink said:
That sound's like a good idea actually. I have the Resistors DIP sockets, but not the caps, ST232 16F877 (I have the A version, but I dont know how to program it :() or the other misc sockets. I am restocking my stuff soon here.
This a good chance to get you feet wet with the inchworm.

When you have the 16F877A hooked up correctly to the Inchworm.

You download the right HEX file for the 16F877A from Bill's site. Unzip if ziped. Start MPLAB, import the HEX file, set the DEVICE type. Can not recall if you need to set config bits in the interface or if they are in the hex file.

Hit program. Done. You now have a inchworm PIC.

Also I have a simple layout for target board with sockets for 3 or 4 different pin count pics including the 18 28 and 40. Think the other is 8 pin but do not know if I put a 20 pin socket on it.

I know you are working on etching boards. This is an easy board in that there are just the sockets, caps and optional resonators. If you are interested I will post the Eagel files of if you want an image you can print.
 
You can post the image or whatever you want to do. I am going to try and program a 16F later today.

I smashed down on the header and I got it to all clip on to the wire, but I broke off an arm to the strain relief :eek: I am going to epoxy it today and make sure that badboy wont come apart again!

I had ordered a additional socket (for the other end of the ribbon cable) and that one broke (from my kit) that has already been discused.

Can I use a 16F887?
 
Put some masking tape over the holes that the pins go in when you epoxy the cable.

Not sure what you mean by
Can I use a 16F887?
You can not program it with the code from Bill's poster. The 16F877 is close but you still need to figure out a new CONFIG value and change the include statement.

Is it correct that you would like to try etching the board from the last post?
Is it correct that you have not used Eagle?
 
Bill sent me some headers and connectors with the junebug pcb, so when I get them I will start again.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top