BS2p Motor Control, Serial Protocol, and DS1302 Interface Example

Verified

Added on  2019/09/18

|1
|302
|86
Homework Assignment
AI Summary
This assignment delves into the specifics of controlling a DC motor using a BS2p microcontroller, exploring both the hardware and software aspects. The initial question addresses the limitations imposed by the BS2p's integer-only processing capability. The assignment then tasks the student with designing a circuit and writing a program to control the motor's direction and stopping, simulating three modes of operation: clockwise, counter-clockwise, and stop. The student is also asked to discuss the various serial protocols supported by the BS2p. Finally, the assignment challenges the student to interface a DS1302 real-time clock to the BS2p, providing a schematic and a program to display seconds since a button press. The assignment emphasizes both the theoretical and practical aspects of microcontroller programming and interfacing, including the use of hand-written code and PBASIC.
Document Page
Microprocessors Take Home Final
1.) The basic stamp works only with integers – A.) What does this mean? B.) What limitations does
it impose in programming?
2.) You wish to control a 10 Amp motor with the basic stamp – it is a DC motor. You would like to
stop the motor and control it so that clockwise and counter clockwise can be selected. What
would the schematic look – show specifically how you would interface this into the BS2p and
what would the program look like with three switch selections of run, Clockwise, Counter-
Clockwise. Assume that if run is not selected the unit will stop.
3.) Discuss the various serial protocols supported by the BS2p.
4.) Suppose you wished to implement a clock reference in the BS2p but you were so far away from
a window inside a large building that there were no GPS signals reaching the antenna. Your new
boss hands you a DS1302 and says “make this work” – show how to interface this to the BS2p
with a hand drawn schematic or Multisim. What might a simple program look like to display
seconds since a button press on the serial display.
Where I have asked you what might the code look like in question 2 and 4 for a given task – you may
write this by hand, write it with the PBASIC. It does not have to be a working program; I simply want to
see how you would code the program – your best guess of what would work on the first attempt. Many
times programmers use simulation software to see how code will behave before it is every installed on
hardware such as a PIC.
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
[object Object]