จำนวนชิ้น | ส่วนลดต่อชิ้น | ราคาสุทธิต่อชิ้น |
{{(typeof focus_pdata.price_list[idx+1] == 'undefined')?('≥ '+price_row.min_quantity):((price_row.min_quantity < (focus_pdata.price_list[idx+1].min_quantity - 1))?(price_row.min_quantity+' - '+(focus_pdata.price_list[idx+1].min_quantity - 1)):price_row.min_quantity)}} | {{number_format(((focus_pdata.price_old === null)?focus_pdata.price:focus_pdata.price_old) - price_row.price,2)}} บาท | {{number_format(price_row.price,2)}} บาท |
คงเหลือ | ชิ้น |
จำนวน (ชิ้น) |
- +
|
ซื้อเลย หยิบลงตะกร้า ซื้อเลย หยิบลงตะกร้า คุณมีสินค้าชิ้นนี้ในตะกร้า 0 ชิ้น
ช่องทางสั่งซื้ออื่น ๆ
|
|
|
|
คุยกับร้านค้า | |
{{ size_chart_name }} |
|
หมวดหมู่ | shift registor |
สภาพ | สินค้าใหม่ |
เพิ่มเติม | |
สภาพ | สินค้ามือสอง |
เกรด | |
สถานะสินค้า | |
ระยะเวลาจัดเตรียมสินค้า | |
เข้าร่วมโปรโมชั่น | |
ข้อมูล |
น้ำหนัก
บาร์โค้ด
ลงสินค้า
อัพเดทล่าสุด
|
รายละเอียดสินค้า |
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<2> shift; ShiftIn<1> 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. 2>![]() |
เงื่อนไขอื่นๆ |
|
Tags |
หน้าที่เข้าชม | 2,073,199 ครั้ง |
ผู้ชมทั้งหมด | 1,333,925 ครั้ง |
ร้านค้าอัพเดท | 8 ก.ย. 2568 |