FAQFAQ   GalleryGallery   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   Forum RSS Feed   Hacked Gadgets Main Site 

Triggering PIC from RS-232 port

 
Post new topic   Reply to topic    Hacked Gadgets Forum Index -> Electronic Help
View previous topic :: View next topic  
Author Message
robo
Semi Newbie


Joined: 25 Nov 2010
Posts: 5

PostPosted: Thu Nov 25, 2010 7:14 pm    Post subject: Triggering PIC from RS-232 port Reply with quote

So I'm working on a PIC project that would be triggered from a PC serial port. The software (commercial program) can either send the trigger on pin 4 or pin 7 of the COM port. I'm only looking for a trigger and not serial communications, so I'm hoping for something simpler than using a MAX232. Any ideas of how to interface the RS-232 pin to a PIC 16F628 I/O pin?


Thanks....
Back to top
View user's profile Send private message

Alan
Site Admin


Joined: 29 Jan 2006
Posts: 1399
Location: Winnipeg, MB

PostPosted: Sat Dec 11, 2010 9:59 am    Post subject: Re: Triggering PIC from RS-232 port Reply with quote

robo wrote:
So I'm working on a PIC project that would be triggered from a PC serial port. The software (commercial program) can either send the trigger on pin 4 or pin 7 of the COM port. I'm only looking for a trigger and not serial communications, so I'm hoping for something simpler than using a MAX232. Any ideas of how to interface the RS-232 pin to a PIC 16F628 I/O pin?


Thanks....


There are a few simple ways to do it. You could use an opto isolator.
http://en.wikipedia.org/wiki/Opto-isolator

If this will be running on a single PC you could measure the voltage of the pin when active and use a resistor network to bring it to 5 volts (this might not be needed since there are lots of ports that use 0 and 5 volts on their outputs these days).

You could drive the base of a transistor with the PC port and use the transistor to activate the PIC pin to 5 volts or ground.

And last solution is the simplest, tie the port to the PIC input through a 10K to 100K resistor, this will allow the internal protection diode of the PIC shunt the extra voltage and just read high and low. This isn't an elegant solution but it is common.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Hacked Gadgets Forum Index -> Electronic Help All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group