I have a hobby PIC programmer (K8048) that uses rs232 to communicate with PC. My new laptop doesn't have rs232 port so I bought a prolific usb to serial converter to interface with this programmer but it appears as if the usb to serial converter is not fully rs232 compliant with its voltage levels so...

Rather than scrap the board and fork out £30 for the usb version I wondered if any one could see a problem with running the signal into a max232 and feeding that into the K8048? The max232 datasheet shows +- 25ish volts on the TIN/RIN pins... It seems so simple I must be crazy?!

  • \$\begingroup\$ Whats the update on this? Did you ever get your USB-RS232 converter to work? \$\endgroup\$ – justing Sep 24 '12 at 21:30

Have you tried a different usb to serial converter? Prolific marketed products are famous for being counterfeited with fake prolific chips in them.

Warning Notice: Please be warned that counterfeit (fake) PL-2303HX (Chip Rev A) USB to Serial Controller ICs using enter link description here trademark logo, br

andname, and device drivers, were being sold in the China market. Counterfeit IC products show exactly the same outside chip markings but generally are of poor quality and causes Windows driver compatibility issues (Yellow Mark Error Code 10). We issue this warning to all our customers and consumers to avoid confusion and false purchase.

  • \$\begingroup\$ Bought from maplin - not improbable but I see a lot of people and the manufacturer just plain stating their hardware can't be used with usb-serial. Thanks though justing \$\endgroup\$ – Paul Sullivan Sep 14 '12 at 20:29

The max232 is pretty simple, just need to make sure you have the required caps there. But it's intended to take TTL levels and convert them to RS232 levels; that is, logic low => +12V and logic high => -12V for example.

However, the USB to serial converter that you have most likely already includes a MAX232 equivalent inside, if it has a DB9 connector. And so the signals coming out are probably already RS232 compliant. RS232 is pretty wide spec -- you only need something like +-3V to meet it. My guess is that the K8048 is actually the problem here, and it's expecting even higher voltages, even though they're not required by the RS232 spec.

One thing you could do would be use two MAX232 -- one to convert the USB-serial chip's output back to TTL, then another to convert the TTL back to RS232-levels, in the hope that the MAX232's RS232-levels are "better" for your programmer than the levels that were there before.

Instead of two MAX232, you could also replace the USB-serial converter with one that outputs TTL levels, like the MicroFTX or any similar FTDI breakout board. Then you could add just one MAX232 to get RS232 levels, although again there's no guarantee that your programmer will be work if the levels fall within the lower range of the RS232 spec.


I'm not sure that the problem with the K8048 is actually the voltage levels anyway. Looking at the manufacturer's site, it has its own power supply, so it's not trying to power itself from the serial port like some programmers. Instead, my guess is that it's using bit-bang on some of the serial control lines (DTR, RTS, etc) to control the programming of the PIC. USB to serial converters, by the nature of the USB bus and it's 10ms polling interval, cannot directly control or read these lines quickly enough for bitbanging to work reliably.

If that's the case, there's nothing you will be able to do to get your usb-serial converter to work. I would recommend just getting a USB version of that (or another) programmer.

Extra info:

(added by Wouter) PC software that programs PICs using a circuit that does not contain another PIC (or other micro-controller) in most cases control the PC port directly via its hardware. (The K8048 is certainly in this class.) This was possible with the old-style 'real' serial and parallel ports, but not easily with the 'emulated' usb-to-port converters. I once got this working with a fancy serial-port-hardware emulator, which indeed made PIC programming possible using a K8048-like circuit. But it was so slow I first though it to be not working: programming a full 1k 16F84 took about 1 hour. Believe me, you don't want to go that route. Get yourself an intelligent PIC controller (one that contains a micro-controller). Pickit2, pickit3, their various clones, my Wisp648, one of Olin's programmers, etc.

  • \$\begingroup\$ Thanks Jim (et al) - Thanks for the comprehensive answer and time on this. One quick thought on the linked 'two max232'... the max232 has two lines - I could use one chip and just loopback i.e. t1in -> t1out -> r1in -> r1out (though I have to think which pins need to be looped)? \$\endgroup\$ – Paul Sullivan Sep 14 '12 at 20:28
  • \$\begingroup\$ Though I dn't doubt your guess about the DTR/RTS I have a max232 and can rig a simple prototype quickly so I'll try that and report back (no doubt confirming the above) \$\endgroup\$ – Paul Sullivan Sep 14 '12 at 20:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.