The 2N5307 is a Darlington transistor

User Generated

Cflpubm_94

Programming

Description

Connect a push button switch to P3.4 and an 8Ω speaker to P1.0 as shown below. The 2N5307 is a Darlington transistor pair which has a current gain of β > 2000 and its collector current can be up to 1.2 amps. If you output a square wave on P1.0 at frequency fo you will hear a tone on the speaker with a base frequency fo plus odd harmonic overtones. For this assignment write the assembly-code to output an A-note (about 440Hz) in response to the push button on P3.4. Your assembly code must contain a subroutine which does the software time delay and a macro which output a bit to P3.4.


It has to be an 8bit code

Include Comments on what does what



The code should start with:

MainSeg SEGMENT CODE

CSEG at 0

ljmp Start

RSEG MainSeg

Start:



The program should be working on the following:


Keil uVision5

AT89C51CC03 board 8bit microcontroller

Flip 3.4.7


How to start a project?

https://www.dropbox.com/s/lt7rjkflcksko3k/uVision5.pdf?dl=0


Code examples:

https://www.dropbox.com/s/4mot8ed03bee0q0/Day4.pdf?dl=0


Unformatted Attachment Preview

EE 354 Assignment 2 Playing notes Sept. 8, 2018 Due: Sept. 19, 2017 Connect a push button switch to P3.4 and an 812 speaker to P1.0 as shown below. The 2N5307 is a Darlington transistor pair which has a current gain of ß > 2000 and its collector current can be up to 1.2 amps. If you output a square wave on P1.0 at frequency fo you will hear a tone on the speaker with a base frequency fo plus odd harmonic overtones. For this assignment write the assembly-code to output an A-note (about 440Hz) in response to the push button on P3.4. Your assembly code must contain a subroutine which does the software time delay and a macro which output a bit to P3.4. +5 +5 1K 1000 P3.4 8Q speaker 2N5307 P1.0-W 51002 Do a demo of your program in class on the due date and turn in the following: 1. A cover sheet with your name, assignment number, and the date turned in. 2. A hard copy of your commented assembly-code
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Check the program

; This program uses a macro for output a bit in P1.0
; and uses a subroutine for do a delay to create 440Hz
MyCode SEGMENT CODE
; Mac...


Anonymous
Goes above and beyond expectations!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags