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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/29/09 21:03
Read: times


 
#172024 - I think this may help
Responding to: ???'s previous message
I don't know what is your problem ... but i used this IC before and here is a circuit and a code program with informative comments for explanation
This circuit and code is for Demonstration.

It takes the status of a DIP switch (( 8-bit )) and send it in serial to a 8051 then send that status to 8 LEDs to check them

Try,it
I think this may help

Sherif Gamal


...
ORG 00H
SJMP START
ORG 30H
START
       CLR A                           ;clear the acc.
       MOV P2,#00000000B               ;clear port 2
       MOV P1,#00000000B               ;clear port 1
       SETB P1.0                       ;send 1 on the load shift pin 
       CLR P1.1                        ;set clock to low level
       CLR P1.3                        ;clear datain pin               
       MOV B,#8                        ;start 8 bit counter
       CLR 1.0                         ;send low bit to load shift
       SETB 1.0                        ;sed hi bit to load shift
       SETB 1.1                        ;set clock bit to hi(first bit is on data pin now)
READ                                   ;start reading routin
       MOV C,P1.3                      ;mov data to carry reg.
       SETB P1.1                       ;start seconed clock
       CLR P1.1                        ;finish the seconed clock
       RRC A                           ;rotate the acc with carry to right
       DJNZ B,READ                     ;decremint the 8 bit counter
       MOV P2,A                        ;send the data parallel to port 2
SJMP READ                              ;go back to read again.
END                                    ;   END 

 





Sherif Gamal

List of 31 messages in thread
TopicAuthorDate
74HC165            01/01/70 00:00      
   Document your code            01/01/70 00:00      
      pen and paper            01/01/70 00:00      
         It's still illegible!            01/01/70 00:00      
            code arranged            01/01/70 00:00      
         Why not format your code?            01/01/70 00:00      
            formatted code            01/01/70 00:00      
   Indentation is very Important            01/01/70 00:00      
      "Insert Program Code" Button            01/01/70 00:00      
   what are the expectations...            01/01/70 00:00      
      and the problem is...            01/01/70 00:00      
         your code is ambiguous            01/01/70 00:00      
            succes...            01/01/70 00:00      
               Pen and paper really is a good method            01/01/70 00:00      
                  Thanks & a weird point...            01/01/70 00:00      
                     Not Weird At All            01/01/70 00:00      
                        load pulse timing            01/01/70 00:00      
                           There's a reason why it doesn't say that ...            01/01/70 00:00      
                           Load Not Triggering a Shift Cycle            01/01/70 00:00      
            Working new code part            01/01/70 00:00      
   I think this may help            01/01/70 00:00      
      Same Problem OP First Had            01/01/70 00:00      
         Responding to: Michael            01/01/70 00:00      
            look at a logic diagram of the '165            01/01/70 00:00      
            Oh dear...            01/01/70 00:00      
               To Kai            01/01/70 00:00      
                  No, it never worked!            01/01/70 00:00      
                     try it            01/01/70 00:00      
                        No, the code will destroy the chips...            01/01/70 00:00      
                           Responding to: Kai Klaas's previous message            01/01/70 00:00      
            Responding to: Sherif            01/01/70 00:00      

Back to Subject List