Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
Thread Tools Display Modes
Old 8th October 2006, 04:31 PM   (permalink)
Default USB to RS232 conversion

As a part of my project I want to build a USB to RS232 converter. Can anybody help me out? I want to use a microcontroller, preferably PIC to carry out the conversion (not using any readymade product meant for this purpose).
Please suggest me the size of the buffer, signal conversion schematic,etc. needed for this conversion or info about such conversion ckt. using PIC. Thanks in advance.
chintan_jagani is offline   Reply With Quote
Old 8th October 2006, 04:43 PM   (permalink)
Default

USB to anything is a fairly tall order. In addition to some substantial dollars for the spec I think it is unlikely to be a successful project without some specialized hardware. I think the consensus around here is that it is not worth anyone's time or treasure so there is probably a lack of experience to boot.

Last edited by Papabravo; 8th October 2006 at 06:59 PM.
Papabravo is offline   Reply With Quote
Old 8th October 2006, 05:24 PM   (permalink)
Default

Yes, it's pretty pointless wanting to do this - when you can buy FT232 chips that already do the exact job, and come with the required PC drivers.

As such you're unlikely to find a ready built project (because it's a waste of effort), but any of the 18F USB enabled PIC's should be able to cope wiht such a project, you just need to design it, and write the software (not forgetting the PC drivers as well!).

Presumably this is yet another college project?, but at least you've come up with your own idea - even if you don't have any clue how to implement it!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 9th October 2006, 02:08 AM   (permalink)
Default

Thank you very much.
Actually I want to implement other conversions using the same microcontroller. Using a seperate IC for each conversion will increase my hardware. Will u please elaborate the idea of USB enabled PICs? Do they help in enumeration process? PLease specify the difficulties in the project using PIC.
chintan_jagani is offline   Reply With Quote
Old 9th October 2006, 08:05 AM   (permalink)
Default

I suggest you read the datasheets and application notes at MicroChip, bear in mind USB is pretty complicated!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 9th October 2006, 08:08 AM   (permalink)
Default

On several of the 18F PIC series are the hardware(ram and interface) for doing USB at LOW and FULL speed. However, they handle the hardware part only. User still has to write the code to implement endpoint buffers from the RAM and provide/retrieve data from these end point buffers in order to do something useful. In a word, user has to write code for the data part of the USB implementation, including enumeration and high level exchange.

The following link points to a Microchip page that includes free firmware for HID/CDC or mass storage class implementation on the PIC. I have only tried the CDC example. Simply said, if a PIC is loaded with the CDC firmware, it will be detected by the computer and enumerated as a virtual COM port. Other Window softwares like Hyperterm can then communicate with the virtual COM port.

The codes are very involved and in C language, in which you would need the C18 compiler(also available for download as free student version) to compile it. I suggest you download and "install"(it just expands all the files to a directory) the CDC firmware to have a look.

Full-Speed USB PIC18 Products with FREE USB Software

The difficulty of the project lies in the functioning of the USB interface part as data exchange is fast even with PIC running on 48MHz with a FULL speed implementation. Therefore, the USB code is done via polling instead of interrupt and consumes basically all the MCU power with nothing much left for user to do extra work.

As mentioned by others in the above posts, it is not worth the effort to build anything serious while dedicated chips are available and function much better. Its great fun to experiment though.
__________________
L.Chung
eblc1388 is offline   Reply With Quote
Old 10th October 2006, 02:20 AM   (permalink)
Default

Actually I want to implement other conversions using the same IC such as USB<=>P/S2 ,RS232<=>P/S2 as my project is to combine the three conversions (USB ,RS232, P/S2 ), both way (only one conversion at a time ). So,will I have to use another microcontroller for other conversions? Atleast can I implement RS232 to USB using this IC. I am unable to start my project, at what point should I start? Pleasehelp me out.
chintan_jagani is offline   Reply With Quote
Old 10th October 2006, 07:44 AM   (permalink)
Default

Quote:
Originally Posted by chintan_jagani
Actually I want to implement other conversions using the same IC such as USB<=>P/S2 ,RS232<=>P/S2 as my project is to combine the three conversions (USB ,RS232, P/S2 ), both way (only one conversion at a time ). So,will I have to use another microcontroller for other conversions?
No, I think one PIC is sufficient.

The only limitation here is the code memory space(32K for 18F4550, so plenty) of the PIC you are using. USB<>RS232 does not take up all the code memory space so you can implement other protocol translation using the remaining space, as you only need to do a pair at a time.

There are many examples of how to communicate with a P/S2 device using PIC so it not difficult at all. Once you get the data from the P/S2 port, then you can send them out to RS232.

On the PIC, you can select which piece of code to run based on the status of some dip switches at startup or detecting activities on PIC input pins.
__________________
L.Chung
eblc1388 is offline   Reply With Quote
Old 12th October 2006, 03:21 AM   (permalink)
Default

Thank you very much for ur valuable suggestions.
Actually I think there is some problem on microchip's website.I am unable to download the datasheet of PIC 18F4550 which is causing delay for me to start.
chintan_jagani is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
PCMCIA to RS232 for ICD2 clone clockdoctor Micro Controllers 6 7th April 2008 10:09 PM
RS232 Splitter Dotnet Electronic Projects Design/Ideas/Reviews 3 1st June 2006 10:44 AM
RS232 buffer TDY General Electronics Chat 3 18th March 2005 08:36 PM
rs232 to rs232 data logger with 1meg buffer -help needed ccaammaaccaazzii Electronic Projects Design/Ideas/Reviews 11 20th October 2004 09:43 PM
I²C and RS232 on the same PIC l30 Micro Controllers 2 3rd July 2004 03:14 AM



All times are GMT. The time now is 05:39 PM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.