ON 20100504@3:32:38 PM at page: On a web page you were interested in at: http://www.piclist.com/microchip/routines.htm#40299.1312037037 James Newton[JMN-EFP-786] removed post 40299.1312037037 |Delete ' pic16f74
  • ' ON 20100504@3:34:51 PM at page: On a web page you were interested in at: http://www.piclist.com/microchip/picboard.htm#40302.3468981481 James Newton[JMN-EFP-786] published post 40302.3468981481 arponcedeleon@hotmail.com " Genial, muchas gracias me ayudo en mucho, funciona perfectamente." |Delete 'P-' before: '' but after: 'shall@decide.com :
    Count Let,season pair surprise various agency associate instead drink trial relative relatively nothing western hard fly article active recommend money district sea no just location deputy while photograph nothing parent prevent less master horse generation there medical version surface useful ship offer cabinet experience step programme towards detailed present pressure other present criticism disease address individual force necessary drop connection soft other agreement clean line request gentleman display account political properly species build male earn least nation since variety employee send minute hope representative ensure information late account positive wide death academic move future sample up presence property
    ' ON 20100520@12:07:15 PM at page: On a web page you were interested in at: http://www.piclist.com/microchip/i2c-eeprom.htm#40317.8368981481 James Newton[JMN-EFP-786] Published and replied to post 40317.8368981481 by fishfish1129 |Insert '#define sec bsf _STATUS,c' at: '' fishfish1129@hotmail.com asks: " "Sec" command mean?
    thanks." |Delete 'P-' before: '' but after: '
    try this for 1 to 117million cycle delay
    
    
    delay	macro	Cycles
     variable CyclesLeft ,LoopCycles,d_used           ;  Keep Track of Remaining Cycle
     local	iloop
    CyclesLeft = Cycles
    
    	if CyclesLeft > .327680 ; 0x5 * 0xffff
    d_used = 3
    	else
    	 if Cycles > 3*0xFF
    d_used = 2
    	 else
    d_used = 1
    	 endif
    	endif
    
    
    	if	d_used == 3
    LoopCycles = (Cycles-6-.10) / 7
    CyclesLeft = (Cycles-6-.10) - (LoopCycles*7)
    
    	endif
    	if	d_used == 2
    LoopCycles = (Cycles-4-6) / 5
    CyclesLeft = (Cycles-4-6) - (LoopCycles*5)
    	
    	endif
    
    
      if Cycles >=5
    	if	d_used == 1
    LoopCycles = (Cycles-2-2) / 3
    CyclesLeft = (Cycles-2-2) - (LoopCycles*3)
    	endif
    
     	movlw   (LoopCycles & 0xFF)+1
      	movwf   STACK-0
    	if d_used >=2
     	movlw   ((LoopCycles>>8) & 0xFF)+1
      	movwf   STACK-1
    	endif
    	if d_used >=3
    	if ((LoopCycles>>.16) > .255 )
     error "Required Delay is longer than 'delay' Macro can support"
    	endif
     	movlw   ((LoopCycles>>.16) & 0xFF)+1
      	movwf   STACK-2
    	endif
    iloop
     	if d_used >=3
    	 goto	$+1 
    	endif
     	if d_used >=2
    	 goto	$+1 
    	endif
    
      	decfsz  STACK-0,F
       	 goto	iloop
     	if d_used >=2
      	decfsz  STACK-1,F
       	 goto	iloop+1
    	endif
    	if d_used >=3	
    	decfsz  STACK-2,F
       	 goto	iloop+2
    	endif
    	
    
      endif
    
     while CyclesLeft >= 2          ;  Put in 2 Instruction Cycle Delays
      	goto    $ + 1
    CyclesLeft = CyclesLeft - 2
     endw
     if CyclesLeft == 1             ;  Put in the Last Required Cycle
      	nop
     endif
            endm
    |Delete 'P-' before: '' but after: '