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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/22/04 21:33
Read: times


 
#81718 - Event Timer , and a PCA
Responding to: ???'s previous message

Your problem would be a good candidate for using a device with a PCA (programmable counter array). You would use two capture inputs (a PCA has up to 5 available).......

I am not familiar with these. I will have a look thanks....


As to your question of any port pin being used as an interrupt - No - only specific pins can be used as interrupts.

I was hoping to be able to use any pin as an INT I will have to go about my other stuff differently!!

What I am hoping to do, is use INTO to just ;
--start timer
--RETI

And then use INT1 to do ;
--stop the timer
--send the value to the FIFO table
--get ready for the next time by doing the following
--clear the overflow flag
--clear TR0 and TF0
--set to mode 1 (not sure if I have to do this each time?)
--clear the timer value
--clear the overflow count
--RETI

Somwhere in the begining of my code where I do all the initialization stuff, I will do the following so that It is ready to go when INT0 is trigered.
--stop the timer
--clear the overflow flag
--clear TR0 and TF0
--set to mode 1 (not sure if I have to do this each time?)
--clear the timer value
--clear the overflow count




How do you create a data table? You mention a FIFO - this would be one way of addressing your problem - the interrupt code which has calculated the difference of your pulses would put the result into the FIFO, then your main line code would extract the values and calculate an average or whatever. How do we create a FIFO? Do you want to know the method or the implementation? For the implementation - in 'C' or assembler?

Yes, I have not been able to figure out how to create a table. What I would like to do is have a variable for table length. Then somewhere in the beginning of my code I would like to create the FIFO table based on that length. And then when the interupt triggers I would like to be able to store that time value in the table. I am just a beginner, and am trying to learn this stuff in assembley first. After I have evrything down, with Assembly, I will try to learn C.


Thanks again for your help. I appreciate any and all comments and suggestions.

Chris Seeley

List of 10 messages in thread
TopicAuthorDate
Event Timer (2 seperate events)            01/01/70 00:00      
   Event Timer            01/01/70 00:00      
      Event Timer , and a PCA            01/01/70 00:00      
   A question            01/01/70 00:00      
      NAND Gate            01/01/70 00:00      
         Nand gate            01/01/70 00:00      
            NAND Gate and Data Table            01/01/70 00:00      
   Code            01/01/70 00:00      
      Further to Nand gate            01/01/70 00:00      
   Event Timer (2 seperate events)            01/01/70 00:00      

Back to Subject List