|
Copy and paste this program into the code editing area. Press F8 to assemble the code. Click the TRAFFIC button on the highlighted "C" to connect the traffic Lights to PORTC. Step the program and watch the traffic lights. Answer the reviseOmatic questions on this task. This program should run unaltered on the PICAXE 28X1 chip. TASK: Work out the correct numbers needed to control the traffic lights. Use the grid below to design the correct number sequence.
; ===== CONNECT TRAFFIC LIGHTS TO PORTC =====
MOVW 0x00
MOVWR TRISC
START:
MOVW 0x55 ; This number is wrong
MOVWR PORTC
MOVW 0xA ; This number is wrong
MOVWR PORTC
MOVW 0xC ; This number is wrong
MOVWR PORTC
MOVW 0x2 ; This number is wrong
MOVWR PORTC
JMP START
You can use this grid to help design the correct hexadecimal numbers.
|
Open a browser window or tab containing the 

