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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/11/99 17:09
Read: times


 
#710 - URGENT !!! Please help !
Hello !
I have a problem with a 16 Bit operation:

Two Leds: Y0 Y1

Led Y0 is connected to P1.0 and Led Y1 is connected to P1.1 . I want to measure the time of an impulse and use Timer2 of the SAB50535. After measuring the CC4-Register (CC4L/CCH4) contains the HIGH -value. Now I have to test one of the following conditions:

Signal < 1ms : Y0=0 Y1=0
1ms < Signal < 2ms : Y0=1 Y1=0
2ms < Signal : Y0=1 Y1=1

You can see that a certain combination belongs to each interval. The timer-value is divided in a low- and high-byte (CCL4 and CCH4). How can I program the above test ??? Till now I substract the high-byte of the 1ms from the high-byte from the timer-value and do the same with the low-bytes. In the end I test if the carry-flag is set and make one of the above decisions for Y0 and Y1. Is there any possibility to make the decision easier ??? What would you do ?

I would be very grateful if you can answer me soon because I have a test at Tuesday !!! Of course you can mail me if you want :-) !!

Thanks

Gunnar !

List of 2 messages in thread
TopicAuthorDate
URGENT !!! Please help !            01/01/70 00:00      
RE: URGENT !!! Please help !            01/01/70 00:00      

Back to Subject List