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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/06/06 13:36
Read: times


 
#106696 - 16 bit to 8 bit
Hi guys


I've a problem:

I want to convert a 16 bit number into to two 8 bit numbers.
in former times i used the following method for splitting but i think this only works with 8 bit to 4 bit

;-------------------------------------------------
source code:

MOV R0,#11001011 ;8 bit number
MOV Lownible, A ;copy R0 into Lownible
ANL DnibL, #00001111b ;Boolean logic operation
SWAP A ;swap acc
MOV Highnible, A ;same with highnible
ANL Highnible, #00001111b
;---------------------------------------------------

Now i splitted my 8 bit number into two 4 bit numbers.
But does this work with 16 bit to 8 bit. Of course i tried this Method but Keil always warns be because of truncating value to 8 bits !!

Does anyone can help me ????


MAX




List of 16 messages in thread
TopicAuthorDate
16 bit to 8 bit            01/01/70 00:00      
   the only 16 bit register in th1 '51 is t            01/01/70 00:00      
      using relocatable segment            01/01/70 00:00      
         it is not Keil, it is the processor            01/01/70 00:00      
            SMS            01/01/70 00:00      
               TIA            01/01/70 00:00      
                  Hope This Helps            01/01/70 00:00      
                     RTFM (please read)            01/01/70 00:00      
                        That may be what you mean but            01/01/70 00:00      
               well, I did not            01/01/70 00:00      
                  Didn't know            01/01/70 00:00      
                     that I do            01/01/70 00:00      
                        Just goes to prove my point            01/01/70 00:00      
                           Is that an excuse for not trying to make            01/01/70 00:00      
                              Its a hint            01/01/70 00:00      
                              Hope That Helps            01/01/70 00:00      

Back to Subject List