How to get Hz from parrallel port.

Status
Not open for further replies.

Screech

New Member
is there any free simple software that does this for a parrallel port?

I can get 37- 32000 Hz from the internal Pc. speaker.
but I don't know how to use the pc speaker wires to connect to an npn transistor.


in Qbasic the program would be:
REM outputs 10,000 HZ for 1 sec to pc speaker . (1 sec=18.2 clock tics per second)
sound 10000, 18.2

thanks
 
Be easier to get it out the sound card, and there is plenty of free software available to use the sound card as an audio signal generator.
 
Ok, Nigel, I'll do some searches.
How would I hook up the sould card output to a transistor or to a counter chip?
 
I don't know if this is sufficient, but you can try connecting a capacitor to pin 2 (D0) of the parallel port and connect the other end of the capacitor to a speaker and then to pin 25 (ground). Now write a program that outputs data to D0 (bit 0 of the parallel port).

the speed which the data is outputted is the frequency you will hear.

I have not yet tested this idea, but like I said, my idea might not work 100%.
 
I downloaded a tone generator that outputs to the sound card, but i am having trouble interfacing with it.

What i was trying to do is to use the tone generator as an osilator.
the osilation would then be counted with a counter chip.
 
Screech said:
I downloaded a tone generator that outputs to the sound card, but i am having trouble interfacing with it.

What i was trying to do is to use the tone generator as an osilator.
the osilation would then be counted with a counter chip.

If you've got the option in your program, try setting it to square wave, or add a schmitt trigger or over driven amplifier to square it. In any case, you might need to amplify it to drive your logic chips.

Bear in mind, you never originally mentioned you wanted to feed logic counters!.
 
I did set it to square wave, but it's not square!
I also over amplified it too.
But I haven't added a smidth trigger.

I did add some components to the sound cards speaker amplifier, but one minute it works, the next it doesn't. unreliable.

If I just have a tone generator that outputs to the parallel port, I would not have any problems.

When i get some more time, I try more things.
Thanks
 
i have a written a program

if you use the parrallel port you can output 10 bits at a time i have written a program that can output your processer speed (max) to the parralel port

(attachment) this will do what you need
connect pin 2 to your logic or transistor and the ground to pin 25 (case)

note: the program only work if the dll if in the same folder and the higher the number the slower it will go eg: my processer speed is 320 mhz (3.2ghz) so 1 will 320 mhz.
 

Attachments

  • output.zip
    126.9 KB · Views: 115
  • output.zip
    126.9 KB · Views: 118
Re: i have a written a program

danielsmusic said:
if you use the parrallel port you can output 10 bits at a time i have written a program that can output your processer speed (max) to the parralel port

I suggest you check on PC specs, the ports run at a MUCH slower speed than the processor, it's limited in the PC design.


For a start, 3.2GHz is 3200MHz, not 320MHz, and you won't get anywhere near that from a parallel port. The 3.2GHz refers to the processors internal speed, even it's external access to fast memory is a great deal slower than that.
 
danielsmusic, What have you done?

I connected an led and resistor to pin 2 and earth.
The led flashes at the same rate, no matter what the delay period.
:?

Why is that program 1/2 Meg (unzipped) in size?
 

Attachments

  • clipboard01_371.gif
    7.3 KB · Views: 753
you will need to change the nuber quite alot for it to work 100000000 will flask twice a second i will write another program to make it easyer
 
danielsmusic said:
i dont know why it is 1/2 M big

it's a Win32 console application, containing statically linked libraries...
Even a 'Hallo World' is half a meg in win32

And AFAIK, the parallel port runs on the PCI bus in current pc's wich is locked at 66Mhz (and the parallel port is even slower then that, for compatibility's sake)
 
I have not tried such a program before, but I'm quite sceptical of not only the maximum bit rate of the parallel port, but also how precise can you output to a parallel port (in terms of timing) in a non-realtime multi-tasking windows/linux environment. BTW, are you positively sure the program can work at 3Gbps? If it's true, then it's amazing. Can dump all those expensive DAQ cards straightaway. :lol:
 
i know defenetly the program work at the prosesser speed but the paralell port cannot

the program timing is "perfect" this time
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…