Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/27/01 09:35
Read: times


 
#9612 - P3.4
Hi.

I've found myself in a rut. I have a deadline for a project and there is just one piece I can't quite work out.

Anyone have any ideas on the code necesary to measure the frequency of a square wave which is fed into P3.4. Measuring Hz to Khz I need to measure the number of times a square wave(ie events) occurs per a specific time, which has not be chosen. Basically i need to enable the interrupts. Then the
1-0 transitions(events) will trigger interrupts which should count the events. This is where I'm having trouble.
I know this code is necessary for the interrupts, but I would like to know xactly how the timer works and how to retrieve the number of event timers.

SETB ET1
SETB EA

I've also been informed I should be using interrupt service routines.
I'm using the ADuCS12 microcontroller. The square wave is generated using an external hardware circuit. Whether the frequency is to great to be measured is not within the scope of what I want.

I'm aware it is only a few lines of code but I'm not used to wrking with assembly code, usually focusing on C/C++ and Java.
If anybody could help me i would be very grateful.

Thanks
John

List of 5 messages in thread
TopicAuthorDate
P3.4            01/01/70 00:00      
RE: P3.4            01/01/70 00:00      
RE: P3.4            01/01/70 00:00      
RE: P3.4            01/01/70 00:00      
RE: P3.4            01/01/70 00:00      

Back to Subject List