![]() Hardware SPI gives you CLK and DATA, but costs you an ENABLE pin to make the '165 share the pins with a real SPI device. The actual data transfer between a 74HC165 and a microcontroller takes three pins: LATCH, CLK, and DATA. In this case, the main advantage of using hardware SPI over shiftIn() is pin count, but the difference is only one pin. In the spirit of better late than never, here's what I had: Looks like you beat me to the solution while I was writing a reply. I'm sorry if it's horrendously obvious but I have been failing to spot a problem for many hours, any help would be greatly appreciated. When I connect the the arduino to the buffer out I get the correct data values for switches 1-7 but switch 8 sets the data as 255 it doesn't matter if it's on it's own or not it will always give 255. Like I said earlier if I connect arduino pin 12 to the data out (Q7) the values are all correct. The connections between the 2 chips are as follows: I am attempting to use a 74hc125 chip to tri-state the output. However I need to tri-state the chip as the nrf905 module I'm using also uses the SPI bus and without tri-stating the chip I cannot send or receive data which makes the circuit useless because I need to send data. If I connect my arduino to the 165s data out I receive the correct values for all switches. On it's own both the code and 74hc165 circuit work fine. I am using a 74hc165 shift register with 8 dip switches to set an address in my code for an rf module. I am having a rather peculiar issue with my circuit. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |