Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

how to generate a pulse from comp ?

Status
Not open for further replies.

prasadben

New Member
Hi ,
A dummy here, needs detailed help in trying to generate a pulse, triggered by the computer ( thru usb, parallel ,serial or whatever port/pin etc ). actually i made a very crude one ...... am using the cd eject tool to trigger a cd eject and close and have placed a relay switch at the tip of a " L " shaped rod, and am picking up its 12v input from the floppy drive connecter. its serving my purpose, but just wondering if i can do a bit better and neater one......... i am triggering a modem reset during the long waits while downloading stuffs.......... thanks for any help ........
PS : dummy here ...... pls be as detailed as possible ........
 
It's called a monostable. A 555 timer can be used in that mode, or I think there is a 7400 series IC for it (maybe 74123). It can be triggered by a parrallel port control line or serial port control line, but the latter might need level conversion.
 
Depending on the OS you are running, yes, it can be done. The guy here who has written a ton of code for the parallel port is Eric Gibbs including some nice parallel port timers. I am sure a forum search of parallel port will yield plenty of hits.

There are also a few applications (free) like this one.

Like 3v0 mentioned, yes, it can be done simply by toggling a parallel port bit.

Ron
 
A word of advice. If you use Visual Basic "Out Call" to set a Parallel Port high, followed immediately by setting the Port pin low again, depending on the lot of factors, the port pin will be high for several tens of us, except occasionally it will stay high for a couple of ms. The reason is that Windows is not a "real time" operating system, and occasionally, a system interrupt, or context swap will grab the CPU and leave your program hanging.

If you need your pulse to be a certain duration, the safest way is to use the low-to-high or high-to-low transition of the port pin to trigger an external one-shot multivibrator (timer) so that the pulse duration is dependent only on an RC network.
 
heya bright boys, thanks a ton , but as i mentioned , its a quality dummy here, most of the advice sounds to me like in italian with a mongolian accent spoken by a tamilian, to a swahillie... kindly elaborate ....... yeah , i am using xp (ordinary one, nothing fancy) and yeah i am just switching a relay to reset the power line to the modem ....... the autodownloader program gives me an option to run something during long waits, and i brilliantly found (& use) a "cd eject and close " thing and i bend up a piece of a crap wire, glued a little relay (yanked it out of a dead ups), sneaked up its 12 volts input from the floppy connecter, and its output to the powerline of the modem ......
a few months ago, i used to send a beep command (forgot how i used to do it) yanked off the little speaker on motherboard, used that pulse to do the same.
Now when i google around and rake my non-electronic-ally-inclined brain, i see a lot of the same stuff like sending a pulse from a serial / parallel port etc ..... but as i mentioned above its all the language prob ( mentioned earlier)
but thanks anyway buddies , for being helpful and considerate ....... and yeah guys, tell me ----- truely does it really matter how long the darn pulse has to be active .... dosent the relay do its job even if its pretty small ..... anyway u r the boss .... and my ears are all clean and wide open .............
thx reloadron ------- wonderful link .... and seems english too ...... haha
 
Last edited:
OK, considering your last post maybe we should be thinking something in a simple kit or assembled. Something like this may be a god way to go. You may want to Google terms like Parallel Port Relay Card or Serial Port Relay Card.

Something else to consider is that both the parallel port and RS232 serial port are on the way to extinction. Newer stuff like this is all pretty much USB or ether net port.

The parallel port alone will not drive a relay, thus on cards there are transistor drivers used.

Ron
 
Lately Iv been generating clock signals on my audio port, with free software called...............NCH Tone generator..
 
thx ron , the parallel port thing looks cool.... think i 'll have an adventure in that direction ....(ur first link looks fun....... the second one ----- hmmmm well i guess i 'll do it with my hands .... and not buy one off the shelf ) not for saving a few dollars but hmmmmmm well whatever .......
hi doggy, thx for ur reply...... but i wanna hear music and need audio for movies ........ so can 't give up on audio..... or am i talking something foolish here .........
Actually ron ...... that thing (ur first link) seems to bring back my long cherished ambition :) of making a fantastic alarm bell system, (btw i am a teacher) which plays out differnt mp3 pre-recorded messages, at specific alarm times, has a few fancy clock (digital) displays ( like present time , day, date etc...... time remaining for current period, etc .............)
and that little hyperlink in 3v0's reply " USB Bit Whacker " ------ thats pretty mouthwatering ....... wonder when i would graduate to understand enuf to meddle and play with the usb ..... by the look of things ....... it isn't far :)
anyway , thanks guys ......... this place is splendid ......... cheers ..........
 
Last edited:
I generally advocate using the USB port and bit whacker is really a handy little piece of hardware to interface with the USB port. There is actually no shortage of interface I/O devices out there to do it. The reasoning is that I mentioned the parallel port is pretty much dead, I haven't seen a new system using one in years. The RS232 serial port is following suit also.

Now I am not a programmer by any standard but have dabbled in writing some pretty basic data acquisition routines. Your thoughts as to playing sound files at given times and counting down classes and periods would not be all that difficult. There are several ways to go about it.

Ron
 
Wow somebody followed one of my signature links !

I think you will find the USB Bit Whacker fun to work with. The author/designer has an demo written in Liberty Basic that shows a graphic of the PIC with LEDs around it. You can click on the pins to turn the LEDs on and off. Looking at the demo source code you can see how to do it in your code.
 
thx guys, ron and 3v0, u guys imspire me ... all i know about comps (that i can say safely is a lil microprocessor arch and the mnemonic prog , that too on those college kits , entering inputs in hex and output the glorious 7 seg display) taught that to college kids way back in the stone age..... after that life steered me compleatly away, but the damn spark never extinguished, and u guys are pretty good fuelers, guess i 'll dive in and set up a blaze ...... :) who knows maybe i 'll get to finger around with old stuff in the new bottle .. frighteningly bizzare realm of the microcontrollors and God knows wat else...but right now, the pulse to the relay from the parallel port, next .....climb up to the serial mate.... then the 3v0 usb...then maybe microcontroller embedded wonders..... next ... well i guess i 'll be in a coffin long before this ...... :)
neways thanks and nice to make ur acquaintaince, guys ......... u guys better than most teachers....have a great day and i need that last beer now .......... cya
sorry for my language ..... i am not a technical guy.... me rather a joker working in a circus full of monkeys ..... :)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top