EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Serial Communication Between PIC and PC via USB port

Started by s_tanberk January 4, 2006
I try to make an asynchronous serial communication between PIC16F628
and notebook USB port.
I use USB-RS232 converter and MAX232 components between PIC and
notebook.

PIC can send data to notebook. It is OK. But when I try to send data
from notebook to PIC, it is unsuccessfull. It runs with desktop
computer. I think there is a problem between USB port and PIC serial
communication.

Maybe it is required to use another type component instead of MAX232
and USB-RS232 converter .

How can make an asynchronous serial communication between USB port and
pic?

Will it be usefull to use FT232 ?


> PIC can send data to notebook. It is OK. But when I try to send data
> from notebook to PIC, it is unsuccessfull. It runs with desktop
> computer. I think there is a problem between USB port and PIC serial
> communication.

Loop the TX back to the RX. Do you get echo (and does it disappear when
you remove the loopback)? If not the problem is on the PC side, probably
a handshake setting, or your converter needs handshake anyway (there are
rumours that such converters exist).

If echo then proceed to the circuit, and try the same thing at the 5V
side of the MAX232. If still echo the problem is (most probably) in the
PIC.

> Maybe it is required to use another type component instead of MAX232
> and USB-RS232 converter .

no, max will do fine.

> Will it be usefull to use FT232 ?

for a product: yes. for a prototype an existing usb-serial converter
will probably be much more easy.

Wouter van Ooijen

-- -------
Van Ooijen Technische Informatica: www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: www.voti.nl/hvu


I would take the PIC out of its socket and short the transmit and receive
pins together to form a loopback and then use hyperterm or something similar
to see if you can pass characters down to the Max232 and back. If that
doesn't work then try to step back up the cable. You can tie the transmit
and receive lines (RS232) coming out the USB-RS232 converter and see if that
loopback works. Don't know enough about USB to tell you how to loop that
back. If you can pass characters down through the Max232 and loop them back
and your PIC still doesn't then work then you've got a problem with the PIC.
Thanks,
Scott

__________________________________________
SoftSystem Solutions, LLC
18 Ridge Road
Clark, New Jersey 07066 USA
Scott Kellish, Owner
Tel. +01 732 382 1873
Fax: +01 732 382 1873
Mobile: +01 732 261-5856
e-mail: skellish@skel...
__________________________________________

Damn it . . . Don't you dare ask God to help me. - Final words of Joan
Crawford, actress, d. May 10, 1977 (To her housekeeper, who had begun to
pray aloud.)

----- Original Message -----
From: "s_tanberk" <s_tanberk@s_ta...>
To: <piclist@picl...>
Sent: Wednesday, January 04, 2006 4:11 PM
Subject: [piclist] Serial Communication Between PIC and PC via USB port >I try to make an asynchronous serial communication between PIC16F628
> and notebook USB port.
> I use USB-RS232 converter and MAX232 components between PIC and
> notebook.
>
> PIC can send data to notebook. It is OK. But when I try to send data
> from notebook to PIC, it is unsuccessfull. It runs with desktop
> computer. I think there is a problem between USB port and PIC serial
> communication.
>
> Maybe it is required to use another type component instead of MAX232
> and USB-RS232 converter .
>
> How can make an asynchronous serial communication between USB port and
> pic?
>
> Will it be usefull to use FT232 ? >
> to unsubscribe, go to http://www.yahoogroups.com and follow the
> instructions
> Yahoo! Groups Links >




The clue might be in the fact that it works from the desktop and not
the laptop. If it all works with the desktop, then there is nothing
wrong with the PIC or the MAX232.

One other possibility: Many Laptops do not supply the same current &
voltage to the USB ports as desktops do. Therefore, part of the
problem MIGHT be that the USB-RS232 converter is not being
adequately powered. Especially if the converter is powered by the
USB interface.

If you can externally power the converter and the PIC, try that
first.

--- In piclist@picl..., "Scott Kellish" <skellish@c...>
wrote:
>
> I would take the PIC out of its socket and short the transmit and
receive
> pins together to form a loopback and then use hyperterm or
something similar
> to see if you can pass characters down to the Max232 and back. If
that
> doesn't work then try to step back up the cable. You can tie the
transmit
> and receive lines (RS232) coming out the USB-RS232 converter and
see if that
> loopback works. Don't know enough about USB to tell you how to
loop that
> back. If you can pass characters down through the Max232 and loop
them back
> and your PIC still doesn't then work then you've got a problem
with the PIC.
> Thanks,
> Scott
>
> __________________________________________
> SoftSystem Solutions, LLC
> 18 Ridge Road
> Clark, New Jersey 07066 USA
> Scott Kellish, Owner
> Tel. +01 732 382 1873
> Fax: +01 732 382 1873
> Mobile: +01 732 261-5856
> e-mail: skellish@s...
> __________________________________________
>
> Damn it . . . Don't you dare ask God to help me. - Final words of
Joan
> Crawford, actress, d. May 10, 1977 (To her housekeeper, who had
begun to
> pray aloud.)
>
> ----- Original Message -----
> From: "s_tanberk" <s_tanberk@y...>
> To: <piclist@picl...>
> Sent: Wednesday, January 04, 2006 4:11 PM
> Subject: [piclist] Serial Communication Between PIC and PC via USB
port
>
>
> >I try to make an asynchronous serial communication between
PIC16F628
> > and notebook USB port.
> > I use USB-RS232 converter and MAX232 components between PIC and
> > notebook.
> >
> > PIC can send data to notebook. It is OK. But when I try to send
data
> > from notebook to PIC, it is unsuccessfull. It runs with desktop
> > computer. I think there is a problem between USB port and PIC
serial
> > communication.
> >
> > Maybe it is required to use another type component instead of
MAX232
> > and USB-RS232 converter .
> >
> > How can make an asynchronous serial communication between USB
port and
> > pic?
> >
> > Will it be usefull to use FT232 ?
> >
> >
> >
> >
> >
> >
> > to unsubscribe, go to http://www.yahoogroups.com and follow the
> > instructions
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
>





Memfault Beyond the Launch