PDA

View Full Version : Need help with a pulse counter project PIC18F2620



blackrider
- 3rd April 2009, 17:05
I decomposed my ps2 tracking ball old mouse and I want to use from it those IR emitter and detector(optocoupler), the ball and
those cilinders with slotted disc in a end.Between transmitter and receiver will be that slotted disc that will rotate.
From the IR detector I'll take the pulse signal and it would go in an amplifier with histerezis (Schmitt trigger), so if the signal
would be in sinus form or sinus with lot of noise I can make it digitaly one with 0 and 1 logical applied to PIC18F2620.
And the data goes to RS232 so I can read the data in hyperterminal of WinXP.

I am new to the world of PIC programming and it will be very much useful for me if anybody can give me some advices
and a code that will read the pulse signal continuously and display the digital values in hyperterminal of WinXP of how fast is spinning the cilinders by force of the ball.

I made a block schematic for moment but in short time I need to go deeper.

Thanks in advance.Your valuable help will help me to complete my project.

http://www.reconnsworld.com/ir_ultrasonic/basicirdetectemit.gif

mistergh
- 29th April 2009, 01:08
Hi blackrider:

The output from the trackball is a rectangular signal and you don't normally need a Schmidt trigger. If you needed one, there is one inside of many "PIC's".
Is this the only thing you want to do with the PIC? The 18F2620 would be too "BIG" for this project. Also, what is the approx. frequency coming from the mouse and what is the time frame for the signal to be measured, like pulse per seconds, minutes etc?