Need help! High speed pulse counter for 3200 CPR encoder

Status
Not open for further replies.

RuH_iranga

Junior Member level 3
Joined
Nov 4, 2010
Messages
31
Helped
7
Reputation
14
Reaction score
6
Trophy points
1,288
Location
sri lanka
Activity points
1,480
I need help for counting pulses of a 3200 pulses per revolution encoder motor. I want to know are there any registers or pins which can operate independently from main program. Then it can count pulses, and return count when it needed for main program without interrupting main program. I use pic 16f877a and pic 18f452.
I used RB4-7 interrupt before and did not count pulses properly.

Please help me. I use this to my stabilization platform project. I can provide my interrupt program.
 

You would be better off using a microcontroller with a hardware QEI interface. I would use a dsPIC33 but I think the PIC18F2331 series has a QEI interface.

Do you poll the A and B signals ? if so you could use interrupt on change which may improve performance (I have used this on a PIC24 which does not have a QEI interface)
 

    V

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…