Full Version : Simple 2 input/2 output proram in asm
avr >>BEGINNER PROJECTS >>Simple 2 input/2 output proram in asm


birdy5556- 12-02-2006
I am trying to write my first asm program for an ATtiny13. I need 2 inputs, trig1 and trig2, and 2 outputs sparkA and sparkB. This is what I want the program to do:

If trig1 is hi and trig2 is hi then make sparkA hi as long as trig1 is hi.
If trig1 is hi and trig2 is lo then make sparkB hi as long as trig1 is hi.

I have looked at lots of beginner examples but none involve comparing 2 inputs.
Can anyone point me in a direction? Setting the DDR and inputs and outputs is OK, just having trouble with how to compare and go somewhere, or poll an input and then check the 2nd input and go from there. Any help appreciated. Ian.


birdy5556- 12-13-2006
Easy, use SBIC or SBIS.

Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.