SlideShare a Scribd company logo
Day3




  LAB
LAB1: 組合邏輯 , LED 模擬控制
                                         實驗板

                                                            LED
                                     A DIP1
                                     B DIP2   logic_block
                                                            D1
                                     C DIP3

C   B   A   logic_out
0   0   0   1
0   0   1   1
0   1   0   1
                        DIP ON = LOW
0   1   1   1
1   0   0   0
                        LED ON when logic_out = LOW
1   0   1   0
1   1   0   0
1   1   1   1
LAB1: 組合邏輯 , LED 模擬控制


        1. LED D1 『 1 』 ---> HIGH

        2. 加入 AND OR LOGIC
        DIP4 & DIP5 ---> LED2
        DIP6 | DIP7 ----> LED3
LAB2: SR Latch 自保回路

                                                            LED
                                    SW1
                                    SW2     SR Latch
                                                            D1




module keep(SW1, SW2, D1);
                                      SW1     SW2
input SW1, SW2; output D1;
reg D1;
always @(SW1 or SW2) begin
    if (!SW1) D1 = 0;      // ON
    else if (!SW2) D1 = 1; // OFF                      D1
end
endmodule
LAB2:


        Warning Message
        加入 ENABLE
LAB3: Counter

                                    LED
                SW1
                      m10 counter
                                    D1

                                    7-seg




  以秒為單位 之 0 ~ 9 counter
  7-seg Display
LAB3: Counter


      00 ~ 99 計數
  ●
  ●

      可預設
  ●

      DIP[8:5] 十位
      DIP[4:1] 個位
LAB4: ledtest 跑馬燈
LAB4: ledtest 跑馬燈


         1. 變慢
         2.
LAB5: PLC Counter + LED Display

SW1: RESET


SW2: INC

                           Counter
                           設定值
                           DIP[8:1]
              LED D1
LAB5:
 PLC Counter + LED Display

                                        LED
             SW1: reset
             SW2: inc
                          plc counter
                                        D1
                   DIP
                                        7-seg
LAB5: PLC Counter + LED Dis-
 play

          1. 由初值往下減
          2. LED 動作反相
LAB6: Timer Delay


                          Delay Timer
                          時間可設定


                                        LED
             SW1: reset
             SW2: inc
                                        D1
                          plc counter

                   DIP
                                        7-seg
LAB6: Timer Delay


         1. 按鍵 RELEASE 偵測
         2. TIMER 設定 最大值限制
LAB6:
Assign Clock

More Related Content

Similar to Day3 Lab

How to hack electronics
How to hack electronics How to hack electronics
How to hack electronics
Planning-ness
 
Arduino
ArduinoArduino
1 7c
1 7c1 7c
Introduction to Integrated Circuits
Introduction to Integrated CircuitsIntroduction to Integrated Circuits
Introduction to Integrated Circuits
Gurpawan Mand
 
LED Cube Presentation Slides
LED Cube Presentation Slides LED Cube Presentation Slides
LED Cube Presentation Slides
Projects EC
 
Day2.Combinational Logic
Day2.Combinational LogicDay2.Combinational Logic
Day2.Combinational Logic
Ron Liu
 
Microprocessor based system design
Microprocessor based system designMicroprocessor based system design
Microprocessor based system design
THANDAIAH PRABU
 

Similar to Day3 Lab (7)

How to hack electronics
How to hack electronics How to hack electronics
How to hack electronics
 
Arduino
ArduinoArduino
Arduino
 
1 7c
1 7c1 7c
1 7c
 
Introduction to Integrated Circuits
Introduction to Integrated CircuitsIntroduction to Integrated Circuits
Introduction to Integrated Circuits
 
LED Cube Presentation Slides
LED Cube Presentation Slides LED Cube Presentation Slides
LED Cube Presentation Slides
 
Day2.Combinational Logic
Day2.Combinational LogicDay2.Combinational Logic
Day2.Combinational Logic
 
Microprocessor based system design
Microprocessor based system designMicroprocessor based system design
Microprocessor based system design
 

More from Ron Liu

Engineer
EngineerEngineer
Engineer
Ron Liu
 
Start up nations
Start up nationsStart up nations
Start up nationsRon Liu
 
XXX-Company-my viewpoints-2011-03-07
XXX-Company-my viewpoints-2011-03-07XXX-Company-my viewpoints-2011-03-07
XXX-Company-my viewpoints-2011-03-07
Ron Liu
 
book digest: product design and development
book digest: product design and developmentbook digest: product design and development
book digest: product design and development
Ron Liu
 
The Hero Within
The Hero WithinThe Hero Within
The Hero WithinRon Liu
 
About Thinking
About ThinkingAbout Thinking
About ThinkingRon Liu
 
書摘Teach Your Child How To Think
書摘Teach Your Child How To Think書摘Teach Your Child How To Think
書摘Teach Your Child How To ThinkRon Liu
 
Day3 順序控制的組合邏輯實現
Day3 順序控制的組合邏輯實現Day3 順序控制的組合邏輯實現
Day3 順序控制的組合邏輯實現Ron Liu
 
Day4 Open
Day4 OpenDay4 Open
Day4 Open
Ron Liu
 
Day4 順序控制的循序邏輯實現
Day4 順序控制的循序邏輯實現Day4 順序控制的循序邏輯實現
Day4 順序控制的循序邏輯實現
Ron Liu
 
Day3 Quartus II Tutorial
Day3 Quartus II TutorialDay3 Quartus II Tutorial
Day3 Quartus II Tutorial
Ron Liu
 
Day3 實驗板介紹
Day3 實驗板介紹Day3 實驗板介紹
Day3 實驗板介紹
Ron Liu
 
Day2 Verilog HDL Basic
Day2 Verilog HDL BasicDay2 Verilog HDL Basic
Day2 Verilog HDL Basic
Ron Liu
 
Day2 Intro. Model Sim
Day2 Intro. Model SimDay2 Intro. Model Sim
Day2 Intro. Model Sim
Ron Liu
 
Day2 Logic Circuits
Day2 Logic CircuitsDay2 Logic Circuits
Day2 Logic Circuits
Ron Liu
 
Day2 Open
Day2 OpenDay2 Open
Day2 Open
Ron Liu
 
Day1 Lab1
Day1 Lab1Day1 Lab1
Day1 Lab1
Ron Liu
 
Day1 02.Introduction
Day1 02.IntroductionDay1 02.Introduction
Day1 02.Introduction
Ron Liu
 
Day1 CourseIntroduction
Day1 CourseIntroductionDay1 CourseIntroduction
Day1 CourseIntroduction
Ron Liu
 
Free Lunch Talk Ron Nov 08
Free Lunch Talk Ron Nov 08Free Lunch Talk Ron Nov 08
Free Lunch Talk Ron Nov 08
Ron Liu
 

More from Ron Liu (20)

Engineer
EngineerEngineer
Engineer
 
Start up nations
Start up nationsStart up nations
Start up nations
 
XXX-Company-my viewpoints-2011-03-07
XXX-Company-my viewpoints-2011-03-07XXX-Company-my viewpoints-2011-03-07
XXX-Company-my viewpoints-2011-03-07
 
book digest: product design and development
book digest: product design and developmentbook digest: product design and development
book digest: product design and development
 
The Hero Within
The Hero WithinThe Hero Within
The Hero Within
 
About Thinking
About ThinkingAbout Thinking
About Thinking
 
書摘Teach Your Child How To Think
書摘Teach Your Child How To Think書摘Teach Your Child How To Think
書摘Teach Your Child How To Think
 
Day3 順序控制的組合邏輯實現
Day3 順序控制的組合邏輯實現Day3 順序控制的組合邏輯實現
Day3 順序控制的組合邏輯實現
 
Day4 Open
Day4 OpenDay4 Open
Day4 Open
 
Day4 順序控制的循序邏輯實現
Day4 順序控制的循序邏輯實現Day4 順序控制的循序邏輯實現
Day4 順序控制的循序邏輯實現
 
Day3 Quartus II Tutorial
Day3 Quartus II TutorialDay3 Quartus II Tutorial
Day3 Quartus II Tutorial
 
Day3 實驗板介紹
Day3 實驗板介紹Day3 實驗板介紹
Day3 實驗板介紹
 
Day2 Verilog HDL Basic
Day2 Verilog HDL BasicDay2 Verilog HDL Basic
Day2 Verilog HDL Basic
 
Day2 Intro. Model Sim
Day2 Intro. Model SimDay2 Intro. Model Sim
Day2 Intro. Model Sim
 
Day2 Logic Circuits
Day2 Logic CircuitsDay2 Logic Circuits
Day2 Logic Circuits
 
Day2 Open
Day2 OpenDay2 Open
Day2 Open
 
Day1 Lab1
Day1 Lab1Day1 Lab1
Day1 Lab1
 
Day1 02.Introduction
Day1 02.IntroductionDay1 02.Introduction
Day1 02.Introduction
 
Day1 CourseIntroduction
Day1 CourseIntroductionDay1 CourseIntroduction
Day1 CourseIntroduction
 
Free Lunch Talk Ron Nov 08
Free Lunch Talk Ron Nov 08Free Lunch Talk Ron Nov 08
Free Lunch Talk Ron Nov 08
 

Recently uploaded

Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 

Day3 Lab

  • 2. LAB1: 組合邏輯 , LED 模擬控制 實驗板 LED A DIP1 B DIP2 logic_block D1 C DIP3 C B A logic_out 0 0 0 1 0 0 1 1 0 1 0 1 DIP ON = LOW 0 1 1 1 1 0 0 0 LED ON when logic_out = LOW 1 0 1 0 1 1 0 0 1 1 1 1
  • 3. LAB1: 組合邏輯 , LED 模擬控制 1. LED D1 『 1 』 ---> HIGH 2. 加入 AND OR LOGIC DIP4 & DIP5 ---> LED2 DIP6 | DIP7 ----> LED3
  • 4. LAB2: SR Latch 自保回路 LED SW1 SW2 SR Latch D1 module keep(SW1, SW2, D1); SW1 SW2 input SW1, SW2; output D1; reg D1; always @(SW1 or SW2) begin if (!SW1) D1 = 0; // ON else if (!SW2) D1 = 1; // OFF D1 end endmodule
  • 5. LAB2: Warning Message 加入 ENABLE
  • 6. LAB3: Counter LED SW1 m10 counter D1 7-seg 以秒為單位 之 0 ~ 9 counter 7-seg Display
  • 7. LAB3: Counter 00 ~ 99 計數 ● ● 可預設 ● DIP[8:5] 十位 DIP[4:1] 個位
  • 9. LAB4: ledtest 跑馬燈 1. 變慢 2.
  • 10. LAB5: PLC Counter + LED Display SW1: RESET SW2: INC Counter 設定值 DIP[8:1] LED D1
  • 11. LAB5: PLC Counter + LED Display LED SW1: reset SW2: inc plc counter D1 DIP 7-seg
  • 12. LAB5: PLC Counter + LED Dis- play 1. 由初值往下減 2. LED 動作反相
  • 13. LAB6: Timer Delay Delay Timer 時間可設定 LED SW1: reset SW2: inc D1 plc counter DIP 7-seg
  • 14. LAB6: Timer Delay 1. 按鍵 RELEASE 偵測 2. TIMER 設定 最大值限制
  • 15. LAB6: