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/12 11:59
Read: times


 
#185347 - Simple approach
Responding to: ???'s previous message
Hi Stefan,
Thanks for your advice on individual bit select and I think know what you mean about it being too much like HLL now, kind of..

What I have done now, since I’m using assembly, is I’m just going to make it dead simple.

Here is some code

;Inputs: MUX_1, MUX_2, MUX_3, MUX_4, MUX_5, MUX_6, MUX_7, MUX_8
;Outputs: MESS_1, MESS_2

MESS_1 DATA 0x10
MESS_2 DATA 0x11
; MUX_1 through 8 will all each contain a value from RES_1 through RES_4
MUX_1 DATA 0x20
.....
MUX_8 DATA 0x27

RES_1 EQU 0x00
...
RES_4 EQU 0x03

CALL MESS_MAKER

MESS_MAKER:
PUSH ACC
CLR ACC
MOV C, MUX_1.0
RRC A
MOV C, MUX_1.1
RRC A
MOV C, MUX_2.0
RRC A
.....
MOV C, MUX_4.1
RRC A

MOV A MESS_1
CLR A

; I repeat this for MUX_4 through MUX_8 and save to MESS_2

 


Nice, simple and it looks like it works so far


List of 40 messages in thread
TopicAuthorDate
Assembly coding micro-converters            01/01/70 00:00      
   Code indented            01/01/70 00:00      
      Assemblers often have different syntax            01/01/70 00:00      
         Assembler            01/01/70 00:00      
            Why not use Keil A51 ?            01/01/70 00:00      
               why assembler?            01/01/70 00:00      
                  Libraries?!?!?            01/01/70 00:00      
                     Libraries good, but not always best            01/01/70 00:00      
                        Ok back to Data and Bit            01/01/70 00:00      
                           Manual            01/01/70 00:00      
                           ok back            01/01/70 00:00      
                              I C            01/01/70 00:00      
               Keil A51            01/01/70 00:00      
                  junk downloaders            01/01/70 00:00      
                  take a look at ASEM51            01/01/70 00:00      
                     asem-51 macros            01/01/70 00:00      
                        You don't have to use 'em            01/01/70 00:00      
                  re-think about tools            01/01/70 00:00      
                     ADuC842            01/01/70 00:00      
                        learn            01/01/70 00:00      
                           There are PLENTY of debuggers ...            01/01/70 00:00      
                              Documentation            01/01/70 00:00      
                                 interrupt vectors            01/01/70 00:00      
                                 Memo to Reinhard Keil            01/01/70 00:00      
                                 Keil docs are not bad.            01/01/70 00:00      
                                 Well ... Last time I had questions about ASEM51 ...            01/01/70 00:00      
                                    the good and the bad            01/01/70 00:00      
                                       Well, I must have mistyped            01/01/70 00:00      
                                          asem/asm            01/01/70 00:00      
                                          linker support?            01/01/70 00:00      
                                             it's provided by ASEM-51, I suppose            01/01/70 00:00      
   Ok back to the task at hand            01/01/70 00:00      
      make it easy for yourself            01/01/70 00:00      
         I’m afraid the hard ware is non negotiable            01/01/70 00:00      
            well, ....            01/01/70 00:00      
               Dinosours, I2Cs, Gang-bang???            01/01/70 00:00      
                  1st            01/01/70 00:00      
                     Simple approach            01/01/70 00:00      
                        yes            01/01/70 00:00      
                           For Free :-)            01/01/70 00:00      

Back to Subject List