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
 
LinkBack Thread Tools Display Modes
Old 8th September 2008, 06:11 AM   (permalink)
Default serial data communication debugging

I am using two number of PIC18f452 microcontrollers.

TX1 pin of first PIC18f452 connect with RX2 pin of second PIC18f452
&
RX1 pin of first PIC18f452 connect with TX2 pin of second PIC18f452

Now i want to see this two way communication over my PC through serial port without any intruption.

Is it possible?
What circuit will be required to make it possible
__________________
ash
ashraf is offline  
Old 8th September 2008, 06:43 AM   (permalink)
Default

What kind of data are you sending? Is it just ASCII text? For the serial port, you will need an RS-232 transceiver,
http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1798
unless the PIC µC has them inside. I doubt it, but I'm not an expert on PICs. For plain ASCII text you could view the data using Hyper Terminal. Is this just for monitoring purposes, or will the PC be playing a more active role?
__________________
"Remember, you're special.....just like everyone else."
rezer is offline  
Old 8th September 2008, 06:50 AM   (permalink)
Default serial data communication debugging

Yes i am using max232 IC for PC .
I want to TX and RX from PC as wel when ever i need to send and receiver data.
Yes its a simple ASCII text and i want to see it on hyper terminal
__________________
ash
ashraf is offline  
Old 8th September 2008, 06:52 AM   (permalink)
Default

You could also use a PICkit2/Junebug to get the serial working with the UART tool. Then add the RS232 level shifter after you have that much working.
3v0 is online now  
Old 8th September 2008, 07:25 PM   (permalink)
Default

I think that so far that the responders of this posting have failed to understand the complexity of what the OP is wishing to do.

"Now i want to see this two way communication over my PC through serial port without any intruption."

He wants to be able to monitor (and send to?) TWO serial data links using ONE PC comm port. That is the two PICs are sending and receiving to each other and he also wishes to be able to monitor and send into these two links with his PC.

That can't be done without some kind of external ORing logic circuity. Using TWO PC comm ports with two instances of hyper terminal loaded could solve for the PC monitoring both links (receiving) part, but there would still be external ORing logic needed for the PC to be able to send to either PIC, again as the two PICs are also wired to each other.

While one can wire a single output terminal to more then one input terminal, one can't just wire two output signals together to a single input terminal, they will not play well together.

Am I missing something?

Lefty
__________________
Measurement changes behavior

Last edited by Leftyretro; 8th September 2008 at 07:27 PM.
Leftyretro is offline  
Old 8th September 2008, 07:33 PM   (permalink)
Default

You are correct. I misunderstood what he was wanting to do.

It would be a neat additional function for the PICkit2. Iy would not be much work if one had source code.

Last edited by 3v0; 8th September 2008 at 07:34 PM.
3v0 is online now  
Old 9th September 2008, 03:13 AM   (permalink)
Default

I see. After re-reading his post, I agree. Two instances of Hyper Terminal would be the way to go. It would probably be easier to just use Com1 and Com2, if available. I think it could be done by outputting both TX lines and inputting both RX lines to the PICs. This would be the obvious hardware solution. Controlling it through software would be more difficult. Perhaps an external trigger or maybe something as simple as a switch to "halt" communications between the PIC when Hyper Terminal is used to send data. Does this sound logical?
__________________
"Remember, you're special.....just like everyone else."
rezer is offline  
Old 9th September 2008, 05:11 AM   (permalink)
Default

If it can be done with some kind of external Oring circuitry, then i would like to know your idea in detail with a logic circuit diagram.

keep the following things in your mind while making logic circuit diagram

1. I want to monitor both PIC TX1 and PIC TX2 on my PC via RS232 without any switching.

2. & want to send data from my hyper terminal via RS232 to my PIC RX1 & PIC RX2 without any switching
__________________
ash
ashraf is offline  
Old 9th September 2008, 05:39 AM   (permalink)
Default

Quote:
Originally Posted by ashraf View Post
If it can be done with some kind of external Oring circuitry, then i would like to know your idea in detail with a logic circuit diagram.

keep the following things in your mind while making logic circuit diagram

1. I want to monitor both PIC TX1 and PIC TX2 on my PC via RS232 without any switching.

2. & want to send data from my hyper terminal via RS232 to my PIC RX1 & PIC RX2 without any switching
By switching, do you mean mechanical or software? Your talking about three-way communcication. In my opinion, you would need a way to halt the traffic on you PIC bus so Hyper Terminal could gain access.
To monitor your TX lines is no big deal. Use Com1/2 with two instances of HyperTerminal running on your desktop.
How will the flow of traffic work in your system with two PICs talking to each other and you making changes on the fly? What do you envision?
__________________
"Remember, you're special.....just like everyone else."
rezer is offline  
Old 9th September 2008, 05:54 AM   (permalink)
Default

RS232 is point to point (Two devices), plus your PC's RS232 port is too high a voltage for the TTL level serial ports on the 18F452.
RS485 is more practical for multipoint serial communications.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now  
Old 9th September 2008, 06:08 AM   (permalink)
Default

Switching is not required either mechanically or programitacally.
& only ONE com port is available with my PC.
If two transmit line can monitor on two seperate COM ports then how to send data from PC to two PIC receive lines from PC.
As we know one transmit and many receive can be possible
but many tranmit and one receive can not be possible without having some sort of circuitry.

And i am asking for the same kind of circuitry.
__________________
ash
ashraf is offline  
Old 9th September 2008, 06:08 AM   (permalink)
Default

Quote:
Originally Posted by blueroomelectronics View Post
RS232 is point to point (Two devices), plus your PC's RS232 port is too high a voltage for the TTL level serial ports on the 18F452.
RS485 is more practical for multipoint serial communications.
Yes, obviously. He mentioned in an earlier post he was using a MAX232 to his PC. I didn't feel the need to mention that since he already has it figured.
__________________
"Remember, you're special.....just like everyone else."
rezer is offline  
Old 9th September 2008, 06:13 AM   (permalink)
Default

Yes RS485 could be the solution but i will need 6 number of IC's to finish this task because it is a half duplex.

is there any other simple hardware less circuitry solution availabe/possible?
__________________
ash
ashraf is offline  
Old 9th September 2008, 06:28 AM   (permalink)
Default

Quote:
Originally Posted by ashraf View Post
Yes RS485 could be the solution but i will need 6 number of IC's to finish this task because it is a half duplex.

is there any other simple hardware less circuitry solution availabe/possible?
Where did RS-485 come from? It hasn't been mentioned from what I can see. Why would you use RS-485 when you would have to convert back to RS-232. Maybe I'm not understanding what you are needing.

What about an RS-232 data switch?
http://www.csdevel.com/manuals/E-data.pdf
__________________
"Remember, you're special.....just like everyone else."
rezer is offline  
Old 9th September 2008, 06:35 AM   (permalink)
Default

I missed the post about the MAX232, anyway you can monitor only one channel per serial port. To monitor both directions you'll need two serial ports on your PC. Lot's of programs out there can do "Serial Port Sniffing"
http://www.serial-port-monitor.com/

Also RS422 is full duplex and 10 device multidrop.
Take a look at www.rs485.com
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com

Last edited by blueroomelectronics; 9th September 2008 at 06:36 AM.
blueroomelectronics is online now  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
serial communication from PIC to PC flemmard Electronic Projects Design/Ideas/Reviews 10 11th September 2007 12:07 PM
Serial communication Electronics4you General Electronics Chat 4 13th March 2007 07:12 PM
serial communication alfian andri trianto Micro Controllers 2 9th July 2005 02:59 AM
serial communication jaikanth General Electronics Chat 1 12th December 2004 04:43 PM
serial communication TKS Micro Controllers 0 1st September 2003 09:38 PM



All times are GMT. The time now is 02:03 PM.


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

eXTReMe Tracker