Atmega32

Status
Not open for further replies.

Computer_Smart

New Member
Hi i am trying to make a Wig Wag sequence for a traffic light using the Atmega32

I have already programmed in Atmel AVR software the 0.5 second delay routine based on a processor speed of 8MHz.

.CSEG

LDI R16,0xC1
LDI R17,0x4B
LDI R18,0x15



AGAIN:

DEC R16
BRNE AGAIN

DEC R17
BRNE AGAIN

DEC R18
BRNE AGAIN


SELF: JMP SELF
now i need to create a routine that will produce flashing red lights (Wig Wag sequence see image below or go to this site **broken link removed** ) on the major and minor roads. The flash rate is to be a repetitive 0.5 second on 0.5 second off.

Can someone please help me to program this. Thanks

**broken link removed**
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…