Connecting open drain output to another output of PIC
Hasan
Posts: 10
Hi,
Here is a question to all of you PIC experts from a half engineer.
I have a project where I have a bunch of slave controllers/sensors based on PICs connected to a central controller which is based on Javelin Stamp. One of these slave controllers is a ultrasonic ranger used to sense fluid level. This ranger is designed around pic16f628. Skipping the irrelevant design details here, this PIC has a couple of comparators which I use at the last stage of the ultrasonic reflected pulse detector. Compartor's output is digital and is open drain. Here is the quesiton.
I want to connect this open drain output to another port pin which is always output in my case (CCP1/RB3 pin). Will this be OK? i.e., connecting an open drain output to another regular, non-open drain output? I know two or more open drains can be connected together thru a resistor to Vcc but not sure about mixing the two types of outputs.
Also, the data sheet says that "If the RB3/CCP1 is configured as an output, a write to the port can cause a capture condition." This is good news for me since I don't have to change status of ccp1 pin. Does any one have an idea how this writing to output, works?
Here is a question to all of you PIC experts from a half engineer.
I have a project where I have a bunch of slave controllers/sensors based on PICs connected to a central controller which is based on Javelin Stamp. One of these slave controllers is a ultrasonic ranger used to sense fluid level. This ranger is designed around pic16f628. Skipping the irrelevant design details here, this PIC has a couple of comparators which I use at the last stage of the ultrasonic reflected pulse detector. Compartor's output is digital and is open drain. Here is the quesiton.
I want to connect this open drain output to another port pin which is always output in my case (CCP1/RB3 pin). Will this be OK? i.e., connecting an open drain output to another regular, non-open drain output? I know two or more open drains can be connected together thru a resistor to Vcc but not sure about mixing the two types of outputs.
Also, the data sheet says that "If the RB3/CCP1 is configured as an output, a write to the port can cause a capture condition." This is good news for me since I don't have to change status of ccp1 pin. Does any one have an idea how this writing to output, works?
Comments
You really need to work through all the appropriate cases they present in order to avoid a bad result.
I would have to go back to the book and guess what you want to do. Try to locate a copy at your library and I am sure it will clear up your questions.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
G. Herzog in Taiwan
of an open collector for the parts of your circuit that are already open collector.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe - Mask Designer III
National Semiconductor Corporation
Latest Company News
(Communication Interface Division)
500 Pinnacle Court, Suite 525
Mail Stop GA1
Norcross,GA 30071
Thanks for the replys guys.
I do have the Art of Electronics Book. I couldn't find the solution to my problem in it though.
ICeMAN's simple solution will actually work for me. I should have thought of that too...
How do you draw these ascii based circuit diagrams?
-Hasan
I usually draw them in Windows Notepad (non-proportional font)
Then cut and past them into a reply as if they were CODE.
{code}
ASCII Stuff
{/code}
Substitute { and } with [noparse][[/noparse] and ]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe - Mask Designer III
National Semiconductor Corporation
Latest Company News
(Communication Interface Division)
500 Pinnacle Court, Suite 525
Mail Stop GA1
Norcross,GA 30071
I knew that possibly both diodes and pull up resistors were required, but unsure of the logic.
Thanks for the tip on ASCII schematics. Having seen a lot of those, I really appeciate knowing how easy they are to create.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
G. Herzog in Taiwan