You're right. With a resistor in serie that will work.
You're right. With a resistor in serie that will work.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hmm..that might be part of my problem. Right now I have pin C6 connected to pin 3 of the RS232 connector and pin C7 connected to pin 2 directly (no resistor in series). What resistor would you recomend? That and would I need to use any of the other pins on the RS232 connector (request to send, etc) if just reading trhe data via HyperTerminal or Microsode Studio?Originally Posted by mister_e
Beatrix,Originally Posted by Beatrix
On the second PIC (I guess that's the one to transfer data to the PC) you are using PortB.0 with SERIN
I assume that's the incomming Data from the first PIC.
And you are using PortC.7 with SEROUT
I assume that's the outgoing Data to the PC.
A series resistor is not really required on the PC's RX-Pin.
(But 1k wouldn't hinder either)
Since the PIC does not receive any Data from the PC
you don't need a connection between PortC.6 and Pin3 on the RS232.
If you want to connect it you should have a series resistor (say 22k).
All you actually need are two wires:
PortC.7 to RS232 Pin 2
and
PIC GND (Vss) to RS232 Pin 5
Is it probably the missing GND that is causing the Problem?
Set the Handshake in Hyperterm to "NONE"
Simple test of your PCs serial Port:
With nothing connected to the RS232
In Hyperterm set "Local Echo" to "OFF"
when type on your keyboard there should nothing appear on your screen.
Now connect Pin 2 and Pin 3 on the RS232
every character typed should be echoed back on the screen.
Last edited by NavMicroSystems; - 4th July 2005 at 16:18.
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Regarding the connection to ground: currently I have both of the Vss pins connected to board ground. For this connection to RS232 ground, should I simply solder in a wire, thereby having Vss connected to board ground and RS232 ground, or should I disconnect it from board ground and only connect it to RS232 ground?
That's the way it should be.Originally Posted by Beatrix
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
I tried it again with the ground wire in place and no more receive wire using both Microcode Studio and HyperTerminal, and it still doesn't work. Is there anything I should be doing with the other pins on the RS232 connector? Any ideas?
Beatrix,
have you tried the simple test described here
Have you set the Baudrate on the PC-side correctly
and is "Handshake" set to none?
Could you post a schematic and your code (cut down to the RS232 part)
For a one-way communication (PIC --> PC) you definitely need only two wires:
PIC-GND to PC-GND and PTC-TX to PC-RX
Probably your PCs COM-Port doesn't work with TTL-Levels.
If so you would need to add a MAX232-type of Level shifter.
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Bookmarks