กลับไปหน้ารวมไฟล์
arduino-7-segment-number-counting-with-anode-and-cathode-5e85a1.md

โปรเจกต์นี้มีวัตถุประสงค์เพื่อไม่ให้โค้ดที่ไม่ถูกต้องแพร่กระจายไปทั่วอินเทอร์เน็ต แต่ถึงกระนั้น ในการดำเนินการนี้ คุณจะต้องมี 7 segment display และผังวงจร (schematics) ของ 7 segment display นั้น หวังว่าจะเป็นแบบ Anode หรือ Cathode และต่อ GND หรือ VCC ผ่านตัวต้านทาน 1k ส่วนอื่น ๆ ให้ทำตามผังวงจร โดยกำหนดค่า INT const <ตัวอักษรสำหรับ segment ของ display> <และขาที่เชื่อมต่อ>

รายละเอียดทางเทคนิคเพิ่มเติม

พื้นฐานลอจิกทศนิยมแบบ Multiplexed

คู่มือทางเทคนิคสำหรับการใช้งาน 7-segment displays อย่างเชี่ยวชาญ ครอบคลุมความแตกต่างระหว่างสถาปัตยกรรมแบบ Common Anode และ Common Cathode

  • Bipolar Transistor Switching Matrix: สาธิตวิธีการใช้ ทรานซิสเตอร์ BC547 (NPN) หรือ BC557 (PNP) เพื่อสลับขา Common ที่ใช้กระแสสูงของ display ซึ่งช่วยป้องกัน Arduino จากการดึงกระแสเกินขนาดในระหว่างการแสดงผลตัวเลขเต็มรูปแบบ
  • Bitwise Multi-Digit Decoding: นำเสนอ lookup table ในซอฟต์แวร์ ซึ่งแต่ละตัวเลข (0-9) ถูกแทนด้วย single byte โดย Arduino ใช้ฟังก์ชัน bitRead() เพื่อส่งพัลส์ไปยังขาที่ถูกต้องสำหรับตัวเลขแต่ละตัวอย่างรวดเร็ว

ประสิทธิภาพ

  • Flicker-Free Multiplexing: มี "Scan-Rate" kernel ขนาด 5ms โดยการสลับผ่านตัวเลขทั้งสี่หลักอย่างรวดเร็วจนตาไม่สามารถรับรู้ได้ Arduino จะสร้างการแสดงผลตัวเลข 4 หลักที่เสถียรและต่อเนื่อง

ข้อมูล Frontmatter ดั้งเดิม

title: "Arduino 7 segment Number counting with Anode and Cathode"
description: "Control a 7 segments display with a simple counting from 0 to 9!"
author: "mlg50man"
category: ""
tags:
  - "lights"
  - "clocks"
  - "monitoring"
views: 1998
likes: 0
price: 99
difficulty: "Intermediate"
components:
  - "1x Resistor 1k ohm"
  - "1x Arduino UNO"
  - "1x 7 Segment LED Display, InfoVue"
  - "1x Jumper wires (generic)"
tools: []
apps:
  - "1x Arduino IDE"
  - "1x Arduino Web Editor"
downloadableFiles:
  - "https://create.arduino.cc/editor/mlg50man/7b36c803-f0f2-41fe-a540-1dba1553a8e6/preview"
  - "https://create.arduino.cc/editor/mlg50man/4aa27c1c-02c3-4034-b65d-ee426fc471db/preview"
  - "https://create.arduino.cc/editor/mlg50man/7b36c803-f0f2-41fe-a540-1dba1553a8e6/preview"
documentationLinks: []
passwordHash: "49bdbd0cd7b4f72443c0caac92c01bccc1a200e4737a298f3b2685f3046e8418"
encryptedPayload: "U2FsdGVkX19mTELgvjGixS/0UWYUbvHtp6cft41/t58pgZYw5IuGcifD10u8W+JHkXHbmmHu5P4bTwMDUX4qwocTbRJoo/NIBFK3j6p2Eoa02qbnXy7qFJZ/aBdGh8Mw"
seoDescription: "Learn Arduino 7 segment Number counting using Anode and Cathode. Simple guide to control 7 segments display from 0 to 9."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/arduino-7-segment-number-counting-with-anode-and-cathode-5e85a1_cover.jpg"
lang: "th"