Sonsivri

Electronics => Hardware and Tools => Topic started by: kcsoft on January 18, 2009, 05:23:11 17:23



Title: PICKit2 as a USB to serial converter
Post by: kcsoft on January 18, 2009, 05:23:11 17:23
  The idea is to use the PicKit2 programmer as a USB to serial converter.
The PicKit2 has a built-in UART tool, this will tell you rx,tx and GND pins to be used from PK2.
! The signals are TTL levels (0-5v) not +/-12v RS232 levels but this should be what you need if you use this for a microcontroller communication.
  The atached program puts the PK2 in serial mode and redirects USB traffic to a serial port.
Use com0com (com0com.sourceforge.net (http://com0com.sourceforge.net)) or other software to create 2 bridged virtual serial ports on your computer.
Use one port with the attached program and the 2nd port in your PC serial application.
The baud rate is set from the attached program.
PicKit2 manual recommands baud rates up to 38400bps.
Original idea and implementation by kcsoft
Enjoy.


Title: Re: PICKit2 as a USB to serial converter
Post by: newboy on January 18, 2009, 06:42:57 18:42
I got this error.

How to use it ... any steps?

I already install com0com and open 2 hyperterminal and both can talk each other but your exe file fail ( as error.jpeg).


Title: Re: PICKit2 as a USB to serial converter
Post by: kcsoft on January 18, 2009, 07:48:13 19:48
The problem is that some dll files are missing from your computer.
The program is compiled with VS2005.
Install .NET 2.0 if you dont already have it.
Or try to goolge the error message.


Title: Re: PICKit2 as a USB to serial converter
Post by: janakfun on December 22, 2009, 06:41:08 06:41
Hi,
I downloaded the Pickit2 and run the .exe file. The dialogue box says "PicKit2 not connected!"

Well my application is like I have a USB dongle and towards computer side it should appear as a serial port...
Something like as if the data is coming from the serial port.
Will this application help me?? Or suggest me an application to do the same.

Thanks.


Title: Re: PICKit2 as a USB to serial converter
Post by: kcsoft on December 22, 2009, 10:43:22 10:43
I'm not aware of any other app that can do this.
Read my first post carefully.
Did you install com0com? com0com creates the 2 virtual serial ports. For example name them COM3 and COM4.
pk2uart should open COM3 and you application should connect to COM4.
You will also need the Pickit2 programmer.


For the error a few post above, this is caused by missing vs redist files. search, download and install this from microsoft
"Microsoft Visual C++ 2005 Redistributable Package (x86)"


Title: Re: PICKit2 as a USB to serial converter
Post by: janakfun on December 22, 2009, 10:53:22 10:53
Hi kcsoft,

I have used and installed com0com on my pc but I couldn't fine any option for USB.
it just mapped two serial ports, but my requirement is one actual USB to one virtual serial port.

Can this be done by com0com??


Title: Re: PICKit2 as a USB to serial converter
Post by: kcsoft on December 22, 2009, 11:32:00 11:32
no, com0com has nothing to do with USB.
I'm not sure I understand what is that you want to do.
The USB device attached must be the pickit2 programmer, I have the impression that you need to attach other device, like a USB to serial converter. If you need to have a com port that communicates with a usb device, that device must register itself as a USB CDC device.
The point of my application is to use Pickit2 (Microchip programmer) as a replacement for a USB to serial converter cable. Another advantage is that the microcontroller board does not need the TTL-RS232 level converter (MAX232 IC).


Title: Re: PICKit2 as a USB to serial converter
Post by: janakfun on December 22, 2009, 11:42:13 11:42
Ohhh.. I got your application, but my requirment is a bit different.
I have a USB device having a TI controller in it. This device will send the data to USB port (using USB protocol). But on my PC application it should appear as the data is coming from serial port (Serial protocol) and not from the USB.
I want to avoid witnig code for USB. So I'm asking if such kind of things are available...


Title: Re: PICKit2 as a USB to serial converter
Post by: 3v0 on March 15, 2010, 08:41:21 20:41
I had problems getting com0com to work, Vista.
http://www.eterlogic.com/Products.VSPE.html (http://www.eterlogic.com/Products.VSPE.html) ( mentioned in another thread) did work.



Title: Re: PICKit2 as a USB to serial converter
Post by: abuwalker on June 07, 2023, 01:21:10 13:21
I'd like to give this a try. But PK2USB2Uart.rar errors with "404 - Attachment Not Found".
Anyone got a copy? google has nothing...


Title: Re: PICKit2 as a USB to serial converter
Post by: Sideshow Bob on June 07, 2023, 06:36:11 18:36
I'd like to give this a try. But PK2USB2Uart.rar errors with "404 - Attachment Not Found".
Anyone got a copy? google has nothing...
The file is lost. It is not on server anymore. Maybe some users have it in their archive. I can see the fun in trying it as an academic exercise. But get some cheap USB to serial converter and be done, and be done. If no success   


Title: Re: PICKit2 as a USB to serial converter
Post by: Thiru09 on June 07, 2023, 07:46:34 19:46
I'd like to give this a try. But PK2USB2Uart.rar errors with "404 - Attachment Not Found".
Anyone got a copy? google has nothing...

Please check this

Regards,
Thiru