Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Table of Contents > Week 4 PIC18 Timers and SFRs > COMP551 Wk04 Lab 4 Submission - Two Square Waves COMP551 Wk04 Lab 4 Submission

image text in transcribed
Table of Contents > Week 4 PIC18 Timers and SFRs > COMP551 Wk04 Lab 4 Submission - Two Square Waves COMP551 Wk04 Lab 4 Submission - Two Square Waves Assignment - Two square waves Write a program using Timer0 to generate a square wave with Frequency 1 on PORTB RB2, or Frequency 2 on PORTB RB4, according to your student ID as given in the table below. Use PORTB RB/ as a switch to select the frequencies. If RB/ = 0 (Low), the Frequency 1 square wave will be generated and if RB7 - 1 (High), the Frequency 2 square wave will be generated. When one square wave is generated, the other output pin stays at logic O (low). Calculate and program the Timero count values to achieve frequencies as close as possible to the target values. Use a crystal oscillator frequency fosc = 20 MHz. Examine the PORTS output pins using the MPLAB Logic Analyzer and check the actual times with the Stopwatch. Use the Toggle Stimulus to change the value of PORTB RB/ Student Frequency Frequency ID ends with RB7 = = 0 RB/ = = 1 0-2 300Hz 450Hz 500Hz 650Hz 5 7 550HZ 70OHz 8-9 450HE GOOHE L' Upa ENG 05:03

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions