??? 11/29/10 21:33 Modified: 11/29/10 21:34 Read: times |
#179721 - Oh, how very British Responding to: ???'s previous message |
Laura Jones said:
my assignment is to write a program that would simulate a pelican crosing. For those living beyond the shores of This Hallowed Isle, a "Pelican crossing" is a pedestrian road crossing with light signals to direct both the pedestrians and the road traffic. Pedestrians wishing to cross press a button to initiate the light sequence to stop the traffic. In addition to the light signal for the pedestrians to cross, there is a bleeper (for the benefit of the sight impaired). http://en.wikipedia.org/wiki/Pelican_crossing the sequence should go
TURN ON GREEN LED DELAY TURN ON AMBER LED ON SMALL DELAY TURN RED LED ON AND SOUND A BUZER DELAY FLASH AMBER LED ON AND OF actually, that isn't quite right - is it? A correct analysis of the problem is essential - and independent of what language(s) may be used to program the final solution. on the label "buzzerr:" the buzer is turned on and then it jumps to the delay and then turns the buzzer off then jumps down to the delay again, i need to loop this "buzzerr:" for a delay You already have 2 loops doing delays - you just need to repeat the same principle! Are you familiar with the concept of creating Subroutines in assembler? It would make the code a whole lot clearer... what i am after is the buzer to turn on and of for a set time. Well, each on-off cycle takes a fixed time - doesn't it? So you can get the overall time from just using a fixed number of cycles... As Erik says, why are you doing this as a #pragma in 'C' source - why not just write an assembler source file? |
Topic | Author | Date |
traffic lights | 01/01/70 00:00 | |
you are thus forgiven, but | 01/01/70 00:00 | |
Oh, how very British | 01/01/70 00:00 | |
Menagerie of crossings | 01/01/70 00:00 | |
Animal crossings... | 01/01/70 00:00 | |
zebra cross | 01/01/70 00:00 | |
Zebra crossing project | 01/01/70 00:00 | |
trafic light | 01/01/70 00:00 | |
Wrong. | 01/01/70 00:00 | |
Laura used MCU | 01/01/70 00:00 | |
Please read posts carefully! | 01/01/70 00:00 | |
See the persons in that photo | 01/01/70 00:00 | |
Double Pun | 01/01/70 00:00 | |
Good one! | 01/01/70 00:00 | |
delay | 01/01/70 00:00 | |
Oh dear! | 01/01/70 00:00 | |
Sequence | 01/01/70 00:00 | |
Robot? | 01/01/70 00:00 | |
Smith & Jones? | 01/01/70 00:00 | |
Too many names? | 01/01/70 00:00 | |
there once was a TV series ... "alias Smith and Jones" | 01/01/70 00:00 | |
Alas, Smith & Jones | 01/01/70 00:00 | |
A word to brighten my day | 01/01/70 00:00 | |
seems like here | 01/01/70 00:00 | |
there's demand for that here | 01/01/70 00:00 |