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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/28/07 11:53
Read: times


 
#142489 - my code to display on 6 digit display
Responding to: ???'s previous message
hello sir!!!
You are right i m developing code for weighing machine which is used both for low and high range as well.
Below i have written sample code which which converts my count to 6 ASCII.
Now further i would also make it to display on 6 seven segment using look up table concept.
Please guide me through.. Thanking you


org 0000h
ljmp start

start:
mov sp,#2fh
mov r2,low(cout_from_ADC) ;;;;;;;;;;;;;;;;;;it is count from ICL7135 stored in TLO and THO;;;;;;;;;;;;;;;;;;;;

mov r3,#high(count_from_ADC)
lcall BINTOASC

BINTOASC:
mov r0,#30h
mov dptr,#REFRENCE

REPEAT:
clr a
movc a,@a+dptr
mov r7,a
inc dptr
clr a
movc a,@a+dptr
mov r6,a

mov r4,#'0'

AGAIN_SUB:
clr c
mov a,r2
subb a,r6 ;subtract dw from count
mov r2,a

mov a,r3
subb a,r7
mov r3,a
jc MOV_COUNT ;check for borrow(if Y store r4)
inc r4 ;(if N incr. r4 and again sub
sjmp AGAIN_SUB ; remaing value from dw)

MOV_COUNT:
mov a,r4
mov @r0,a ; store r4 in RAM

mov a,r2 ; obtain orginal count
add a,r6
mov r2,a

mov a,r3
addc a,r7
mov r3,a

inc r0
movc a,@a+dptr ; inc dptr to point next dw
cjne a,#1,INC_DPTR
RET

INC_DPTR:
inc dptr
ljmp REPEAT

REFRENCE:
dw 100000
dw 10000
dw 1000
dw 100
dw 10
dw 1

List of 41 messages in thread
TopicAuthorDate
ICL7135 count read with its CLOCK pin?            01/01/70 00:00      
   What do you plane to learn from the clock?            01/01/70 00:00      
      asm code            01/01/70 00:00      
         You didn't answer the fundamental question            01/01/70 00:00      
         You have missed the point ...            01/01/70 00:00      
            No, Richard you have missed the point            01/01/70 00:00      
               It seems you\'re right!            01/01/70 00:00      
                  RE: to Richard Erlacher            01/01/70 00:00      
                     Come on ... don\'t you want to do any work at all?            01/01/70 00:00      
                        Truly, a budding manager...            01/01/70 00:00      
   See the clock and integrator waveform            01/01/70 00:00      
      What are you good at?            01/01/70 00:00      
         It is not            01/01/70 00:00      
            Elementary simple Erik            01/01/70 00:00      
               Missed the point!            01/01/70 00:00      
            Clock biting? Hhm...            01/01/70 00:00      
               OH            01/01/70 00:00      
                  Wait a minute...            01/01/70 00:00      
                     no, it was ~12MHz (uC) and 20kHz            01/01/70 00:00      
                  One swallow doesnt make a summer            01/01/70 00:00      
                     well if you are happy with one bit less of precisi            01/01/70 00:00      
                        One's view depends on how you at it!            01/01/70 00:00      
                           that does not improve precision            01/01/70 00:00      
                              Please refresh your knowledge of Legal accuracy            01/01/70 00:00      
                                 this is nonsense            01/01/70 00:00      
               What's "Clock Biting?"            01/01/70 00:00      
                  clock biting            01/01/70 00:00      
                     Duty Cycle "biting" doesnt have effect on this            01/01/70 00:00      
                        can't you READ?            01/01/70 00:00      
                     I see ... so it's like "frame slip" in comm's            01/01/70 00:00      
         my test asm code to count ADC value of ICL7135            01/01/70 00:00      
            Code wont work properly            01/01/70 00:00      
   thnks for suggestion            01/01/70 00:00      
      6 Digits?            01/01/70 00:00      
         RE: 6 digit reason..            01/01/70 00:00      
            CHEAT            01/01/70 00:00      
               Use extra digits for something useful            01/01/70 00:00      
                  How 6 digit matter?            01/01/70 00:00      
                     my code to display on 6 digit display            01/01/70 00:00      
            Just ignore the spare one!            01/01/70 00:00      
            left-justify the display            01/01/70 00:00      

Back to Subject List