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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/09/03 23:55
Read: times


 
#38680 - RE: check code for 7-segment display
Responding to: ???'s previous message
Waqar,
That will work, but this is neater.
SEGMENT: DB 13,17,2,3,45,126,122,135
; all garbage, you need to sort out the mapping
;Yourself

;Let A contain the display value

MOV DPTR,#segment  ;puts the address of the ;1st element of segment in DPTR
MOVC A,@A+DPTR
MOV P1,A

This jumps into the SEGMENT table and takes the value at the nth position as the data for your segments.
 


Steve

List of 5 messages in thread
TopicAuthorDate
check code for 7-segment display            01/01/70 00:00      
   RE: check code for 7-segment display            01/01/70 00:00      
      RE: check code for 7-segment display            01/01/70 00:00      
   RE: check code for 7-segment display            01/01/70 00:00      
   RE: check code for 7-segment display            01/01/70 00:00      

Back to Subject List