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.

Need help badly on Inchworm and MPLAB

Status
Not open for further replies.

thushy

New Member
Hi all

I recently bought an assembled Inchworm programmer. I connected it to my computer via COM1 port and tried to connect to MPLAB 7.5.
Here's what I did after connecting the programmer physically

In Windows Device manager
1) Set it to COM1
2) Changed Byte per second to 19200
3) Row control=Hardware
4) Turned off FIFO buffer

In MPLAB
1) Programmer -> Select programmer -> MPLAB 1cd2
2) Programmer -> MPLAB ICD2 Setup Wizard
In the wizard:
i) Set it to COM1 and Baud rate to 19200
ii) Select "Target has own power supply"
iii) Check "MPLAB IDE automatically connects to the MPLAB ICD 2"
iv) Check "MPLAB ICD 2 automatically downloads the required OS"
When the wizard is finished this warning is displayed:
"ICDWarn0034: Please ensure that your system's serial FIFO buffers are disabled."

3) Programmer -> Connect
Output: Displayed the following warning:
"Connecting to MPLAB ICD 2
ICD0021: Unable to connect with MPLAB ICD 2
MPLAB ICD 2 Ready"

4) Programmer -> Download ICD 2 OS -> Select (ICD01020701.hex)
Output:
"Downloading Operating System
ICD0021: Unable to connect with MPLAB ICD 2
...Download Operating System Failed
ICD0286: Unable to communicate with ICD
ICD0286: Unable to communicate with ICD
ICD0286: Unable to communicate with ICD
ICD0286: Unable to communicate with ICD
ICD0286: Unable to communicate with ICD
MPLAB ICD 2 Ready
"

I am sure that there is nothing wrong with both programmer and serial cable connection.

Because..

I) I hocked up my oscilloscope to the COM1 pins and used some other program to see the program's out put on the oscilloscope properly.

II) The programmer was checked by some other guy and he told me it was working fine.

III) Oscilloscope didn't show any signal when MPLAB trying to connect.

I need help badly. I am pretty sure someone here can definitely help me.
 
There have been two other threads in the past week where we covered about everything that could go or be done wrong with and inchworm. Search the forum.

Did you reboot the PC after turning off the FIFO ?

The only thing you know at this point is the MPLAB is not talking to the Inchworm.

You have not given enough details to convince me there is no problem with the cable. Where did you check ?

If everything you said was true it would be working.

Do debugger>settings>communication> and ensure that RS232 and 19200 are selected.
 
1) Did you reboot the PC after turning off the FIFO ?
Yes, I rebooted it several times

2) You have not given enough details to convince me there is no problem with the cable. Where did you check ?
I used a program called "Advanced Serial Port Monitor" to send data to COM1 and physically connected one end of the cable to COM1 and the other end to an oscilloscope. When I send any data through the software, I can see the signal on the oscilloscope.

When I used MPLAB to send data, I didn't see any signals on the oscilloscope.

Sorry for the lack of details in the previous post.
 
i'm sure you know this but , every time you open MPLAB you need to redo the setup wizard or use settings in the programer tab
 
Unless you have a storage scope do not expect to see anything from MPLAB with it unless you have Inchworm connected and powered.

Do a loopback test.
If you are up to pulling and replacing chips on the inchworm try removing the PIC then jumper between the TX and RX pins on the pic socket. Now when you enter data using Hyperterm or "Serial Port Monitor" you should see the characters echoed back. When you remove the jumper they should stop echoing. If this works you cable and MAX232 are good.

How much do you trust the guy who sold it to you. Was it off Ebay ?
Have you asked him for help ? I am trying to figure out if we can trust that he had it working or if he unloaded because it did not work.
 
I tried the method you said. It never echoed back.

And I also captured the following data through "Advanced Serial Monitor" when MPLAB tried to connect to the programmer

COM port is opened
COM port is closed
COM port is opened
COM port is closed
COM port is opened
COM port is closed
COM port is opened
Set timeouts: ReadInterval=0, ReadTotalTimeoutMultiplier=0, ReadTotalTimeoutConstant=500, WriteTotalTimeoutMultiplier=0, WriteTotalTimeoutConstant=500
Baud rate 19200
DTR on
Data bits=8, Stop bits=1, Parity=None
Set chars: Eof=0x00, Error=0x00, Break=0x00, Event=0x00, Xon=0x11, Xoff=0x13
Handflow: ControlHandShake=(DTR_CONTROL, CTS_HANDSHAKE), FlowReplace=(TRANSMIT_TOGGLE, RTS_HANDSHAKE), XonLimit=1000, XoffLimit=1000
DTR off
DTR on
Set timeouts: ReadInterval=0, ReadTotalTimeoutMultiplier=0, ReadTotalTimeoutConstant=500, WriteTotalTimeoutMultiplier=0, WriteTotalTimeoutConstant=2000
Baud rate 19200
DTR on
Data bits=8, Stop bits=1, Parity=None
Set chars: Eof=0x00, Error=0x00, Break=0x00, Event=0x00, Xon=0x11, Xoff=0x13
Handflow: ControlHandShake=(DTR_CONTROL, CTS_HANDSHAKE), FlowReplace=(TRANSMIT_TOGGLE, RTS_HANDSHAKE), XonLimit=1000, XoffLimit=1000
DTR off
DTR on
Purge the serial port: RXCLEAR, TXCLEAR
Set timeouts: ReadInterval=0, ReadTotalTimeoutMultiplier=0, ReadTotalTimeoutConstant=500, WriteTotalTimeoutMultiplier=0, WriteTotalTimeoutConstant=17
Baud rate 19200
DTR on
Data bits=8, Stop bits=1, Parity=None
Set chars: Eof=0x00, Error=0x00, Break=0x00, Event=0x00, Xon=0x11, Xoff=0x13
Handflow: ControlHandShake=(DTR_CONTROL, CTS_HANDSHAKE), FlowReplace=(TRANSMIT_TOGGLE, RTS_HANDSHAKE), XonLimit=1000, XoffLimit=1000
COM port is closed
COM port is opened
Set timeouts: ReadInterval=0, ReadTotalTimeoutMultiplier=0, ReadTotalTimeoutConstant=500, WriteTotalTimeoutMultiplier=0, WriteTotalTimeoutConstant=500
Baud rate 19200
DTR on
Data bits=8, Stop bits=1, Parity=None
Set chars: Eof=0x00, Error=0x00, Break=0x00, Event=0x00, Xon=0x11, Xoff=0x13
Handflow: ControlHandShake=(DTR_CONTROL, CTS_HANDSHAKE), FlowReplace=(TRANSMIT_TOGGLE, RTS_HANDSHAKE), XonLimit=1000, XoffLimit=1000
DTR off
DTR on
Set timeouts: ReadInterval=0, ReadTotalTimeoutMultiplier=0, ReadTotalTimeoutConstant=500, WriteTotalTimeoutMultiplier=0, WriteTotalTimeoutConstant=2000
Baud rate 19200
DTR on
Data bits=8, Stop bits=1, Parity=None
Set chars: Eof=0x00, Error=0x00, Break=0x00, Event=0x00, Xon=0x11, Xoff=0x13
Handflow: ControlHandShake=(DTR_CONTROL, CTS_HANDSHAKE), FlowReplace=(TRANSMIT_TOGGLE, RTS_HANDSHAKE), XonLimit=1000, XoffLimit=1000
DTR off
DTR on
Purge the serial port: RXCLEAR, TXCLEAR
Set timeouts: ReadInterval=0, ReadTotalTimeoutMultiplier=0, ReadTotalTimeoutConstant=500, WriteTotalTimeoutMultiplier=0, WriteTotalTimeoutConstant=17
Baud rate 19200
DTR on
Data bits=8, Stop bits=1, Parity=None
Set chars: Eof=0x00, Error=0x00, Break=0x00, Event=0x00, Xon=0x11, Xoff=0x13
Handflow: ControlHandShake=(DTR_CONTROL, CTS_HANDSHAKE), FlowReplace=(TRANSMIT_TOGGLE, RTS_HANDSHAKE), XonLimit=1000, XoffLimit=1000
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
Purge the serial port: RXCLEAR, TXCLEAR
 
I think u should not use "Advanced Serial Monitor" and MPLAB at same time on one serial port....
 
As u said before... ur flow control
3) Flow control=Hardware

I am also using Inchworm and my Flowcontrol setting is
Flow control=None
 
I tried the method you said. It never echoed back.

This is not some obscure test that can give a false indication.
You must get the loopback test working.
Till it does MPLAB can not talk to the Inchworm.

Do you have the right serial cable. Pin2 to Pin2 and Pin3 to Pin3. If your cable is not wired this way it will not work. To work the cable must have wires 2,3,4,7, and 8.

I agree with Ayne in that the monitor program may be causing problems. You do not need it to get the Inchworm working. We know the Inchworm code works you do not have to debug it.

I suggest you use hyperterm to run the loopback test because we know what it is, does and that it will work.

Hint: You may be able to plug the Inchworm directly into the com port on your computer.
Doing so eliminates any problem that a bad/wrong cable may be causing.
 
Last edited:
I just make a simple program LEDs Blinking with different pattern

Now I am making Modules for my Projects,
Making IR Transmitter and receiver Board,

If u have good link on Capture, Compare and PWM... I want to understand them, what they do, why we use them ???
 
In class I am using the tutorial
by Peter Anderson. It is not free (he has published the first 20 pages at the above link) and I do not know that you can find his header file.

The good news is that the header file def_877.h Is explained in the tutorial and you should be able write the bits of it as needed.

The tutorial uses the CCS C compiler. They have a code sized limited (2K) version that you can download for free. You can do quite a bit in 2K. After you install the CCS compiler download and run the file from the CCS download page that sets it up to work with MPLAB.

Even if you do not choose to run these you can learn a lot by reading the code.

If you choose to try I would be glad to help but can not give you the header file for the obvious reason.
 
Status
Not open for further replies.

Latest threads

Back
Top