??? 07/31/05 05:25 Read: times |
#98496 - 74hc165 read problem |
hi every one,
i tried to read 74hc165 chip throgh microcontroller but the data i receive is not according to inputs of 74hc165, please see the code and guide where i am wrong. pin 1(l/s) of 74hc165 is connected to port0.2 pin 2(clock) of 74hc165 is connected to port0.1 pin (9&10) of 74hc165 are connected to port0.0 below is routine to read from 74hc165 serial_sensor: push acc clr port0.2 ;load inputs nop nop setb port0.2 mov c,port0.0 ;read d7 rlc a clr port0.1 ;clock nop nop setb port0.1 mov c,port0.0 ;read d6 rlc a clr port0.1 nop nop setb port0.1 mov c,port0.0 rlc a clr port0.1 nop nop setb port0.1 mov c,port0.0 rlc a clr port0.1 nop nop setb port0.1 mov c,port0.0 rlc a clr port0.1 nop nop setb port0.1 mov c,port0.0 rlc a clr port0.1 nop nop setb port0.1 mov c,port0.0 rlc a clr port0.1 nop nop setb port0.1 mov c,port0.0 rlc a mov sensor,a pop acc ret thanks shivani |