Understanding+PICs

toc Students need to learn the following: Read the following pages in your text book (94-100) and the following site about microprocessors and computer control: = Using PICS = Reasons why microcontrollers are increasingly used to replace other types of circuit. PIC allows pre-programming PIC allows programme revisions/ changes Greater complexity of programme function More outputs and inputs available More reliable switching Faster and or shorter sequences Fewer components required Smaller circuit size = Systems and Control = Looking more closely at systems and control by going through the following sites: You will now realize that most electronic products, however simple or complicated it is, can be thought of as three linked parts - **input**, **process** and **output,** and is represented by a simple systems block diagram (or systems diagram) For example: The input part takes in energy of some form (the power supply is __never__ part of the input or the systems diagram) and produces an electrical signal. The process part works on the electrical signal as necessary. The output part produces a suitable energy output from the processed electrical signal. A radio receiver has the following input-process-output parts: Both these system block diagrams are examples of **open loop systems.** However this system does not allow for any control whilst it is running - therefore we need to control the system using **feedback** and is known as a **closed loop system.**
 * More projects and information about PICs**
 * 1.6 Peripheral Interface Controller (PICs)**
 * How to use flowcharts when programming.
 * How to switch outputs on/off in response to inputs.
 * How to use simple routines to control outputs with delays, loops and counts.
 * []
 * [|http://www.teach-ict.com/as_a2/topicsinput%20processing%20output/input_process_output/index.htm]

For example the volume control of a Radio: For some help you can try using the following link and use their Circuit Bricks: @http://www.edutek.ltd.uk/CircuitBricks.html = Bits & Bytes = A **byte** is the unit for memory in the computer. It is made up of eight bits. In other words, a byte can store eight 0s or 1s.
 * Task** - complete the following worksheet
 * Bits** - Electronic products are of electronic circuits. Through these circuits there can be two states - electricity can be flowing or not flowing. When a pulse of electricity is present we call this a "**1**" and the absence of electricity is a "0". The transistors on a silicon chip for example in a mobile phone can store a "**bit**" (binary digit) which is either the 0 or the **1**.

 The Base-2 System and the 8-bit Byte The reason computers use the base-2 system is because it makes it a lot easier to implement them with current electronic technology. So computers use binary numbers, and therefore use **binary digits ** in place of decimal digits.Whereas decimal digits have 10 possible values ranging from 0 to 9, bits have only two possible values: 0 and 1. To understand decimal numbers think back to primary school when writing a number like 6357 to understand this we used to write the number under headings: Therefore, a binary number is composed of only 0s and 1s, like this: 1011. How do you figure out what the value of the binary number 1011 is? You do it in the same way we did it above for 6357, but you use a base of 2 instead of a base of 10. So: Or: You can see that in binary numbers, each bit holds the value of increasing powers of 2. That makes counting in binary pretty easy. Starting at zero and going through 5, counting in decimal and binary looks like this:
 * ** Thousands ** || ** Hundreds ** || ** Tens ** || ** Units ** ||
 * **// 10 to power 3 //** || **// 10 to power 2 //** || **// 10 to power 1 //** || **// 10 to power 0 //** ||
 * ** 6 ** || ** 3 ** || ** 5 ** || ** 7 ** ||
 * ** 3 Twos ** || ** 2 Twos ** || **1 Two** || ** Units ** ||
 * **// 2 to power 3 //** || **// 2 to power 2 //** || **// 2 to power 1 //** || **// 2 to power 0 //** ||
 * **1** || 0 || **1** || ** 1 ** ||
 * (1 * 2^3) + (0 * 2^2) + (1 * 2^1) + (1 * 2^0) = 8 + 0 + 2 + 1 = 11 **
 * 0 = 0 **
 * 1 = 1 **
 * 2 = 10 **
 * 3 = 11 **
 * 4 = 100 **
 * 5 = 101 **
 * Task** - complete the binary table going through to 20

Read the following sites about Bits & Bytes, carefully follow the examlpe in the first site, and look at pages 1 and 2 only in the second site: = Flow Charts = Flow charts are used in computer programming, and though there are many different types of software available they all use the same standard shapes to represent different types of functions within the programme, as illustrated below: Here are the same blocks in Yenka:
 * []
 * []
 * [[file:EP_BinaryBase2BitsBytes.pdf]]
 * Task** - complete the following worksheet:

Simpler to use and learn / graphical- symbols easy to identify/easy to communicate and share ideas / speed of design. Can be converted to BASIC.
 * Advantage of Flowchart:**

Read the following site about flowcharts:
 * []
 * Task** - complete the following worksheet:

**PIC** - The name PIC initially referred to "**Peripheral Interface Controller**" supplied by Microchip at: http://www.microchip.com Despite its simplicity, BASIC is used for a wide variety of business applications. There is an ANSI standard for the BASIC language, but most versions of BASIC include many proprietary extensions. Microsoft's popular Visual Basic, for example, adds many object-oriented features to the standard BASIC. Recently, many variations of BASIC have appeared as programming, for example, Microsoft Word and Excel both come with a version of BASIC with which users can write programs to customize and automate these applications.
 * Chips & Software**
 * PICAXE** - Microcontrollers which are exciting, low-cost, re-programmable chips that can be used as low-cost 'brains' in many kinds of electronic project. Supplied by : []
 * Basic -** Acronym for Beginner's All-purpose Symbolic Instruction Code. Developed by John Kemeney and Thomas Kurtz in the mid 1960s at Dartmouth College, BASIC is one of the earliest and simplest high-level programming languages. During the 1970s, it was the principal programming language taught to students, and continues to be a popular choice among educators.

More powerful programming tool / can be edited for alterations easier than a drawing / debugged better than a graphic programme / more detailed.
 * Advantage of BASIC programme:**

Programming software for schools for controlling "mimics" simulations, models, and PIC chips: [|http://www.flowol.com]
 * Flowol**

Another school software used for programming simulations, models, and PIC and PICAXE chips: []
 * Logicator**

Another school software used simulating electronic circuit, PCB manufacture and also can be used for programming simulations, models, and PIC and PICAXE chips: [] with a free home licence for students
 * Yenka**

= Projects = = Extra Reading =
 * Resources**
 * []
 * @http://sixthsense.osfc.ac.uk/electronics/microprocessors/intro.asp
 * @http://www.bbc.co.uk/schools/gcsebitesize/design/electronics/controllogicrev3.shtml
 * []
 * []