;********************************************************************** ; This file is a basic code template for assembly code generation * ; on the PICmicro PIC16C505. This file contains the basic code * ; building blocks to build upon. * ; * ; If the internal RC oscillator is not implemented then the first * ; instruction after the ORG 0x000 directive is not required. * ; * ; Refer to the MPASM User's Guide for additional information on * ; features of the assembler (Document DS33014). * ; * ;********************************************************************** ; Engineering 164 - Laboratory 3 * ; Brown University * ; * ; Filename: * ; Date: * ; File Version: * ; * ; Author(s): * ;********************************************************************** ; Notes: * ; Describe design decision here... * ; (reaction of your system when user changes controls from * ; oven to toast or viceversa) * ; * ;********************************************************************** list p=16c505 ; list directive to define processor #include ; processor specific variable definitions ;***** REGISTER/VARIABLE DEFINITIONS ;**** add your own definitions here exvar EQU 0x08 ; example variable definition exconst EQU 5 ; example constant definition ;********************************************************************** ORG 0x3FF ; processor reset vector ; Internal RC calibration value is placed at location 0x3FF by Microchip ; as a movlw k, where the k is a literal value. ORG 0x000 ; coding begins here movwf OSCCAL ; update register with factory cal value ;Set option register MOVLW B'00000111' ; this combination disables watchdog timer OPTION ; and sets Timer0 prescaler to 1:256 ; see pic manual for details ; remaining code goes here END ; directive 'end of program'