| ??? 05/12/01 03:58 Read: times |
#11531 - RE: Timers&Counters |
Thanx for replying to our counter problem. At present we are not using any sensor but a switch connected to +5v and Ground to generate slow pulses to count events generated manually using the switch.The +5v and Ground are taken from the same power supply feeding the processor. We will try to filter the pulses as suggested by you and report to you tommorow. Meanwhile if you have any other suggestion please write to us. Our program for counting the events is as under:
mov r0,#00 ;initialize the coutner setb p1.0 ;PORT to which switch is connected main: jb p1.0,main;wait until the pin is HIGH inc r0 ;increment the counter mov p0,r0 ;move the counter to PORT to read the value again: jnb p1.0,again;wait until the pin is LOW sjmp main ;repeat the process |
| Topic | Author | Date |
| Timers&Counters | 01/01/70 00:00 | |
| RE: Timers&Counters | 01/01/70 00:00 | |
| RE: Timers&Counters | 01/01/70 00:00 | |
| RE: Timers&Counters | 01/01/70 00:00 | |
| RE: Timers&Counters | 01/01/70 00:00 | |
| RE: Timers&Counters | 01/01/70 00:00 | |
| RE: Timers&Counters | 01/01/70 00:00 | |
| RE: Timers&Counters | 01/01/70 00:00 | |
| RE: Timers&Counters | 01/01/70 00:00 | |
| RE: Timers&Counters | 01/01/70 00:00 | |
| RE: Timers&Counters | 01/01/70 00:00 | |
| RE: Timers&Counters | 01/01/70 00:00 | |
| RE: Timers&Counters | 01/01/70 00:00 | |
| RE: Timers&Counters | 01/01/70 00:00 | |
| RE: Timers&Counters | 01/01/70 00:00 | |
| RE: Timers&Counters | 01/01/70 00:00 | |
| RE: Timers&Counters | 01/01/70 00:00 | |
| RE: Timers&Counters | 01/01/70 00:00 | |
RE: Timers&Counters | 01/01/70 00:00 |



