SlideShare a Scribd company logo
1 of 16
Download to read offline
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
 
Introduction to Integrated Circuits
Introduction to Integrated CircuitsIntroduction to Integrated Circuits
Introduction to Integrated CircuitsGurpawan 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 LogicRon Liu
 
Microprocessor based system design
Microprocessor based system designMicroprocessor based system design
Microprocessor based system designTHANDAIAH 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
EngineerRon 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-07Ron Liu
 
book digest: product design and development
book digest: product design and developmentbook digest: product design and development
book digest: product design and developmentRon 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 OpenRon Liu
 
Day4 順序控制的循序邏輯實現
Day4 順序控制的循序邏輯實現Day4 順序控制的循序邏輯實現
Day4 順序控制的循序邏輯實現Ron Liu
 
Day3 Quartus II Tutorial
Day3 Quartus II TutorialDay3 Quartus II Tutorial
Day3 Quartus II TutorialRon Liu
 
Day3 實驗板介紹
Day3 實驗板介紹Day3 實驗板介紹
Day3 實驗板介紹Ron Liu
 
Day2 Verilog HDL Basic
Day2 Verilog HDL BasicDay2 Verilog HDL Basic
Day2 Verilog HDL BasicRon Liu
 
Day2 Intro. Model Sim
Day2 Intro. Model SimDay2 Intro. Model Sim
Day2 Intro. Model SimRon Liu
 
Day2 Logic Circuits
Day2 Logic CircuitsDay2 Logic Circuits
Day2 Logic CircuitsRon Liu
 
Day2 Open
Day2 OpenDay2 Open
Day2 OpenRon Liu
 
Day1 Lab1
Day1 Lab1Day1 Lab1
Day1 Lab1Ron Liu
 
Day1 02.Introduction
Day1 02.IntroductionDay1 02.Introduction
Day1 02.IntroductionRon Liu
 
Day1 CourseIntroduction
Day1 CourseIntroductionDay1 CourseIntroduction
Day1 CourseIntroductionRon Liu
 
Free Lunch Talk Ron Nov 08
Free Lunch Talk Ron Nov 08Free Lunch Talk Ron Nov 08
Free Lunch Talk Ron Nov 08Ron 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

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Recently uploaded (20)

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

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: