• 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...


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.


"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.


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

    An important thing for management is to carry out a risk assessment. Now am going to talk about how is not safe to work alone. It's not very wise or safe to work alone in a workshop or laboratory because if the person is alone, the person might get hurt

  2. Implementing high school dropout vocational and training program

    Many laws and regulations exists that can cause the company thousands of dollars in penalties if violated. Human resource department is responsible for hiring, firing, recruiting, retaining, and day-to-day operations often including the finances. When the company takes these considerations into account and begins to organize the program it is

  1. 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

  2. Leisure Studies- Unit 5- A02

    An analysis of Time Use Survey data by ONS (2003a) shows differences in an individual's use of time between weekdays and weekends. During the week, 77% of adults are awake and out of bed by 8 am, with 36% at work or studying by 9 am, and this increases to 43% by 11 am.

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