Computers & Accessories
IC ขยายขาสัญญาณอินพุต 74HC165 แบบ DIP
฿15.00
ราคาจากข้อมูลล่าสุด 09/09/2026 17:16 อาจต่างจากราคาปัจจุบัน
ดูสินค้าที่ร้านค้าเราอาจได้รับค่าตอบแทนเมื่อมีการซื้อผ่านลิงก์นี้ คุณทำรายการซื้อขายกับร้านค้าปลายทางโดยตรง
ข้อมูลสินค้าในที่เดียวอ่านประสบการณ์ก่อนเลือกเช็กเงื่อนไขจากร้านค้า
รู้จักสินค้านี้
IC 74HC165 เป็น IC ขยายขาสัญญาณกรณีต้องการใช้อินพุตจำนวนเยอะโดยใช้อินพุตจากไมโครคอนโทรลเลอร์เพียงแค่ 4 ขา แต่สามารถอ่านสัญญาณ digital ได้ถึง 8 ขา
ตัวอย่างการต่อ Arduino กับ Shift register 74HC165
ตัวอย่าง Code Arduino กับ Shift register 74HC165
โหลด Library จาก https://github.com/InfectedBytes/ArduinoShiftIn
#include ShiftIn.h> // Init ShiftIn instance with one chip. // The number in brackets defines the number of daisy-chained 74HC165 chips // So if you are using two chips, you would write: ShiftIn shift; ShiftIn1> shift; void setup() { Serial.begin(9600); // declare pins: pLoadPin, clockEnablePin, dataPin, clockPin shift.begin(8, 9, 11, 12); } void displayValues() { for (int i = 0; i shift.getDataWidth(); i++) Serial.print( shift.state(i) ); // get state of button i Serial.println(); } void loop() { if (shift.update()) // read in all values. returns true if any button has changed displayValues(); delay(1); }
Shift Register 74HC165
The 74HC165 is an 8-bit serial-in shift register. It uses only 4 Arduino pins, while itself can read in from 8 digital pins. If the parallel load pin (PL) is LOW, the data is read from the A to H pins in parallel. When PL is HIGH, the Q pin is set to the value of the first bit. Each time you change the value from your clock pin from LOW to HIGH, the next bit is send to the Q pin. Therefore you can read in all 8 bits sequentially. Furthermore you can daisy-chain several shift registers, while still using only 4 Arduino pins!
The data sheet can be found here: SN74HC165
ShiftIn Library
In order to simplify the usage of shift registers, I wrote a small library that handles the communication between the Arduino and the shift register. It is hosted on Github.
เรื่องเล่าจากชุมชน
เขียนรีวิว ↗ประสบการณ์จากผู้ใช้
เป็นคนแรกที่เล่าประสบการณ์
ชอบอะไร มีข้อสังเกตตรงไหน? เรื่องเล่าของคุณช่วยให้คนอื่นเลือกได้ดีขึ้น