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.

PIC programming over 10ft

Status
Not open for further replies.

kybert

New Member
Hi,

I have a serial pic programmer. It uses data and clock lines to program the device @ 5V.

I need to connect my programmer at a distance of 3 metres ( 10 ft ) from the device to be programmed.

I am expecting loads of noise etc at that distance so i want to buffer the lines using rs232 buffers. This will fix the noise issue.

Problem is, rs232 convertors pass data in one direction only. How can i buffer the data line? It is used for both reading data from the PIC and writing data to the PIC and i dont have any indication which way the data is travelling during programming.
 
Move the programmer close to the target, and have a long RS232 lead from the computer - noise isn't the problem, capacitance is, and assuming it's a JDM type 'serial' programmer they are pretty marginal anyway.
 
its not a jdm programmer. Its a off the shelf programmer i bought a few years ago.

What do you think is the max distance over which a device could be programmed?
 
Hi Nigel.

The programmer is using another pic, 16F628, and the data & clock lines are driven directly from the PIC, with no further interfacing.


Im aiming for about 6-9 feet, not 6 inches! If its not possible, im going to have to start looking at RS232 boot loaders etc... but would rather avoid those if possible becuase my pc doesnt have a rs232 port, and they are error prome.


J
 
There is a balanced version of RS232, I think it is RS485 from memory.

This should work over a much longer distance just as ADSL works over phone lines.

But I don't know what you would have to do at the computer end.
 
Nigel Goodwin said:
Move the programmer close to the target, and have a long RS232 lead from the computer - noise isn't the problem, capacitance is, and assuming it's a JDM type 'serial' programmer they are pretty marginal anyway.

Even if it is not a JDM Nigel still has a good solution. If RS232 does not work because of noise then use RS422. It is a point to point setup like RS232, but uses the same differental drivers as RS485 to overcome the noise.

You want to keep the programmer to target distance as short as possible esp in a noisy env.

3v0
 
Easy to get crosstalk too. dsPIC has had notable problems with crosstalk on the programming wires over even modest distances.
 
kybert said:
Hi Nigel.

The programmer is using another pic, 16F628, and the data & clock lines are driven directly from the PIC, with no further interfacing.


As it's a real serial programmer, then you've more chance, as the wires are actively driven byt he 16F628.

Im aiming for about 6-9 feet, not 6 inches! If its not possible, im going to have to start looking at RS232 boot loaders etc... but would rather avoid those if possible becuase my pc doesnt have a rs232 port, and they are error prome.

Like I said before - move the programmer nearer, and have the long lead on the RS232.

Wait a minute?, you say your PC doesn't have a serial port! - how is the programmer connected?.
 
The programmer is connected via USB to the PC.

The PIC is in an enclosed space. I will have a 9ft cable connected to the programming port of the pic.

This cable then needs to connect to the programmer.



I think it would be simplier if i build a small cheep programmer into the main board, and have an usb to serial lead from my PC to the 9ft wire.
 
Like this:

PIC main board
|
programmer
|
9ft RS232 cable
|
|
|
|
|
|
|
USB to RS232 converter (off the shelf product)
|
laptop USB port
 
Yes, like that! - but be aware that you really need a 'proper' serial port programmer (like you already have), the cheap ones just wiggle the handshake lines.

BTW, have you actually tried it, and seen if it works or not? - as I said, there is at least a chance with your type of programmer.
 
The maximum length of a single USB cable as defined by the USB 2.0 specification is 5 meters. I would also expect that you could use a 10ft serial cable without significant issues as well - I always used to use a 6ft serial extension to connect my programmer to the back of the computer and never had tremendous issues - and I was even using a finicky JDM programmer.

It seems to me that there is no real problem here. Keep the lines between the programmer and the PIC short (6 inches) and use either a long USB cable between the usb-serial adapter and the PC, or use a long serial cable between the adapter and the programmer.
 
I've always run my parallel port programmers (of various kinds) with a six foot lead to a switch box, and another 6 foot lead to the programmer - never had any problems!.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top