;********************************************************************* ; * ; PIC16C5X Tutorial 4: Counter Mode Falling TOCKI + prescalar * ; * ;********************************************************************* ;* TARGET PIC16C5X ;********************************************************************* ;* @version 0.1, 9 October 2001 ;* @author James Caska ;********************************************************************* ;* ;* Runs on Processors without change ;* ;* PIC16c54 ;* PIC16c55 ;* PIC16c56 ;* PIC16c57 ;* ;********************************************************************* #include list p=16C54 ORG .0 ;========================================== ;Autogenerated configuration code PIC16C5X ;Config Wiz V0.1, www.virtualbreadboard.com ;========================================== ;======Begin PORT Configuration ;======PORT B MOVLW .0 ;PORTB Configuration Bits TRIS PORTB ;========================================== ;Autogenerated configuration code PIC16C5X ;Config Wiz V0.1, www.virtualbreadboard.com ;========================================== ;======Begin Timer0 Configuration ;Timer0 Counter Mode, uses External clock source ;T0SE: TMR0 Source Edge Select bit: 0 = Increment on low-to-high transition on T0CKI pin ;Use Prescalor, Prescalor = 1:8 MOVLW .35 OPTION ;======End Timer0 Configuration MAIN MOVF TMR0,W MOVWF PORTB GOTO MAIN END