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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/08/02 10:15
Read: times


 
#24144 - RE: using shift registers
mahmood Elnasser wrote:
-------------------------------
"1. Why are you using two bytes array, with c language short int is 16 bits and long int is 32 bits, you can make your program take advantage of the int and shift the 16 bits in or out in one for loop."

There is no limitation to use only 1, 2 or 4 shift registers. Using 3, 5, 6, 7 ... bytes was also possible. Thus an array was more flexible as a certain data type (array size = number of the 74HC165 or 74HC595 circuits).

Also mostly every input and output pin has a different meaning. Thus I placed it in the bdata space, so I can access any pin separate like on the ports P0..P3.



"2. are you using 2 8-bit shift registers or did you cascade them to make 1 16-bit shift register?"

Yes, they are cascaded (output from one to input of the next).
The serial input of the first 74HC595 was connected with the pin defined as MOSI and the serial output of the last 74HC165 with MISO.


Peter


List of 16 messages in thread
TopicAuthorDate
8255            01/01/70 00:00      
RE: 8255            01/01/70 00:00      
RE: 8255            01/01/70 00:00      
RE: 8255            01/01/70 00:00      
RE: 8255            01/01/70 00:00      
RE: 8255            01/01/70 00:00      
RE: 8255            01/01/70 00:00      
RE: 8255            01/01/70 00:00      
RE: 8255            01/01/70 00:00      
RE: 8255 / kunal            01/01/70 00:00      
RE: 8255 / kunal            01/01/70 00:00      
using shift registers            01/01/70 00:00      
RE: using shift registers            01/01/70 00:00      
RE: 8255            01/01/70 00:00      
RE: 8255            01/01/70 00:00      
RE: using shift registers            01/01/70 00:00      

Back to Subject List