X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=hdw-tank%2Fmotor.asm;fp=hdw-tank%2Fmotor.asm;h=93861803edb703e7b1d379c09fa2d8cf00c0d5ee;hb=bc07798b093617e4b907b3fdb2155dc098b03e0b;hp=0000000000000000000000000000000000000000;hpb=04ffc37ce69bf3d8c175ddae51b0fda6d7848310;p=my-code%2Fatmel.git diff --git a/hdw-tank/motor.asm b/hdw-tank/motor.asm new file mode 100644 index 0000000..9386180 --- /dev/null +++ b/hdw-tank/motor.asm @@ -0,0 +1,67 @@ +; motor functions + +;include "../include/m128def.inc" + +.equ MOT_DIR_L = 0x02 +.equ MOT_DIR_R = 0x03 +.equ MOT_PWR_L = 0x04 +.equ MOT_PWR_R = 0x07 + +;.def tmp = r17 + +MOTOR_INIT: + + ; ports -> output + in tmp,DDRB + sbr tmp,(1<