;********************************************************************* ; * ; PIC16C7X Tutorial 2: Timer Mode * ; * ;********************************************************************* ;* TARGET PIC16C7X ;********************************************************************* ; Exercises the PIC16C7X instruction set for the PIC16C7X ;********************************************************************* ;* @version 0.1, 14 October 2001 ;* @author James Caska ;********************************************************************* ;* ;* Runs on Processors without change ;* ;* PIC16c71 ;* PIC16c715 ;* ;********************************************************************* #include list p=16C71 ORG .0 ;========================================== ;Autogenerated configuration code PIC16C7X ;Config Wiz V0.1, www.virtualbreadboard.com ;========================================== ;======Begin PORT Configuration BSF STATUS,RP0 ;Set Bank1 ;======PORT A MOVLW .31 ;PORTA Configuration Bits MOVWF TRISA BCF STATUS,RP0 ;Restore Bank0 ;========================================== ;Autogenerated configuration code PIC16C7X ;Config Wiz V0.1, www.virtualbreadboard.com ;========================================== ;======Begin Timer0 Configuration ;Timer0 Timer Mode, uses Internal clock ;Prescalor Assigned to Watchdog, Timer0 Prescalor = 1:1, WDT Prescalor = 1:1 MOVLW .8 BSF STATUS,RP0 ;Option is in Bank1 MOVWF OPTION_REG BCF STATUS,RP0 ;Restore Bank0 ;======End Timer0 Configuration MAIN MOVF TMR0,W MOVWF PORTB GOTO MAIN END