CCS PCM C Compiler, Version 5.048, 26145               24-Oct-19 22:00

               Filename:   C:\Users\Ga\Desktop 8\signals and systems\Week 2\Point 13\CCS\main.lst

               ROM used:   132 words (6%)
                           Largest free fragment is 1916
               RAM used:   13 (10%) at main() level
                           14 (11%) worst case
               Stack used: 1 locations (0 in main + 1 for interrupts)
               Stack size: 8

*
0000:  MOVLW  00
0001:  MOVWF  0A
0002:  GOTO   04E
0003:  NOP
0004:  BTFSC  03.5
0005:  GOTO   00A
0006:  MOVWF  24
0007:  SWAPF  03,W
0008:  MOVWF  25
0009:  GOTO   00F
000A:  BCF    03.5
000B:  MOVWF  24
000C:  SWAPF  03,W
000D:  MOVWF  25
000E:  BSF    25.1
000F:  MOVF   0A,W
0010:  MOVWF  2B
0011:  CLRF   0A
0012:  BCF    03.7
0013:  SWAPF  24,F
0014:  MOVF   04,W
0015:  MOVWF  26
0016:  MOVF   20,W
0017:  MOVWF  27
0018:  MOVF   21,W
0019:  MOVWF  28
001A:  MOVF   22,W
001B:  MOVWF  29
001C:  MOVF   23,W
001D:  MOVWF  2A
001E:  BCF    03.5
001F:  MOVLW  8C
0020:  MOVWF  04
0021:  BTFSS  00.1
0022:  GOTO   025
0023:  BTFSC  0C.1
0024:  GOTO   038
0025:  MOVF   26,W
0026:  MOVWF  04
0027:  MOVF   27,W
0028:  MOVWF  20
0029:  MOVF   28,W
002A:  MOVWF  21
002B:  MOVF   29,W
002C:  MOVWF  22
002D:  MOVF   2A,W
002E:  MOVWF  23
002F:  MOVF   2B,W
0030:  MOVWF  0A
0031:  SWAPF  25,W
0032:  MOVWF  03
0033:  BCF    03.5
0034:  SWAPF  24,W
0035:  BTFSC  25.1
0036:  BSF    03.5
0037:  RETFIE
.................... #include <main.h> 
.................... #include <16F616.h> 
.................... //////////// Standard Header file for the PIC16F616 device //////////////// 
.................... /////////////////////////////////////////////////////////////////////////// 
.................... ////        (C) Copyright 1996, 2014 Custom Computer Services          //// 
.................... //// This source code may only be used by licensed users of the CCS C  //// 
.................... //// compiler.  This source code may only be distributed to other      //// 
.................... //// licensed users of the CCS C compiler.  No other use, reproduction //// 
.................... //// or distribution is permitted without written permission.          //// 
.................... //// Derivative programs created using this software in object code    //// 
.................... //// form are not restricted in any way.                               //// 
.................... /////////////////////////////////////////////////////////////////////////// 
.................... #device PIC16F616 
....................  
.................... #list 
....................  
.................... #device ADC=10 
....................  
.................... #FUSES PUT                   	//Power Up Timer 
.................... #FUSES NOMCLR                	//Master Clear pin used for I/O 
.................... #FUSES NOPROTECT             	//Code not protected from reading 
.................... #FUSES NOBROWNOUT            	//No brownout reset 
....................  
.................... #use delay(internal=8MHz) 
*
003B:  MOVLW  2D
003C:  MOVWF  04
003D:  MOVF   00,W
003E:  BTFSC  03.2
003F:  GOTO   04D
0040:  MOVLW  02
0041:  MOVWF  21
0042:  CLRF   20
0043:  DECFSZ 20,F
0044:  GOTO   043
0045:  DECFSZ 21,F
0046:  GOTO   042
0047:  MOVLW  97
0048:  MOVWF  20
0049:  DECFSZ 20,F
004A:  GOTO   049
004B:  DECFSZ 00,F
004C:  GOTO   040
004D:  RETURN
.................... #use rs232(baud=9600,parity=N,xmit=PIN_A4,rcv=PIN_A5,bits=8,stream=PORT1,errors) 
....................  
.................... #define LED PIN_C0 
.................... #define DELAY 500 
....................  
....................  
....................  
....................  
.................... #INT_TIMER2 
.................... void  TIMER2_isr(void)  
.................... { 
....................  
*
0038:  BCF    0C.1
0039:  BCF    0A.3
003A:  GOTO   025
.................... } 
....................  
.................... void main() 
*
004E:  MOVF   03,W
004F:  ANDLW  1F
0050:  MOVWF  03
0051:  BSF    03.5
0052:  BCF    05.4
0053:  BCF    03.5
0054:  BSF    05.4
0055:  BCF    1F.6
0056:  MOVLW  00
0057:  BSF    03.5
0058:  MOVWF  11
0059:  BCF    03.5
005A:  CLRF   1A
005B:  CLRF   1B
005C:  CLRF   1C
005D:  BSF    03.5
005E:  CLRF   1A
005F:  CLRF   19
.................... { 
.................... 	setup_timer_2(T2_DIV_BY_16,240,13);		//1.9 ms overflow, 25.0 ms interrupt 
0060:  MOVLW  60
0061:  BCF    03.5
0062:  MOVWF  21
0063:  IORLW  06
0064:  MOVWF  12
0065:  MOVLW  F0
0066:  BSF    03.5
0067:  MOVWF  12
....................  
....................  
.................... 	enable_interrupts(INT_TIMER2); 
0068:  BSF    0C.1
.................... 	enable_interrupts(GLOBAL); 
0069:  MOVLW  C0
006A:  BCF    03.5
006B:  IORWF  0B,F
....................  
.................... 	while(TRUE) 
.................... 	{ 
....................  
.................... 		//Example blinking LED program 
.................... 		output_low(LED); 
006C:  BSF    03.5
006D:  BCF    07.0
006E:  BCF    03.5
006F:  BCF    07.0
.................... 		delay_ms(DELAY); 
0070:  MOVLW  02
0071:  MOVWF  2C
0072:  MOVLW  FA
0073:  MOVWF  2D
0074:  CALL   03B
0075:  DECFSZ 2C,F
0076:  GOTO   072
.................... 		output_high(LED); 
0077:  BSF    03.5
0078:  BCF    07.0
0079:  BCF    03.5
007A:  BSF    07.0
.................... 		delay_ms(DELAY); 
007B:  MOVLW  02
007C:  MOVWF  2C
007D:  MOVLW  FA
007E:  MOVWF  2D
007F:  CALL   03B
0080:  DECFSZ 2C,F
0081:  GOTO   07D
0082:  GOTO   06C
....................  
.................... 		//TODO: User Code 
.................... 	} 
....................  
.................... } 
0083:  SLEEP

Configuration Fuses:
   Word  1: 00C4   INTRC_IO NOWDT PUT NOMCLR NOPROTECT IOSC8 NOBROWNOUT
