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.
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.
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.
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.
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!.