Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 10-30-2007, 05:12 PM   #1
LQ Newbie
Registered: Oct 2007
Posts: 2

Rep: Reputation: 0
Unhappy USB-RS232 communication problem (I think)

This is my first *real* message on this forum.
I've built an analog->digital circuit using a PIC16F876.
It looks like this :
It is 5V-powered and uses a 4MHz quartz.
Here is the PIC C code :
Now, I'd like to connect it to my laptop (Lenovo 3000 c200 ; ubuntu gusty gibbon). As I've not any serial port on this computer, (I've only got USB ports), I've bought a USB->RS232 adapter. It seems to be recognized, and a device, /dev/ttyUSB0 is created. Finally, I give me all rights on it.
I've also created a C program that will show the curves of the analog PIC inputs in realtime.
Here it is :
It is coded using code::blocks ide and uses SDL to display the curves and standard IO functions on my usb serial port (open, read, write).
Now, there is a small problem in all that :
Nothing is received by the program while the PIC is constantly sending data on the serial port.

Please help me.
I've been searching for the problem for 12 days...

Thank you.
Old 10-31-2007, 09:57 AM   #2
LQ Guru
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
have you tested the usb-2-serial converter to ensure everything is working as expected ?

Use minicom and an external modem, or hook up a loopback on the serial port and test...

Loopback wiring diagram

Loopback plug


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial (RS232) communication is one-way anroy Linux - Hardware 5 08-25-2007 02:35 PM
usb / rs232 drivers Programming 2 01-16-2006 03:26 PM
USB communication problem dasw127 Linux - Hardware 0 08-23-2005 04:28 AM
USB>RS232 versus PCMCIA>RS232 jayhel Linux - Laptop and Netbook 2 08-04-2005 07:09 PM
USB - Serial RS232 Adapter blox Linux - Hardware 3 01-28-2005 11:58 AM

All times are GMT -5. The time now is 03:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration