SlideShare a Scribd company logo
1 of 1
Giả sử có 2 led 7 đoạn. Mục đích là đế hiển thị cùng lúc số trên cả 2 led khi chỉ nối
vào 1 Port, mặc định điều này là không thể tuy nhiên ta lợi dụng sự lưu ảnh
của mắt để bật tắt các led trong 1 khoảng thời gian rất ngắn.

Cả 2 led (LED1, LED2) đều nối cùng 1 port (PORT0 là ví dụ).
Chân dp của mỗi led được nối theo thứ tự là P3.0 và P3.1 thông qua NPN transistor.
------ NPN transistor : khi cung cấp 1 điện thế cao (aka 1) vào đầu B thì dòng sẽ đi
từ E đến C, ở mức điện thế thấp thì không. Do đó có thể dùng NPN transistor để điều
khiển đóng ngắt các LED. PNP trans thì ngược lại, ở điện thế thấp (aka 0) thì dòng sẽ
đi từ E đến C.

Cơ chế quét :

Ngắt cả 2 LED (P3.0 = 0, P3.1 = 0)
Xuất tín hiệu số cho (LED1).
Bật LED1 (P3.0 = 1)
DELAY 1 KHOẢNG THỜI GIAN RẤT NGẮN.
Ngắt cả 2 LED (hoặc chỉ là P3.0)
Xuất tín hiệu số cho LED2.
Bật LED2 (P3.0 = 2)
DELAY 1 KHOẢNG THỜI GIAN RẤT NGẮN.

Quá trình này lặp đi lặp lại trong khoảng thời gian rất ngắn nên mắt không thể nhận
biết được sự bật tắt của các led, do đó, ta đạt được mục đích đề ra.

More Related Content

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Giả sử có 2 led 7 đoạn

  • 1. Giả sử có 2 led 7 đoạn. Mục đích là đế hiển thị cùng lúc số trên cả 2 led khi chỉ nối vào 1 Port, mặc định điều này là không thể tuy nhiên ta lợi dụng sự lưu ảnh của mắt để bật tắt các led trong 1 khoảng thời gian rất ngắn. Cả 2 led (LED1, LED2) đều nối cùng 1 port (PORT0 là ví dụ). Chân dp của mỗi led được nối theo thứ tự là P3.0 và P3.1 thông qua NPN transistor. ------ NPN transistor : khi cung cấp 1 điện thế cao (aka 1) vào đầu B thì dòng sẽ đi từ E đến C, ở mức điện thế thấp thì không. Do đó có thể dùng NPN transistor để điều khiển đóng ngắt các LED. PNP trans thì ngược lại, ở điện thế thấp (aka 0) thì dòng sẽ đi từ E đến C. Cơ chế quét : Ngắt cả 2 LED (P3.0 = 0, P3.1 = 0) Xuất tín hiệu số cho (LED1). Bật LED1 (P3.0 = 1) DELAY 1 KHOẢNG THỜI GIAN RẤT NGẮN. Ngắt cả 2 LED (hoặc chỉ là P3.0) Xuất tín hiệu số cho LED2. Bật LED2 (P3.0 = 2) DELAY 1 KHOẢNG THỜI GIAN RẤT NGẮN. Quá trình này lặp đi lặp lại trong khoảng thời gian rất ngắn nên mắt không thể nhận biết được sự bật tắt của các led, do đó, ta đạt được mục đích đề ra.