| ??? 05/20/00 07:06 Read: times |
#2781 - RE: measure of pulse width |
Yes Rauf it works.
I have used similar approach. If you are using four ports to different pins input then o'course you will have to use one common (ored) to generate the interrput. But if all four pulses have to land on the same pin, then it makes your case even simpler and no use of interrupt. Just keep waiting till the pulse Changes its state (from H to L or otherwise), you know what to do, if you allow me it may be like this, pulse bit p1.0 ; or any you like jb pulse,$ ; wait setb tr0 ; start timer jnb pulse,$ ; wait again clr tr0 ; stop timer mov a,tl0 ; copy time low byte to acc call send ; use a serial routine to ; send the byte to terminal copy a,th0 ; repeat for high byte also call send . . . . . . . You will have to correct the result and compensate for time lost during execution of the code its self. If the pulses are of small width then use micro crystal of higher frequency. Good Luck Babar/ PS: You aren't getting back to direct mails ?? |
| Topic | Author | Date |
| measure of pulse width | 01/01/70 00:00 | |
| RE: measure of pulse width | 01/01/70 00:00 | |
RE: measure of pulse width | 01/01/70 00:00 |



