Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - High speed counter

(you are viewing a thread; or go back to list of threads)

High speed counter (by Kumar)
Dear John,

Kumar here. Does your compiler support high speed counter, something like in the range up to 37kHz?. For your knowledge, i'm planning to use 16F628A. Please reply.Thanks.
Tue Jan 19 2010, 08:39:22
(no subject) (by David R)
NO,

I used A cd4040 binary counter and interface it to the pic
using the 12 binary pins and the reset, then use bin to dec conversion in the pic to get the count.
but disable the count into the 4040 when taking the reading as the binary can change faster than the scan time of the PIC.

Regards
David.
Thu Jan 21 2010, 02:45:33
(no subject) (by Kumar)
Dear David,

Kumar here, Thanks for the reply. So, i will go ahead with your advice.
Tue Jan 26 2010, 07:59:41
(no subject) (by BoumPower)
You couln't use a timer and manipulate them from ladder logic ?

I have similare difficulties, so I'm writing a VM for PIC (or other CPU) that handle "interpretable byte code"

What do you wont doing with this counter ?
Tue Jan 26 2010, 08:29:16
(no subject) (by Kumar)

I'm planning to use this high speed counter for measurement
of motor rotation, which the high speed pulses will come from the motor encoder.
Wed Jan 27 2010, 09:59:14
(no subject) (by BoumPower)
Ok...
You have the same problem as me...
I will use ladder logic to handle some process and in the same time controling DC brushless motor.
Do do that, I'm writing a new ladder compiler that produce VM code more efficient.
After, I will write a VM machine (for PIC16 and PIC18) that interpret VM code in a task, I will use cooperative multi-tasking) for a great part of my software and an interrupt routine to manage the motor (brushless without hall sensor, position is derived from back induction in coil)
I plan to delocate VM code in a external I2C EEprom or use program flash memory if I have enough space.

You can use timer hardware from pic to count your pulses,
Wed Jan 27 2010, 15:42:54
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):