
org 0

Initialize:

   mov    r0,#0ffh    ; set regesters with 1-3 with timing and loop settings
   mov    r1,#04ch
   mov    r3,#00fh
   mov    r5,#cold    ;pot 0 reg
   mov    r6,#cold    ;pot1 reg
   mov    r7,#014h    ;increment pot loop
   setb   cs          ;initialize output pins
   setb   sda
   setb   scl
   acall  etc_iat     ;start
.
.
.
Mainline:
    
    inc    r5           ;increment pot settings prior to writing to pot
    inc    r6
    djnz   r7,data_ect  ;inc. counter & write to pot after inc.
    ajmp   loop
.
.
.
.

ETC_IAT:               ;write ect & iat to pot
                        
    mov   a,r5
    clr   cs
    acall txsend
    mov   a,#potab
    acall txsend
;    acall  delay
    setb  cs
    ajmp  mainline
.
.
.
.

loop:


   acall loop

end
