Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] RS232 - PIC sending data to PC

Status
Not open for further replies.

brunofunchas

Full Member level 3
Joined
Jul 1, 2009
Messages
168
Helped
10
Reputation
20
Reaction score
7
Trophy points
1,298
Location
Portugal
Activity points
2,348
Hello!

I have a simple project, where I have to send only some bytes to the PC, but I can not see them with realterm serial capture. With the oscilloscope Fluke 123 I can see that the TX pin is sending its data because I can see it oscillating between 0V and 4,2Vdc.

I have attached the hardware for this part. Is it possible that R14 and R19 have a low value? In the DB09 conector is there any connection missing?

The problem is on the hardware, since if I put the PIC16F887 - I/P on my easyPIC v7 I can see the bytes on realterm.

Thanks in advance,
Bruno

- - - Updated - - -

I have pullout R14 and R19 but the result is the same! I can see on Realterm DCD led always blinking.
 

Attachments

  • RS232.PNG
    RS232.PNG
    71.7 KB · Views: 106

Hi,

0V and 4,2Vdc.
0V makes no sense, and 4.2V makes no sense.

Valid output levels for a logic HIGH input = -5V...-15V
Valid output levels for a logic LOW input = +5V...+15V

Both 0V and 4.2V are not valid RS232 levels.

Use a scope and show us the scope picture.

****
R14 and R19 are on the logic level side.
We don´t see where the signals come from / go to.

--> check datasheet of this IC for: V_IH, V_IL, V_OH and "V_OL @ 10mA"
do the same for the MAX232.

***
Maybe you just need another RS232 cable. There are standard cables and null_modem_cables.

Klaus
 

Hello!

I can see it oscillating between 0V and 4,2Vdc.

It seems that you mean RS232-TTL signals. These lines cannot be directly connected to the standard RS232 port.

You may use any TTL-to-RS232 level converter. Or RS232-TTL to USB.
 

People often get confused with the correct usage of Proteus serial port interface devices for simulation, I even struggled with this. The one you are using I do not know how it works, but if it is based on the COMPIM.DLL driver, the TX and RX pinout may probably be reversed. The correct way is by connecting the TX of the DB9 connector to the TX of the internal circuit, and the same for the RX pin, as illustrated below:

Compim.png
 

Ok. Thanks for the inputs! I will post the waveforms. I have used, as a reference, the easyPIC v7 RS232 hardware schematic. The power supply is only based in 5Vdc. There is no negative reference.

I will try also to use a simple cable where pins go 2->3, 3-->2 and 5->5 between PC and my board.

- - - Updated - - -

Please find attached two random waveforms from TX pin(that goes in to the DB09 pin 02). I'm only sending data do the PC.
 

Attachments

  • easypic-v7-schematic-v104c.pdf
    1.4 MB · Views: 68
  • Waveforms.rar
    3.1 MB · Views: 61

Hi,

Scope pictures:
* crop the picture and generate a smaller file size using jpeg compression
* use the "add image" button if available
* show us where the "zero" line is
* show us what signal you measured (TTL, RS232, input, output...)
* tell us what "data" you transmit. (use a constant value for debugging)

Else it is useless.

***********
MAX232:
* My datasheet shows you should use 1uF (not 100nF like you did) tantalum or ceramics capacitors with short wires.
* it produces about +10V and -10V for proper RS232 levels.

****
UART: Idle = HIGH = about 5V on TTL levels = -5 ... -10V on RS232 levels.

Klaus
 
Hi,

Scope pictures:
* crop the picture and generate a smaller file size using jpeg compression
* use the "add image" button if available
* show us where the "zero" line is
* show us what signal you measured (TTL, RS232, input, output...)
* tell us what "data" you transmit. (use a constant value for debugging)

Else it is useless.

***********
MAX232:
* My datasheet shows you should use 1uF (not 100nF like you did) tantalum or ceramics capacitors with short wires.
* it produces about +10V and -10V for proper RS232 levels.

****
UART: Idle = HIGH = about 5V on TTL levels = -5 ... -10V on RS232 levels.

Klaus

Thanks for the reply! In fact the caps should be 1uF and not 100nF. I have changed them and everything is working fine. Sorry for my sloppy post about the waveforms.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top