Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

source code for flashing sequence of lights

Status
Not open for further replies.

nwyatt15

Technical User
Mar 31, 2004
1
GB
hi can anyone help me with the writing of a source code to flash a sequence of lights on and off, i'm using a motorola assembly any help that you can give is very much appreiciated
 
Of course no one can help you with this because simply it is hardware dependent.
Are these lights memory mapped? If yes to which address? If no, to which port?

The basic idea behind toggling something on and off is to XOR the bit (or the port) it is connected to with 1 because x XOR 1 = !x
So, first start with initial state by masking off the bit (AND it with zero)
Then decide how you are going to perform the delay time between On and Off

Then write something like this

Mask Off

Loop
XOR with 1
Call Delay
XOR with 1
EndLoop



Walid Magd
Engwam@Hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top