Software Developers View of Hardware Programming Hardware Devices
What does this mean? <ul><li>Computers usually interact with outside sources for input and output: </li></ul><ul><ul><li>C...
What does this mean? <ul><li>Most software developers require their software to interact with these devices. </li></ul><ul...
Sensor <ul><li>Any device that converts input from the environment into a digital signal. </li></ul><ul><li>The signal is ...
Actuator <ul><li>An output device that performs a mechanical action. </li></ul><ul><li>Actuators receive digital signals f...
Processing a Data Stream <ul><li>What is a Data Stream? </li></ul><ul><li>A packet of binary data consisting of a header, ...
Processing a Data Stream <ul><li>What is in the header? </li></ul><ul><li>Specifies how much data is to be transmitted. </...
Processing a Data Stream <ul><li>What is in the data section? </li></ul><ul><li>Includes control characters i.e SHIFT + B ...
Processing a Data Stream <ul><li>What is in the trailer section? </li></ul><ul><li>Data bits that end the block. </li></ul...
Processing a Data Stream <ul><li>Recognising and stripping control Characters </li></ul><ul><li>Control characters are rep...
Processing a Data Stream <ul><li>Counting the Data Characters </li></ul><ul><li>The header field will normally contain all...
Processing a Data Stream <ul><li>Extracting Data </li></ul><ul><li>Once the header and trailer have been removed, the hard...
Keyboard Example <ul><li>How a keyboard transmits data? </li></ul><ul><li>Pressing a key causes a change to take place in ...
Keyboard Example <ul><li>The BIOS translates the codes into ASCII and that particular character or command is stored in me...
Control Systems <ul><li>These are systems that include hardware devices, software and especially the use of sensors and ac...
Open Control Systems <ul><li>These systems do not react to their environment. </li></ul><ul><li>These systems normally req...
Closed Control Systems <ul><li>These systems actually react to their environment. </li></ul><ul><li>This system uses senso...
Question 1 <ul><li>A robotic moon car is designed to use digital controls. The motor of the car receives the following com...
Question 1 <ul><li>The speed for the car can range from + 100 (Fastest) to -100 (Backward) </li></ul><ul><li>1.) Identify ...
Question 2 <ul><li>Complete the following text book questions: </li></ul><ul><li>SET 10F </li></ul><ul><li>Question 11 </l...
Upcoming SlideShare
Loading in …5
×

Programming Hardware Devices

5,754 views
5,419 views

Published on

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
5,754
On SlideShare
0
From Embeds
0
Number of Embeds
388
Actions
Shares
0
Downloads
54
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Programming Hardware Devices

  1. 1. Software Developers View of Hardware Programming Hardware Devices
  2. 2. What does this mean? <ul><li>Computers usually interact with outside sources for input and output: </li></ul><ul><ul><li>CD-ROM </li></ul></ul><ul><ul><li>Mouse </li></ul></ul><ul><ul><li>Keyboard </li></ul></ul><ul><ul><li>Scanner </li></ul></ul><ul><ul><li>Monitor. </li></ul></ul>
  3. 3. What does this mean? <ul><li>Most software developers require their software to interact with these devices. </li></ul><ul><li>So it is therefore important to understand how they are programmed and especially, how they operate. </li></ul><ul><li>Any hardware device that can be programmed uses two processes: </li></ul><ul><ul><li>Sensor </li></ul></ul><ul><ul><li>Actuator </li></ul></ul>
  4. 4. Sensor <ul><li>Any device that converts input from the environment into a digital signal. </li></ul><ul><li>The signal is then interpreted by the software. </li></ul>
  5. 5. Actuator <ul><li>An output device that performs a mechanical action. </li></ul><ul><li>Actuators receive digital signals from software. </li></ul>
  6. 6. Processing a Data Stream <ul><li>What is a Data Stream? </li></ul><ul><li>A packet of binary data consisting of a header, data characters and a trailer. </li></ul><ul><li>For example: </li></ul><ul><li>Header Data Trailer </li></ul><ul><li>010101 | 101010100 | 0101010 </li></ul><ul><li>The information contains the data and a check to see if it is correct. </li></ul>
  7. 7. Processing a Data Stream <ul><li>What is in the header? </li></ul><ul><li>Specifies how much data is to be transmitted. </li></ul><ul><li>Contain error checking data such as: </li></ul><ul><ul><ul><li>Parity Checking </li></ul></ul></ul><ul><ul><ul><li>CRC 16 </li></ul></ul></ul><ul><li>Specifies the device in which it is coming from. </li></ul>
  8. 8. Processing a Data Stream <ul><li>What is in the data section? </li></ul><ul><li>Includes control characters i.e SHIFT + B </li></ul><ul><li>All subsequent instructions to be processed by the CPU. </li></ul>
  9. 9. Processing a Data Stream <ul><li>What is in the trailer section? </li></ul><ul><li>Data bits that end the block. </li></ul><ul><li>Error checking bits </li></ul><ul><li>Memory clear instructions. </li></ul>
  10. 10. Processing a Data Stream <ul><li>Recognising and stripping control Characters </li></ul><ul><li>Control characters are represented by the ASCII values 0 – 31 and are typed while pressing the control key. </li></ul>
  11. 11. Processing a Data Stream <ul><li>Counting the Data Characters </li></ul><ul><li>The header field will normally contain all required information relating to the size of data packets. </li></ul>
  12. 12. Processing a Data Stream <ul><li>Extracting Data </li></ul><ul><li>Once the header and trailer have been removed, the hardware within the CPU will extract the data, and relevant software will carry out the instructions. </li></ul>
  13. 13. Keyboard Example <ul><li>How a keyboard transmits data? </li></ul><ul><li>Pressing a key causes a change to take place in the amount of current flowing through key circuits. </li></ul><ul><li>A microprocessor sends a signal relating to the pressed key along a cable port notifying the BIOS. </li></ul>
  14. 14. Keyboard Example <ul><li>The BIOS translates the codes into ASCII and that particular character or command is stored in memory. </li></ul>
  15. 15. Control Systems <ul><li>These are systems that include hardware devices, software and especially the use of sensors and actuators. </li></ul><ul><li>There are two broad categories of control systems: </li></ul><ul><ul><ul><li>Open Control Systems </li></ul></ul></ul><ul><ul><ul><li>Closed Control Systems </li></ul></ul></ul>
  16. 16. Open Control Systems <ul><li>These systems do not react to their environment. </li></ul><ul><li>These systems normally require a user to activate the actuator. </li></ul><ul><li>E.g. Hotel Door Lock. </li></ul>
  17. 17. Closed Control Systems <ul><li>These systems actually react to their environment. </li></ul><ul><li>This system uses sensors and programmed structures to control the actuators. </li></ul><ul><li>For Example: </li></ul><ul><ul><li>Anti-Lock Breaking System </li></ul></ul>
  18. 18. Question 1 <ul><li>A robotic moon car is designed to use digital controls. The motor of the car receives the following commands from a user. </li></ul>Motor off. Stop Turns left X deg LeftX Turns right X deg RightX Moves in straight line at X speed. StraightX Trailer <-T Header ->H
  19. 19. Question 1 <ul><li>The speed for the car can range from + 100 (Fastest) to -100 (Backward) </li></ul><ul><li>1.) Identify the category of control system. </li></ul><ul><li>2.) Identify the problems with the following instruction: </li></ul><ul><li> ->HStraight20StopRight90Forward10->H </li></ul><ul><li>3.) Construct a data stream to carry out the following tasks: </li></ul><ul><li>Move forward 30 </li></ul><ul><li>Move left 45, move forward 80 </li></ul><ul><li>Move right 20, backward -20, stop </li></ul>
  20. 20. Question 2 <ul><li>Complete the following text book questions: </li></ul><ul><li>SET 10F </li></ul><ul><li>Question 11 </li></ul><ul><li>Question 13 </li></ul><ul><li>Question 14 </li></ul>

×