• Join over 1.2 million students every month
  • Accelerate your learning by 29%
  • Unlimited access from just £6.99 per month

Electronics Microcontroller (PICAXE) Project

Extracts from this document...

Introduction

Microcontroller Project Aim: To program a PICAXE microcontroller to mimic a traffic light sequence, complete with pedestrian crossing lights (and trigger switch). This could be used to control a set of pedestrian lights. Output Ports Binary 27 26 25 24 23 22 21 20 Connected Output n/a n/a n/a Pe. G Pe. R Tr. R Tr. A Tr. G Key: "Tr." represents traffic, "Pe." represents pedestrian. For example, the denary number "31" would translate to the byte "00011101" and would then transfer to the eight outputs, so all connected outputs would be high (and therefore lit) apart from the amber light for traffic. The binary number represents one of two logic states - 0 or 1. The three most significant bits of these bytes can be ignored for this program as they are not used. Circuit Operation This circuit emulates a traffic light sequence. - The "let pins = 9" command transfers the byte "00001001" to the 8 output pins, which lights the LEDs traffic green, and pedestrian red. - The "wait 60" command makes the program wait 60 seconds before moving on to the next instruction. ...read more.

Middle

"let pins = 4" transfers the byte "00000100" to the outputs, i.e. all are off bar the traffic red. 2. "pause 600" waits 600 milliseconds before continuing. 3. "let pins = 20" transfers the byte "00010100" to the outputs again, turning the pedestrian green back on. 4. "pause 600" then waits another 600 milliseconds before continuing. 5. "let b0 = b0 - 1" subtracts one from the value stored in the register b0 each time it is executed. This then loops back up to the above decision diamond, and the loop is executed until b0 = 0, i.e. when the green pedestrian light has flashed on and off 5 times - this is a safety precaution as it warns anybody on the crossing to hurry, and people approaching the crossing not to start doing so. - Now that b0 = 0, the instruction "let pins = 12" will be carried out, which again transfers the byte "00001100" to the outputs, keeping the traffic red but also turning the pedestrian red. - "wait 2" waits 2 seconds before running "let pins = 14", this is a safety precaution in case anybody did happen to be on the crossing. ...read more.

Conclusion

I then took quantitative measurements using a multimeter, so that I would be eligible for the further 2 marks on the mark scheme. The tables are done in terms of logic levels for simplicity and ease of comparison: "1" representing anything >4.9V, whereas "0" represents anything <0.1V. Here are my results: Predicted Output Byte Actual Output Byte "00001001" "00001001" "00001010" "00001010" "00001100" "00001100" "00010100" "00010100" "00000100" "00000100" "00010100" "00010100" "00001100" "00001100" "00001110" "00001110" I then had to test the timings of the circuit, to make sure that they were correct (as specified by my program). The timing results are below: Expected Time Delay (s) Actual Time Delay (s) 60 ~60 12 ~12 3 ~3 1 ~1 8 ~8 0.6 ~0.5 0.6 ~0.5 2 ~2 3 ~3 Results Analysis All of the actual output states for the 8 output pins matched exactly with the predicted output states, thus I believe the IC behaved as expected. This data supports my circuit operation. All timings are correct to �10%, apart from the 600 millisecond delay. However, this is acceptable as it is a smaller value, and therefore more susceptible to human error, as well as error caused by the sensitivity of the instrument. I believe that this data supports my circuit operation. Circuit Diagram Jake Beazley L6Ea Page 4 of 4 ...read more.

The above preview is unformatted text

This student written piece of work is one of many that can be found in our AS and A Level Miscellaneous section.

Found what you're looking for?

  • Start learning 29% faster today
  • 150,000+ documents available
  • Just £6.99 a month

Not the one? Search for your essay title...
  • Join over 1.2 million students every month
  • Accelerate your learning by 29%
  • Unlimited access from just £6.99 per month

See related essaysSee related essays

Related AS and A Level Miscellaneous essays

  1. Health and Safety

    and there well be no one supporting the person who's hurt in a workshop or laboratory. Also it's not safe to work alone because the person might not know what he/she is doing with the machines and its very dangers for the persons who's working alone and doesn't know what they doing.

  2. Implementing high school dropout vocational and training program

    Creating a periodic review of the program and the programs technology ensures the company is operating as efficiently and effectively as possible. The company will offer an appraisal system mentioned later in this report. The human resources and financial resources are the most important part of this program.

  1. Leisure Studies- Unit 5- A02

    reported undertaking no physical activity; 12% had been walking or hiking for an average of 108 minutes; 9% went swimming indoors for 34 minutes; and 7% either went to a keep-fit or aerobics class for 49 minutes or cycled for 26 minutes.

  2. Crash Project

    The police cruiser was destroyed. (c) 2010 The Washington Post Company NEWS | POLITICS | OPINIONS | BUSINESS | LOCAL | SPORTS | ARTS & LIVING | GOING OUT GUIDE | JOBS | CARS | REAL ESTATE |SHOPPING Article 2: Woodbridge student killed in Dale City crash By Martin Weil

  • Over 160,000 pieces
    of student written work
  • Annotated by
    experienced teachers
  • Ideas and feedback to
    improve your own work