divide a 10 Mhz signal by 1000 ...


Results 1 to 8 of 8

Threaded View

  1. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: divide a 10 Mhz signal by 1000 ...

    I would like to understand why I see all those "counts" for one division
    its not one division its three with a 90 deg phase shift on one of them.

    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
    Last edited by richard; - 3rd February 2021 at 01:29.
    Warning I'm not a teacher

Similar Threads

  1. Good way to divide 10bit adc by 4?
    By jmgelba in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 18th February 2016, 08:32
  2. divide
    By daydream in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 12th May 2012, 14:19
  3. Picbasic Pro divide problem
    By Hebemabo in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 2nd December 2011, 16:10
  4. Replies: 1
    Last Post: - 6th April 2007, 10:50
  5. Storm 1000 Keypad PIC Interface help please
    By digilord in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th December 2005, 18:37

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts