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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/11/05 08:18
Read: times


 
#102212 - This is what iam going on with
Responding to: ???'s previous message
Generation of Timing Control Signals for Miniature Head Assembly
(A device that assembles Reed Switches)
Description:
I am using PORT1 of AT89C51 to develop eight types of control signals with different timing intervals in a time slot of (0 – 50) sec to assemble a reed switch…
Example: Port1.1 sinks current for 2 - 5 sec,(high to low convertion of Port1 to drive PhotoMOS relays)
Port1.4 sinks for 3 – 14 sec,etc.,(high to low convertion of Port1 to drive PhotoMOS relays)
For calculating timing intervals I am using timer0 overflow flag and two registers R0 & R1 (R0 increments with T0 overflow and R1 increments when R0 reaches a specified value (calculated for every one sec)) …
For this
I need to have a start Button (for that 50 sec operation) to begin the operation
So P3.2 is used as INT0 (active low) to receive a falling edge, which SETS the interrupt edge flag (IE0). This flag set could be used (with appropriate delay time using Timer1, for debounce) to run Timer 0 and the signals are obtained at Port1.

Hello Kai
Its not due to lengthy program loop I am using a falling edge interrupt (Hope it would be clear with what I am trying to do from my description). For every press of the switch at P3.2, a switch needs to be assembled (I mean the 50 sec operation). Once the timing slot is over I am clearing the Timer and setting the registers (R0 & R1) and Port1 to appropriate values.

Kindly let me know about your suggestions too…

Hello Erik,
(Kindly go through the above description before u have a look at this…)
As u said I would be using an interrupt for de-bounce operation by employing Timer1 to measure the delay to be achieved for de-bounce.
Regarding the sleep mode u said:
Here the requirement is such that once the Microcontroller is powered
Some ports of Port1 should be able to sink current (high to low conversion of Port1 to drive PhotoMOS relays). Once the Timer is made to run these ports undergo the timing intervals as described above. So can a SLEEP MODE be employed here. Will the processor have adequate power to keep those ports ON in Sleep mode (Note: when the Timer0 is OFF - before interrupt and after the Timer0 is cleared to get ready for next interrupt to run it again)

Kindly give me your suggestions on my ideas …

Please feel free to let me know for any additional information needed for your understanding...
1)Is the way i am using the P3.2 is fine for my application?

2) If any one could give me the exact delay time to be imposed for reading IE0 flag (To produce de-bounce) it would be of help to me …

3) Also tell me whether the de-bounce could be achieved by using only a hardware circuit alone… (An RC network for the switch causing interrupt with appropriate Time delay…)

Thanks for your Support :)








List of 21 messages in thread
TopicAuthorDate
Doubts regarding AT89C51 Port Usage            01/01/70 00:00      
   Answers            01/01/70 00:00      
   your suggestions were useful            01/01/70 00:00      
      Central ground star point            01/01/70 00:00      
   doubts            01/01/70 00:00      
      Why using an interrupt?            01/01/70 00:00      
         use an interrupt for debounce, not key            01/01/70 00:00      
   This is what iam going on with            01/01/70 00:00      
      Why even consider sleep mode for a machi            01/01/70 00:00      
         can RC network eleminate bounce            01/01/70 00:00      
            nope, you will be hanging at the noise m            01/01/70 00:00      
               Debounce            01/01/70 00:00      
            Possible, but...            01/01/70 00:00      
      What else does your program?            01/01/70 00:00      
         outside of 50 sec slot            01/01/70 00:00      
            do I get it right            01/01/70 00:00      
               yes            01/01/70 00:00      
                  ttthhattsss all fffolks            01/01/70 00:00      
   here is my code            01/01/70 00:00      
      I did not ask that            01/01/70 00:00      
      Avoid my previous post "here is my code"            01/01/70 00:00      

Back to Subject List