![]() |
![]() |
![]() |
|
|
|||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
Experienced Member
|
Hello all,
How do I connect a digital pulse generator to a PIC? The PIC is programmed to count pulses before triggering an event. It is a bit tedious to sit and keep pressing a switch all the time! The pulse generator has two outputs. The pulse generator circuit was found at http://braincambre500.freeservers.com/dpg.htm All comments are appreciated. Thank you in advance. Barry. |
|
|
|
|
|
(permalink) |
|
Experienced Member
|
You would set the pulse generator to whatever frequency you need and the voltage to 0->Vcc. Then you can just directly connect it to your input pin, though I would suggest you connect it through a 1K resistor, just in case your PIC firmware accidentally drives the pin.
|
|
|
|
|
|
(permalink) |
|
Experienced Member
|
You have 2 leads because one is ground. YOu must share ground with your PIC circuit for the Pulse generator to work with your PIC.
Good Luck Ivancho |
|
|
|
|
|
(permalink) |
|
Experienced Member
|
Thanks guys. Will try it out and report back. Must first build the pulse generator. We live and we learn!
Cheers. |
|
|
|
|
|
(permalink) |
|
New Member
|
You can make a pulse generator with another PIC. A PIC 12F675 for example has an internal clock so your pulse generator could be very simple - the PIC plus the previously mentioned resistor on the output pin.
How cool is that? -Chris |
|
|
|
|
|
(permalink) |
|
Experienced Member
|
Intereating idea and thanks for your input Chris. How would I be able to change the output frequency (variable)?
|
|
|
|
|
|
(permalink) | |
|
New Member
|
Quote:
To change the delay period/count externally you could use a potentiometer and one of the pins as an A/D input to get a number you could use to calculate your delay period. Of course that would double the number of components in your circuit to 2. -Chris |
|
|
|
|
|
|
(permalink) | |
|
Super Moderator
|
Quote:
:P |
|
|
|
|