its not one division its three with a 90 deg phase shift on one of them.I would like to understand why I see all those "counts" for one division
one div would be like this
Code:;In simple terms toggle a pin on every 125th cycle ;start:;set gpio pin high ;delay 124 cycles ;set gpio pin low ;delay 122 cycles ;goto start CNT VAR BYTE BANK0 TRISIO=110 ASM START BSF GPIO , 0 MOVLW 40 ;2 MOVWF _CNT ;1 DL1 ;119 DELAY = 2+3(CNT-1) DECFSZ _CNT GOTO DL1 NOP ;1 NOP ;1 BCF GPIO , 0 MOVLW 40 ;2 MOVWF _CNT ;1 DL2 DECFSZ _CNT ;119 DELAY = 2+3(CNT-1) GOTO DL2 GOTO START ;2 ENDASM




Bookmarks