Upload original 计算机组成原理课程实践 学分×2 陈媛媛 course files (part 28)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Calculator/PICCALC.XCL+162-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Calculator/PICCALC.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Clock/PICCLOCK.ASM+420-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Clock/PICCLOCK.COD
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Clock/PICCLOCK.ERR+2-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Clock/PICCLOCK.HEX+40-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Clock/PICCLOCK.LST+630-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Clock/PICCLOCK.SDI+420-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Clock/PICCLOCK.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Doorbell/Doorbell.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Serial Memory Example/I2CMEM1.ERR+13-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Serial Memory Example/I2CMEM1.HEX+50-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Serial Memory Example/I2CMEM1.LST+947-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Serial Memory Example/i2cmem1.SDI+506-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Serial Memory Example/i2cmem1.asm+507-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Serial Memory Example/i2cmem1.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/FONT.Inc+131-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/GLCD_Test.bas+27-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/GLCD_T~1.ASM+884-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/GLCD_T~1.COD
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/GLCD_T~1.ERR+1-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/GLCD_T~1.HEX+161-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/GLCD_T~1.LST
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/GLCD_T~1.PBE+3-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/GLCD_T~1.PBP+644-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/GLCD_T~1.RAW+235-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/P16F877.lpb+334-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/PICBASIC.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/PROTON_G4.INT+72-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/PIC16F18877.pdsprj
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/Makefile+113-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/MyConfig.mc3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/dist/default/production/src.production.cof
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/dist/default/production/src.production.hex+41-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/main.c+79-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/clc1.c+92-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/clc1.h+125-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/clc2.c+92-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/clc2.h+125-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/clc3.c+101-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/clc3.h+143-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/clc4.c+92-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/clc4.h+125-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/device_config.c+80-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/device_config.h+55-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/interrupt_manager.c+76-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/interrupt_manager.h+104-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/mcc.c+96-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/mcc.h+108-3
- Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/nco1.c+91-3
123version https://git-lfs.github.com/spec/v1oid sha256:385a2604f7046f695beb8d15c25844802d6c2dd093252871c127e38fd5655232size 5434123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162/************************************************************************ -L16F876.XCL-** XLINK command file to be used with the PIC C-compiler for the* PICmicro 16F876 controller** Usage: xlink your_file(s) -f l16F876** Copyright 1999 IAR Systems. All Rights Reserved.** NOTE: By default this file is tailored for* the 16F876** $Revision: 1.3 $** $Log: L16F876.XCL $* Revision 1.3 2000/12/04 10:27:10 ILAK* Added segment CHECKSUM, used by the linker* to store the checksum* Revision 1.2 2000/02/25 15:20:14 ILAK* Added the EEPROM_ID segment* Revision 1.1 1999/08/10 14:17:24 ILAK* Initial revision*************************************************************************//* Define CPU. */-cpic/************************************************************************* Allocate interrupt vector area segment which is mapped to ROM.** Interrupt vector area: 000000 - 0013.** NOTE: All addresses are in bytes, not words!*************************************************************************/-Z(CODE)INTVEC=0000-0013/************************************************************************** Allocate startup code and run-time library code segment which is* mapped to ROM.** Addresses are for the 16F876.** Address 0x0014 is here supposed to be start of ROM area and* address 0x3FFF is here supposed to be end of ROM area (2*2000H).** NOTE: All addresses are in bytes, not words!**************************************************************************//* First we specify internal memory *//* First we specify init code that must be placed in the first code page */-Z(CODE)SCODE=14-1FF/* The end address here must not be larger than the first code page (i.e. 0FFF) */-P(CODE)RCODE=0-0FFF/* Then we place the largest blocks first using the P directive */-P(CODE)HCODE=0-3FFF/* Code blocks smaller than the page size are inserted here */-P(CODE)CODE=[0-3FFF]/1000/* RETLW blocks with alignment 1 Word and smaller than 256 Words areinserted here */-P(CODE)SCONST=[0-3FFF]/200/* Last we insert blocks that we can place anywhere in the memory */-P(CODE)BANKN_ID,BANK0_ID,BANK1_ID,BANK2_ID,BANK3_ID,EEPROM_ID,CONST=0-3FFF/* EEPROM data 256 bytes */-Z(IDATA)EEPROM_Z,EEPROM_I,EEPROM_N=0-0FF/* Stack is put above the code area since it is in fact not used foranything other than a check of call depth */-Z(CODE)CALLSTACK=100000-10000F-Z(CODE)CHECKSUM=100100-10010F/************************************************************************** Allocate banked memories. These corresponds to the __bankn* pointers.** BANKN_Z/I/N: __nonbanked** BANK0_Z/I/N: __bank0* OVERLAY0: Overlay area in bank 0* INTSAVE0/WRKSEG: Must reside in GPR area in bank 0* BANK1_Z/I/N: __bank1* OVERLAY1: Overlay area in bank 1* INTSAVE1: Must reside in GPR area in bank 1* BANK2_Z/I/N: __bank2* OVERLAY2: Overlay area in bank 2* INTSAVE2: Must reside in GPR area in bank 2* BANK3_Z/I/N: __bank3* OVERLAY3: Overlay area in bank 3* INTSAVE3: Must reside in GPR area in bank 3** The bank layout is for 16F876 PIC*************************************************************************/-Z(DATA)BANKN_I,BANKN_Z,BANKN_N#70-07F-Z(DATA)INTSAVE0=20-07F-P(DATA)OVERLAY0,WRKSEG,BANK0_I,BANK0_Z,BANK0_N=20-07F-Z(DATA)INTSAVE1,OVERLAY1,BANK1_I,BANK1_Z,BANK1_N=0A0-0EF-Z(DATA)INTSAVE2,OVERLAY2,BANK2_I,BANK2_Z,BANK2_N=110-16F-Z(DATA)INTSAVE3,OVERLAY3,BANK3_I,BANK3_Z,BANK3_N=190-1EF/************************************************************************** Select the printf/sprintf formatter to use.** See configuration section in manual.*************************************************************************/-e_small_write=_formatted_write/************************************************************************** Select the scanf/sscanf formatter to use.** See configuration section in manual.*************************************************************************/-e_small_read=_formatted_read/************************************************************************** Select the 'C' library depending on processor used.*************************************************************************/cl16f876.r39/************************************************************************** Put the code in the file '???.hex' in INTEL STANDARD format*************************************************************************/-Ointel-standard=.hex/************************************************************************** EOF*************************************************************************/
123version https://git-lfs.github.com/spec/v1oid sha256:73d60db1e6ce827d1029950b38eed00a69304ccb3693ca85eeb663ea1cbfc101size 18995123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420LIST p=16F84 ; PIC16F844 is the target processor#include "P16F84.INC" ; Include header fileCBLOCK 0x10 ; Temporary storagestatesecsminshoursticksidcbcdENDC; Constants for bit allocation. The BIT_x constants are actual bit numbers and; the MASK_x are bit masks for the same bit.BIT_HSEL EQU H'0000'BIT_TSET EQU H'0001'BIT_HSET EQU H'0002'BIT_MSET EQU H'0003'BIT_H24 EQU H'0000'BIT_PM EQU H'0001'BIT_SET EQU H'0002'BIT_HSB EQU H'0003'MASK_H24 EQU H'0001'MASK_PM EQU H'0002'MASK_SET EQU H'0004'MASK_HSB EQU H'0008'; Macro to generate a MOVLW instruction that also causes a model break:break MACRO argDW 0x3100 | (arg & H'FF')ENDMORG 0entrypoint goto initialiseORG 4intvector goto clockinitialise ; Register set up:clrw ; Zero.movwf PORTA ; Ensure PORTA is zero before we enable it.movwf PORTB ; Ensure PORTB is zero before we enable it.bsf STATUS,RP0 ; Select Bank 1movlw H'1F' ; Mask for PORTA inputs/outputs.movwf TRISA ; Set TRISA register.movlw H'01' ; Mask for PORTA inputs/outputs.movwf TRISB ; Set TRISB register.bcf STATUS,RP0 ; Reselect Bank 0.; Initialise clock:clrf statebsf state,BIT_HSBmovlw D'0'movwf hoursmovlw D'0'movwf minsmovlw D'0'movwf secs; Clear 50Hz tick count:clrf ticks; Clear interrupt disable count (idc) semaphore:clrf idc; Initialise display:call wr_hourscall wr_minscall wr_secscall wr_state; Finally initialise interrupts for clock on RB0/INT pin:movlw H'90'movwf INTCONstart ; When not processing an interrupt we sit and check input pins:call chk_tset ; Time set select active?call chk_hsel ; H12/H24 display format select active?goto start;------------------------------------------------------------------------------; Interrupt handler. We come here for every tick of the time base.clock ; Toggle half-second flag and set state outputs:incf ticks,F ; Increment clock ticks.movf ticks,W ; Get ticks value.sublw D'25' ; Is it 25 (W=25-W)?btfss STATUS,Z ; Test zero flag.goto endclock ; Return.toggle_hs ; Half second - toggle HS flag, write it and return:clrf ticks ; Reset timebase,movf state,W ; Get state.xorlw MASK_HSB ; Toggle half-second bit.movwf state ; Save it back to register.call wr_state ; Display it.movf state,W ; Get state.btfss state,BIT_HSB ; Is bit now clear?goto endclock ; Return.inc_secs ; Incrmement seconds...incf secs,F ; Increment seconds count.movf secs,W ; Get it into W.sublw D'60' ; Is it 60 (W=60-W)?btfsc STATUS,Z ; Test zero flag, skip clear if no set.goto reset_secs ; Clear seconds, increment minutes.call wr_secs ; Write seconds it to display.goto endclock ; Done.reset_secs clrf secscall wr_secs ; Write seconds to display.incf mins,F ; Increment minute count.movf mins,W ; Get it into W.sublw D'60' ; Is it 60 (W=60-W)?btfsc STATUS,Z ; Test zero flag, skip clear if no set.goto reset_mins ; Clear minutes, increment hours.call wr_mins ; Write minutes it to display.goto endclock ; Done.reset_mins clrf mins ; Reset minute count to zero.call wr_mins ; Write minutes to display.call inc_hours ; Increment hours, display it with PM flag.endclock movlw H'90'movwf INTCONretfie ; Return;------------------------------------------------------------------------------; Subroutine. Check the state of the HSEL input and set h12/h24 format as; required.chk_hsel btfsc PORTA,BIT_HSEL ; Test 12/24 select.goto set_h12 ; H12 set so switch to 12 hour format.; fall through ; H12 not set so switch to 24 hour format.set_h24 btfsc state,BIT_H24 ; Are we on 12 hour format?retlw 0 ; No, so no need to do anything...bcf INTCON,GIE ; Disable interrupts.incf idc,F ; Increment count of number of disables.bsf state,BIT_H24 ; Clear h12 flag.movf hours,W ; Get hours value.sublw D'12' ; Is it 12:xx?btfsc STATUS,Z ; Test zero flag.clrf hours ; Reset to zero.movf hours,W ; Get hours value.btfsc state,BIT_PM ; Is the PM indicator set?addlw D'12' ; Add 12 to get 24 hour value.movwf hours ; Save result (does nothing for AM).bcf state,BIT_PM ; Clear PM flag.call wr_hours ; Write hours.call wr_state ; Write H12 state and PM state.goto chk_hsel_iec ; Done.set_h12 btfss state,BIT_H24 ; Are we on 12 hour format?retlw 0 ; Yes, so no need to do anything...bcf INTCON,GIE ; Disable interrupts.incf idc,F ; Increment count of number of disables.bcf state,BIT_H24 ; Set h12 flag.movf hours,W ; Get hour value.sublw D'11' ; W=11-W. C is clear for a borrow (W>=12).btfss STATUS,C ; Test carry flag.goto set_h12_pm ; Set PM.set_h12_am bcf state,BIT_PM ; Clear PM bit.movf hours,W ; Get hours.btfsc STATUS,Z ; Is it zero?addlw D'12' ; Yes, add 12 to get 00:xx to 12:xx.movwf hours ; Save any result.call wr_hours ; Display hours.call wr_state ; Display H12 and PM states.goto chk_hsel_iec ; Done.set_h12_pm bsf state,BIT_PM ; Set PM bit.movlw D'12' ; Constant.subwf hours,F ; hours=hours-12 (23..12 -> 11..0).btfsc STATUS,Z ; Zero set?movwf hours ; Yes, so reset to '12'.call wr_hours ; No, so leave hours alone and display it.call wr_state ; Display H12 and PM states.goto chk_hsel_iec ; Done.chk_hsel_iec decfsz idc,F ; Decrement idc. If zero we can reenable interrupts.retlw 1 ; Return without enabling interrupts.chk_hsel_done movlw H'90' ; Constant for GIE and T0IE.movwf INTCON ; Set interrupt register.retlw 1 ; Return.;------------------------------------------------------------------------------chk_tset btfsc PORTA,BIT_TSET ; Set mode?retlw 0bcf INTCON,GIE ; Disable interrupts.incf idc,F ; Increment count of number of disables.bsf state,BIT_SET ; Set the 'set mode' bit.clrf secs ; Setting time resets seconds count.call wr_secs ; Display it.bcf state,BIT_HSB ; Clear seconds toggle.call wr_state ; Update the state output latch.set_loop call chk_hsel ; Check for H12/H24 display change.btfss PORTA,BIT_MSET ; If pin is high then switch is open.goto set_mins ; Bit not set, switch closed, set minutes.btfss PORTA,BIT_HSET ; If pin is high then switch is open.goto set_hours ; Bit not set, switch closed, set hours.btfss PORTA,BIT_TSET ; If pin is high then switch is open.goto set_loop ; Bit not set, switch closed, loop.bcf state,BIT_SET ; Clear the 'set mode' bit.call wr_state ; Update the state output latch.chk_tset_idc decfsz idc,F ; Decrement idc. If zero we can reenable interrupts.retlw 1 ; Return without enabling interrupts.chk_tset_done movlw H'90' ; Constant for GIE and T0IE.movwf INTCON ; Set interrupt register.retlw 1 ; Return.set_mins incf mins,F ; Increment minute count.movf mins,W ; Get it into W.sublw D'60' ; Is it 60 (W=60-W)?btfsc STATUS,Z ; Test zero flag, skip clear if no set.clrf mins ; Clear minutes.call wr_mins ; Write minutes.debounce_mset btfss PORTA,BIT_MSET ; Wait for MSET button to be released.goto debounce_mset ; Loop.goto set_loop ; Released so recheck buttons.set_hours call inc_hours ; Increment hours and display.debounce_hset btfss PORTA,BIT_HSET ; Wait for HSET button to be released.goto debounce_hset ; Loop.goto set_loop ; Released so recheck buttons.;------------------------------------------------------------------------------; Increment hours, set PM indicator bit as necessary.inc_hours btfsc state,BIT_H24 ; 12h display?goto reset_on24 ; No, so we reset when we get to 24.reset_on12 movf hours,W ; Get hourssublw D'12' ; Is it 12 (W=12-W)?btfsc STATUS,Z ; Test zero flag, skip clear if no set.clrf hours ; Clear hours.incf hours,F ; Increment hours.call wr_hours ; Write it.movf hours,W ; Get hourssublw D'12' ; Is it 12 (W=12-W)?btfss STATUS,Z ; Test zero flag.return ; Zero not set, so not 12, so return.movlw MASK_PM ; Get PM state bit mask.xorwf state,F ; Toggle PM state bit in state.call wr_state ; Update state outputs.return ; Return.reset_on24 incf hours,F ; Incrment hours.movf hours,W ; Get it in W.sublw D'24' ; Is it 24 (W=24-W)?btfsc STATUS,Z ; Test zero flag, skip clear if no set.clrf hours ; Clear hours 24->0.call wr_hours ; Write hours to display.return;------------------------------------------------------------------------------; Get seconds value, split to get BCD pair and write to port.wr_secs movf secs,W ; Get seconds.call bin2bcd ; Convert to BCD.movwf bcd ; Save result.andlw 0xF0 ; Mask BCD pair to leave upper digit in W upper nibble.iorlw 0x0A ; Select strobe.movwf PORTB ; Write to PORTB.andlw 0xF0 ; Clear strobe (by selecting Q0).movwf PORTB ; Write to PORTB.swapf bcd,W ; Get lower BCD digit in to W upper nibble.andlw 0xF0 ; Mask of strobe selection bits.iorlw 0x0C ; Set WR strobe.movwf PORTB ; Write to PORTB.andlw 0xF0 ; Clear strobe.movwf PORTB ; Write to PORTB.return ; Return.;------------------------------------------------------------------------------; Get minutes value, split to get BCD pair and write to port.wr_mins movf mins,W ; Get minutes value.call bin2bcd ; Convert to BCD.movwf bcd ; Save result.andlw 0xF0 ; Mask BCD pair to leave upper digit in W upper nibble.iorlw 0x06 ; Select strobe.movwf PORTB ; Write to PORTB.andlw 0xF0 ; Clear strobe (by selecting Q0).movwf PORTB ; Write to PORTB.swapf bcd,W ; Get lower BCD digit in to W upper nibble.andlw 0xF0 ; Mask of strobe selection bits.iorlw 0x08 ; Set WR strobe.movwf PORTB ; Write to PORTB.andlw 0xF0 ; Clear strobe.movwf PORTB ; Write to PORTB.return ; Return.;------------------------------------------------------------------------------; Get hours value, split to get BCD pair and write to port.wr_hours movf hours,W ; Get hours value/call bin2bcd ; Convert to BCD.movwf bcd ; Save result.andlw 0xF0 ; Mask BCD pair to leave upper digit in W upper nibble.iorlw 0x02 ; Select strobe.movwf PORTB ; Write to PORTB.andlw 0xF0 ; Clear strobe (by selecting Q0).movwf PORTB ; Write to PORTB.swapf bcd,W ; Get lower BCD digit in to W upper nibble.andlw 0xF0 ; Mask of strobe selection bits.iorlw 0x04 ; Set WR strobe.movwf PORTB ; Write to PORTB.andlw 0xF0 ; Clear strobe.movwf PORTB ; Write to PORTB.return ; Return.;------------------------------------------------------------------------------; Write state bits to state latch.wr_state swapf state,W ; Get state bits in to W<4:1>.iorlw 0x0E ; Set WR strobe.movwf PORTB ; Write to PORTB.andlw 0xF0 ; Clear strobe by selecting Q0.movwf PORTB ; Write to PORTB.return;------------------------------------------------------------------------------; Routine to convert a binary value (0..63) in to a BCD pair. The result is; returned in W. The lookup is done as a 'calculated goto' by modifying PCL; (the lower eight bits of the program counter). PCL is only eight bits wide; with the top five bits coming from the PCLATH register. We use an ORG; statement to ensure that addition of the offset (0..63) to the table address; doesn't overflow the PCL register (any overflow would be lost and would result; in a jump to some other part of the code).ORG 0x0100bin2bcd clrf PCLATH ; Clear PCLATH.bsf PCLATH,0 ; Set bit zero so that goto yields an; address 0x01xx.andlw H'3F' ; Ensure we limit lookup.addwf PCL,F ; Add offset in W to PCL to calc. goto.retlw 0x00retlw 0x01retlw 0x02retlw 0x03retlw 0x04retlw 0x05retlw 0x06retlw 0x07retlw 0x08retlw 0x09retlw 0x10retlw 0x11retlw 0x12retlw 0x13retlw 0x14retlw 0x15retlw 0x16retlw 0x17retlw 0x18retlw 0x19retlw 0x20retlw 0x21retlw 0x22retlw 0x23retlw 0x24retlw 0x25retlw 0x26retlw 0x27retlw 0x28retlw 0x29retlw 0x30retlw 0x31retlw 0x32retlw 0x33retlw 0x34retlw 0x35retlw 0x36retlw 0x37retlw 0x38retlw 0x39retlw 0x40retlw 0x41retlw 0x42retlw 0x43retlw 0x44retlw 0x45retlw 0x46retlw 0x47retlw 0x48retlw 0x49retlw 0x50retlw 0x51retlw 0x52retlw 0x53retlw 0x54retlw 0x55retlw 0x56retlw 0x57retlw 0x58retlw 0x59retlw 0x60retlw 0x61retlw 0x62retlw 0x63END
123version https://git-lfs.github.com/spec/v1oid sha256:f42fd6351846e8b295074c6945a0d097adb51c3dd8ec5282c836c579ddc66d25size 26212Message[302] C:\PRODEV\VSM\SAMPLES\CLOCK\PICCLOCK.ASM 50 : Register in operand not in bank 0. Ensure that bank bits are correct.Message[302] C:\PRODEV\VSM\SAMPLES\CLOCK\PICCLOCK.ASM 52 : Register in operand not in bank 0. Ensure that bank bits are correct.
123version https://git-lfs.github.com/spec/v1oid sha256:fea8042287d02b05d6dcb061685d9ef0b166937e722793ab677f94b87cce38b0size 168812345678910111213141516171819202122232425262728293031323334353637383940:020000000528D1:08000800212803018500860098:1000100083161F30850001308600831290019015F1:10002000003093000030920000309100940195015F:10003000CE20BF20B020DD2090308B0075204420E2:100040001E28940A1408193C031D41289401100825:10005000083A9000DD201008901D4128910A1108EF:100060003C3C03193528B02041289101B020920A68:1000700012083C3C03193E28BF2041289201BF20B2:10008000992090308B00090005185728101800346B:100090008B13950A101413080C3C031993011308D1:1000A00090180C3E93009010CE20DD207028101C7C:1000B00000348B13950A101013080B3C031C68289E:1000C0009010130803190C3E9300CE20DD207028F9:1000D00090140C30930203199300CE20DD20702879:1000E000950B013490308B000134851800348B134C:1000F000950A10159101B0209011DD204420851D36:100100008C28051D9528851C7E281011DD20950B57:10011000013490308B000134920A12083C3C0319E0:100120009201BF20851D92287E289920051D9628C2:100130007E281018A92813080C3C03199301930A70:10014000CE2013080C3C031D080002309006DD2071:100150000800930A1308183C03199301CE200800E5:10016000110800219600F0390A388600F03986001F:10017000160EF0390C388600F03986000800120897:1001800000219600F03906388600F0398600160EF8:10019000F03908388600F03986000800130800217D:1001A0009600F03902388600F0398600160EF039D4:1001B00004388600F03986000800100E0E388600DC:0601C000F0398600080082:100200008A010A143F39820700340134023403346E:1002100004340534063407340834093410341134F6:100220001234133414341534163417341834193482:100230002034213422342334243425342634273402:10024000283429343034313432343334343435348E:10025000363437343834393440344134423443341A:1002600044344534463447344834493450345134A6:100270005234533454345534563457345834593432:08028000603461346234633420:00000001FF
123version https://git-lfs.github.com/spec/v1oid sha256:734769e121f76092bef0e8d11bdf1933060b4f6d30d6bebc7f3080c25c2c145bsize 37538123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630MPASM 02.30 Released PICCLOCK.ASM 4-13-2000 14:45:46 PAGE 1LOC OBJECT CODE LINE SOURCE TEXTVALUE00001 LIST p=16F84 ; PIC16F844 is the target processor0000200003 #include "P16F84.INC" ; Include header file00001 LIST00002 ; P16F84.INC Standard Header File, Version 2.00 Microchip Technology, Inc.00136 LIST0000400005 CBLOCK 0x10 ; Temporary storage00000010 00006 state00000011 00007 secs00000012 00008 mins00000013 00009 hours00000014 00010 ticks00000015 00011 idc00000016 00012 bcd00013 ENDC0001400015 ; Constants for bit allocation. The BIT_x constants are actual bit numbers and00016 ; the MASK_x are bit masks for the same bit.00000000 00017 BIT_HSEL EQU H'0000'00000001 00018 BIT_TSET EQU H'0001'00000002 00019 BIT_HSET EQU H'0002'00000003 00020 BIT_MSET EQU H'0003'0002100000000 00022 BIT_H24 EQU H'0000'00000001 00023 BIT_PM EQU H'0001'00000002 00024 BIT_SET EQU H'0002'00000003 00025 BIT_HSB EQU H'0003'0002600000001 00027 MASK_H24 EQU H'0001'00000002 00028 MASK_PM EQU H'0002'00000004 00029 MASK_SET EQU H'0004'00000008 00030 MASK_HSB EQU H'0008'000310003200033 ; Macro to generate a MOVLW instruction that also causes a model break:00034 break MACRO arg00035 DW 0x3100 | (arg & H'FF')00036 ENDM000370000 00038 ORG 00000 2805 00039 entrypoint goto initialise000400004 00041 ORG 40004 2821 00042 intvector goto clock000430005 00044 initialise ; Register set up:0005 0103 00045 clrw ; Zero.0006 0085 00046 movwf PORTA ; Ensure PORTA is zero before we enable it.0007 0086 00047 movwf PORTB ; Ensure PORTB is zero before we enable it.0008 1683 00048 bsf STATUS,RP0 ; Select Bank 10009 301F 00049 movlw H'1F' ; Mask for PORTA inputs/outputs.Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.MPASM 02.30 Released PICCLOCK.ASM 4-13-2000 14:45:46 PAGE 2LOC OBJECT CODE LINE SOURCE TEXTVALUE000A 0085 00050 movwf TRISA ; Set TRISA register.000B 3001 00051 movlw H'01' ; Mask for PORTA inputs/outputs.Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.000C 0086 00052 movwf TRISB ; Set TRISB register.000D 1283 00053 bcf STATUS,RP0 ; Reselect Bank 0.0005400055 ; Initialise clock:000E 0190 00056 clrf state000F 1590 00057 bsf state,BIT_HSB0010 3000 00058 movlw D'0'0011 0093 00059 movwf hours0012 3000 00060 movlw D'0'0013 0092 00061 movwf mins0014 3000 00062 movlw D'0'0015 0091 00063 movwf secs0006400065 ; Clear 50Hz tick count:0016 0194 00066 clrf ticks0006700068 ; Clear interrupt disable count (idc) semaphore:0017 0195 00069 clrf idc0007000071 ; Initialise display:0018 20CE 00072 call wr_hours0019 20BF 00073 call wr_mins001A 20B0 00074 call wr_secs001B 20DD 00075 call wr_state0007600077 ; Finally initialise interrupts for clock on RB0/INT pin:001C 3090 00078 movlw H'90'001D 008B 00079 movwf INTCON00080001E 00081 start ; When not processing an interrupt we sit and check input pins:001E 2075 00082 call chk_tset ; Time set select active?001F 2044 00083 call chk_hsel ; H12/H24 display format select active?0020 281E 00084 goto start000850008600087 ;------------------------------------------------------------------------------00088 ; Interrupt handler. We come here for every tick of the time base.000890021 00090 clock ; Toggle half-second flag and set state outputs:0021 0A94 00091 incf ticks,F ; Increment clock ticks.0022 0814 00092 movf ticks,W ; Get ticks value.0023 3C19 00093 sublw D'25' ; Is it 25 (W=25-W)?0024 1D03 00094 btfss STATUS,Z ; Test zero flag.0025 2841 00095 goto endclock ; Return.000960026 00097 toggle_hs ; Half second - toggle HS flag, write it and return:0026 0194 00098 clrf ticks ; Reset timebase,0027 0810 00099 movf state,W ; Get state.0028 3A08 00100 xorlw MASK_HSB ; Toggle half-second bit.0029 0090 00101 movwf state ; Save it back to register.MPASM 02.30 Released PICCLOCK.ASM 4-13-2000 14:45:46 PAGE 3LOC OBJECT CODE LINE SOURCE TEXTVALUE002A 20DD 00102 call wr_state ; Display it.002B 0810 00103 movf state,W ; Get state.002C 1D90 00104 btfss state,BIT_HSB ; Is bit now clear?002D 2841 00105 goto endclock ; Return.00106002E 00107 inc_secs ; Incrmement seconds...002E 0A91 00108 incf secs,F ; Increment seconds count.002F 0811 00109 movf secs,W ; Get it into W.0030 3C3C 00110 sublw D'60' ; Is it 60 (W=60-W)?0031 1903 00111 btfsc STATUS,Z ; Test zero flag, skip clear if no set.0032 2835 00112 goto reset_secs ; Clear seconds, increment minutes.0033 20B0 00113 call wr_secs ; Write seconds it to display.0034 2841 00114 goto endclock ; Done.001150035 0191 00116 reset_secs clrf secs0036 20B0 00117 call wr_secs ; Write seconds to display.001180037 0A92 00119 incf mins,F ; Increment minute count.0038 0812 00120 movf mins,W ; Get it into W.0039 3C3C 00121 sublw D'60' ; Is it 60 (W=60-W)?003A 1903 00122 btfsc STATUS,Z ; Test zero flag, skip clear if no set.003B 283E 00123 goto reset_mins ; Clear minutes, increment hours.003C 20BF 00124 call wr_mins ; Write minutes it to display.003D 2841 00125 goto endclock ; Done.00126003E 0192 00127 reset_mins clrf mins ; Reset minute count to zero.003F 20BF 00128 call wr_mins ; Write minutes to display.001290040 2099 00130 call inc_hours ; Increment hours, display it with PM flag.001310041 3090 00132 endclock movlw H'90'0042 008B 00133 movwf INTCON0043 0009 00134 retfie ; Return0013500136 ;------------------------------------------------------------------------------00137 ; Subroutine. Check the state of the HSEL input and set h12/h24 format as00138 ; required.001390044 1805 00140 chk_hsel btfsc PORTA,BIT_HSEL ; Test 12/24 select.0045 2857 00141 goto set_h12 ; H12 set so switch to 12 hour format.00142 ; fall through ; H12 not set so switch to 24 hour format.001430046 1810 00144 set_h24 btfsc state,BIT_H24 ; Are we on 12 hour format?0047 3400 00145 retlw 0 ; No, so no need to do anything...001460048 138B 00147 bcf INTCON,GIE ; Disable interrupts.0049 0A95 00148 incf idc,F ; Increment count of number of disables.004A 1410 00149 bsf state,BIT_H24 ; Clear h12 flag.00150004B 0813 00151 movf hours,W ; Get hours value.004C 3C0C 00152 sublw D'12' ; Is it 12:xx?004D 1903 00153 btfsc STATUS,Z ; Test zero flag.004E 0193 00154 clrf hours ; Reset to zero.MPASM 02.30 Released PICCLOCK.ASM 4-13-2000 14:45:46 PAGE 4LOC OBJECT CODE LINE SOURCE TEXTVALUE004F 0813 00155 movf hours,W ; Get hours value.0050 1890 00156 btfsc state,BIT_PM ; Is the PM indicator set?0051 3E0C 00157 addlw D'12' ; Add 12 to get 24 hour value.0052 0093 00158 movwf hours ; Save result (does nothing for AM).0053 1090 00159 bcf state,BIT_PM ; Clear PM flag.0054 20CE 00160 call wr_hours ; Write hours.0055 20DD 00161 call wr_state ; Write H12 state and PM state.0056 2870 00162 goto chk_hsel_iec ; Done.001630057 1C10 00164 set_h12 btfss state,BIT_H24 ; Are we on 12 hour format?0058 3400 00165 retlw 0 ; Yes, so no need to do anything...001660059 138B 00167 bcf INTCON,GIE ; Disable interrupts.005A 0A95 00168 incf idc,F ; Increment count of number of disables.005B 1010 00169 bcf state,BIT_H24 ; Set h12 flag.00170005C 0813 00171 movf hours,W ; Get hour value.005D 3C0B 00172 sublw D'11' ; W=11-W. C is clear for a borrow (W>=12).005E 1C03 00173 btfss STATUS,C ; Test carry flag.005F 2868 00174 goto set_h12_pm ; Set PM.001750060 1090 00176 set_h12_am bcf state,BIT_PM ; Clear PM bit.0061 0813 00177 movf hours,W ; Get hours.0062 1903 00178 btfsc STATUS,Z ; Is it zero?0063 3E0C 00179 addlw D'12' ; Yes, add 12 to get 00:xx to 12:xx.0064 0093 00180 movwf hours ; Save any result.0065 20CE 00181 call wr_hours ; Display hours.0066 20DD 00182 call wr_state ; Display H12 and PM states.0067 2870 00183 goto chk_hsel_iec ; Done.001840068 1490 00185 set_h12_pm bsf state,BIT_PM ; Set PM bit.0069 300C 00186 movlw D'12' ; Constant.006A 0293 00187 subwf hours,F ; hours=hours-12 (23..12 -> 11..0).006B 1903 00188 btfsc STATUS,Z ; Zero set?006C 0093 00189 movwf hours ; Yes, so reset to '12'.006D 20CE 00190 call wr_hours ; No, so leave hours alone and display it.006E 20DD 00191 call wr_state ; Display H12 and PM states.006F 2870 00192 goto chk_hsel_iec ; Done.001930070 0B95 00194 chk_hsel_iec decfsz idc,F ; Decrement idc. If zero we can reenable interrupts.0071 3401 00195 retlw 1 ; Return without enabling interrupts.001960072 3090 00197 chk_hsel_done movlw H'90' ; Constant for GIE and T0IE.0073 008B 00198 movwf INTCON ; Set interrupt register.0074 3401 00199 retlw 1 ; Return.0020000201 ;------------------------------------------------------------------------------0075 1885 00202 chk_tset btfsc PORTA,BIT_TSET ; Set mode?0076 3400 00203 retlw 0002040077 138B 00205 bcf INTCON,GIE ; Disable interrupts.0078 0A95 00206 incf idc,F ; Increment count of number of disables.0079 1510 00207 bsf state,BIT_SET ; Set the 'set mode' bit.MPASM 02.30 Released PICCLOCK.ASM 4-13-2000 14:45:46 PAGE 5LOC OBJECT CODE LINE SOURCE TEXTVALUE007A 0191 00208 clrf secs ; Setting time resets seconds count.007B 20B0 00209 call wr_secs ; Display it.007C 1190 00210 bcf state,BIT_HSB ; Clear seconds toggle.007D 20DD 00211 call wr_state ; Update the state output latch.00212007E 2044 00213 set_loop call chk_hsel ; Check for H12/H24 display change.007F 1D85 00214 btfss PORTA,BIT_MSET ; If pin is high then switch is open.0080 288C 00215 goto set_mins ; Bit not set, switch closed, set minutes.0081 1D05 00216 btfss PORTA,BIT_HSET ; If pin is high then switch is open.0082 2895 00217 goto set_hours ; Bit not set, switch closed, set hours.0083 1C85 00218 btfss PORTA,BIT_TSET ; If pin is high then switch is open.0084 287E 00219 goto set_loop ; Bit not set, switch closed, loop.002200085 1110 00221 bcf state,BIT_SET ; Clear the 'set mode' bit.0086 20DD 00222 call wr_state ; Update the state output latch.002230087 0B95 00224 chk_tset_idc decfsz idc,F ; Decrement idc. If zero we can reenable interrupts.0088 3401 00225 retlw 1 ; Return without enabling interrupts.0089 3090 00226 chk_tset_done movlw H'90' ; Constant for GIE and T0IE.008A 008B 00227 movwf INTCON ; Set interrupt register.008B 3401 00228 retlw 1 ; Return.00229008C 0A92 00230 set_mins incf mins,F ; Increment minute count.008D 0812 00231 movf mins,W ; Get it into W.008E 3C3C 00232 sublw D'60' ; Is it 60 (W=60-W)?008F 1903 00233 btfsc STATUS,Z ; Test zero flag, skip clear if no set.0090 0192 00234 clrf mins ; Clear minutes.0091 20BF 00235 call wr_mins ; Write minutes.002360092 1D85 00237 debounce_mset btfss PORTA,BIT_MSET ; Wait for MSET button to be released.0093 2892 00238 goto debounce_mset ; Loop.0094 287E 00239 goto set_loop ; Released so recheck buttons.002400095 2099 00241 set_hours call inc_hours ; Increment hours and display.0096 1D05 00242 debounce_hset btfss PORTA,BIT_HSET ; Wait for HSET button to be released.0097 2896 00243 goto debounce_hset ; Loop.0098 287E 00244 goto set_loop ; Released so recheck buttons.0024500246 ;------------------------------------------------------------------------------00247 ; Increment hours, set PM indicator bit as necessary.002480099 1810 00249 inc_hours btfsc state,BIT_H24 ; 12h display?009A 28A9 00250 goto reset_on24 ; No, so we reset when we get to 24.00251009B 0813 00252 reset_on12 movf hours,W ; Get hours009C 3C0C 00253 sublw D'12' ; Is it 12 (W=12-W)?009D 1903 00254 btfsc STATUS,Z ; Test zero flag, skip clear if no set.009E 0193 00255 clrf hours ; Clear hours.009F 0A93 00256 incf hours,F ; Increment hours.00A0 20CE 00257 call wr_hours ; Write it.00A1 0813 00258 movf hours,W ; Get hours00A2 3C0C 00259 sublw D'12' ; Is it 12 (W=12-W)?00A3 1D03 00260 btfss STATUS,Z ; Test zero flag.MPASM 02.30 Released PICCLOCK.ASM 4-13-2000 14:45:46 PAGE 6LOC OBJECT CODE LINE SOURCE TEXTVALUE00A4 0008 00261 return ; Zero not set, so not 12, so return.00A5 3002 00262 movlw MASK_PM ; Get PM state bit mask.00A6 0690 00263 xorwf state,F ; Toggle PM state bit in state.00A7 20DD 00264 call wr_state ; Update state outputs.00A8 0008 00265 return ; Return.0026600A9 0A93 00267 reset_on24 incf hours,F ; Incrment hours.00AA 0813 00268 movf hours,W ; Get it in W.00AB 3C18 00269 sublw D'24' ; Is it 24 (W=24-W)?00AC 1903 00270 btfsc STATUS,Z ; Test zero flag, skip clear if no set.00AD 0193 00271 clrf hours ; Clear hours 24->0.00AE 20CE 00272 call wr_hours ; Write hours to display.00AF 0008 00273 return0027400275 ;------------------------------------------------------------------------------00276 ; Get seconds value, split to get BCD pair and write to port.00B0 0811 00277 wr_secs movf secs,W ; Get seconds.00B1 2100 00278 call bin2bcd ; Convert to BCD.00B2 0096 00279 movwf bcd ; Save result.00B3 39F0 00280 andlw 0xF0 ; Mask BCD pair to leave upper digit in W upper nibble.00B4 380A 00281 iorlw 0x0A ; Select strobe.00B5 0086 00282 movwf PORTB ; Write to PORTB.00B6 39F0 00283 andlw 0xF0 ; Clear strobe (by selecting Q0).00B7 0086 00284 movwf PORTB ; Write to PORTB.00B8 0E16 00285 swapf bcd,W ; Get lower BCD digit in to W upper nibble.00B9 39F0 00286 andlw 0xF0 ; Mask of strobe selection bits.00BA 380C 00287 iorlw 0x0C ; Set WR strobe.00BB 0086 00288 movwf PORTB ; Write to PORTB.00BC 39F0 00289 andlw 0xF0 ; Clear strobe.00BD 0086 00290 movwf PORTB ; Write to PORTB.00BE 0008 00291 return ; Return.0029200293 ;------------------------------------------------------------------------------00294 ; Get minutes value, split to get BCD pair and write to port.00BF 0812 00295 wr_mins movf mins,W ; Get minutes value.00C0 2100 00296 call bin2bcd ; Convert to BCD.00C1 0096 00297 movwf bcd ; Save result.00C2 39F0 00298 andlw 0xF0 ; Mask BCD pair to leave upper digit in W upper nibble.00C3 3806 00299 iorlw 0x06 ; Select strobe.00C4 0086 00300 movwf PORTB ; Write to PORTB.00C5 39F0 00301 andlw 0xF0 ; Clear strobe (by selecting Q0).00C6 0086 00302 movwf PORTB ; Write to PORTB.00C7 0E16 00303 swapf bcd,W ; Get lower BCD digit in to W upper nibble.00C8 39F0 00304 andlw 0xF0 ; Mask of strobe selection bits.00C9 3808 00305 iorlw 0x08 ; Set WR strobe.00CA 0086 00306 movwf PORTB ; Write to PORTB.00CB 39F0 00307 andlw 0xF0 ; Clear strobe.00CC 0086 00308 movwf PORTB ; Write to PORTB.00CD 0008 00309 return ; Return.0031000311 ;------------------------------------------------------------------------------00312 ; Get hours value, split to get BCD pair and write to port.00CE 0813 00313 wr_hours movf hours,W ; Get hours value/MPASM 02.30 Released PICCLOCK.ASM 4-13-2000 14:45:46 PAGE 7LOC OBJECT CODE LINE SOURCE TEXTVALUE00CF 2100 00314 call bin2bcd ; Convert to BCD.00D0 0096 00315 movwf bcd ; Save result.00D1 39F0 00316 andlw 0xF0 ; Mask BCD pair to leave upper digit in W upper nibble.00D2 3802 00317 iorlw 0x02 ; Select strobe.00D3 0086 00318 movwf PORTB ; Write to PORTB.00D4 39F0 00319 andlw 0xF0 ; Clear strobe (by selecting Q0).00D5 0086 00320 movwf PORTB ; Write to PORTB.00D6 0E16 00321 swapf bcd,W ; Get lower BCD digit in to W upper nibble.00D7 39F0 00322 andlw 0xF0 ; Mask of strobe selection bits.00D8 3804 00323 iorlw 0x04 ; Set WR strobe.00D9 0086 00324 movwf PORTB ; Write to PORTB.00DA 39F0 00325 andlw 0xF0 ; Clear strobe.00DB 0086 00326 movwf PORTB ; Write to PORTB.00DC 0008 00327 return ; Return.0032800329 ;------------------------------------------------------------------------------00330 ; Write state bits to state latch.00DD 0E10 00331 wr_state swapf state,W ; Get state bits in to W<4:1>.00DE 380E 00332 iorlw 0x0E ; Set WR strobe.00DF 0086 00333 movwf PORTB ; Write to PORTB.00E0 39F0 00334 andlw 0xF0 ; Clear strobe by selecting Q0.00E1 0086 00335 movwf PORTB ; Write to PORTB.00E2 0008 00336 return0033700338 ;------------------------------------------------------------------------------00339 ; Routine to convert a binary value (0..63) in to a BCD pair. The result is00340 ; returned in W. The lookup is done as a 'calculated goto' by modifying PCL00341 ; (the lower eight bits of the program counter). PCL is only eight bits wide00342 ; with the top five bits coming from the PCLATH register. We use an ORG00343 ; statement to ensure that addition of the offset (0..63) to the table address00344 ; doesn't overflow the PCL register (any overflow would be lost and would result00345 ; in a jump to some other part of the code).003460100 00347 ORG 0x0100003480100 018A 00349 bin2bcd clrf PCLATH ; Clear PCLATH.0101 140A 00350 bsf PCLATH,0 ; Set bit zero so that goto yields an00351 ; address 0x01xx.0102 393F 00352 andlw H'3F' ; Ensure we limit lookup.0103 0782 00353 addwf PCL,F ; Add offset in W to PCL to calc. goto.003540104 3400 00355 retlw 0x000105 3401 00356 retlw 0x010106 3402 00357 retlw 0x020107 3403 00358 retlw 0x030108 3404 00359 retlw 0x040109 3405 00360 retlw 0x05010A 3406 00361 retlw 0x06010B 3407 00362 retlw 0x07010C 3408 00363 retlw 0x08010D 3409 00364 retlw 0x09010E 3410 00365 retlw 0x10010F 3411 00366 retlw 0x11MPASM 02.30 Released PICCLOCK.ASM 4-13-2000 14:45:46 PAGE 8LOC OBJECT CODE LINE SOURCE TEXTVALUE0110 3412 00367 retlw 0x120111 3413 00368 retlw 0x130112 3414 00369 retlw 0x140113 3415 00370 retlw 0x150114 3416 00371 retlw 0x160115 3417 00372 retlw 0x170116 3418 00373 retlw 0x180117 3419 00374 retlw 0x190118 3420 00375 retlw 0x200119 3421 00376 retlw 0x21011A 3422 00377 retlw 0x22011B 3423 00378 retlw 0x23011C 3424 00379 retlw 0x24011D 3425 00380 retlw 0x25011E 3426 00381 retlw 0x26011F 3427 00382 retlw 0x270120 3428 00383 retlw 0x280121 3429 00384 retlw 0x290122 3430 00385 retlw 0x300123 3431 00386 retlw 0x310124 3432 00387 retlw 0x320125 3433 00388 retlw 0x330126 3434 00389 retlw 0x340127 3435 00390 retlw 0x350128 3436 00391 retlw 0x360129 3437 00392 retlw 0x37012A 3438 00393 retlw 0x38012B 3439 00394 retlw 0x39012C 3440 00395 retlw 0x40012D 3441 00396 retlw 0x41012E 3442 00397 retlw 0x42012F 3443 00398 retlw 0x430130 3444 00399 retlw 0x440131 3445 00400 retlw 0x450132 3446 00401 retlw 0x460133 3447 00402 retlw 0x470134 3448 00403 retlw 0x480135 3449 00404 retlw 0x490136 3450 00405 retlw 0x500137 3451 00406 retlw 0x510138 3452 00407 retlw 0x520139 3453 00408 retlw 0x53013A 3454 00409 retlw 0x54013B 3455 00410 retlw 0x55013C 3456 00411 retlw 0x56013D 3457 00412 retlw 0x57013E 3458 00413 retlw 0x58013F 3459 00414 retlw 0x590140 3460 00415 retlw 0x600141 3461 00416 retlw 0x610142 3462 00417 retlw 0x620143 3463 00418 retlw 0x6300419MPASM 02.30 Released PICCLOCK.ASM 4-13-2000 14:45:46 PAGE 9LOC OBJECT CODE LINE SOURCE TEXTVALUE00420 ENDMPASM 02.30 Released PICCLOCK.ASM 4-13-2000 14:45:46 PAGE 10SYMBOL TABLELABEL VALUEBIT_H24 00000000BIT_HSB 00000003BIT_HSEL 00000000BIT_HSET 00000002BIT_MSET 00000003BIT_PM 00000001BIT_SET 00000002BIT_TSET 00000001C 00000000DC 00000001EEADR 00000009EECON1 00000088EECON2 00000089EEDATA 00000008EEIE 00000006EEIF 00000004F 00000001FSR 00000004GIE 00000007INDF 00000000INTCON 0000000BINTE 00000004INTEDG 00000006INTF 00000001IRP 00000007MASK_H24 00000001MASK_HSB 00000008MASK_PM 00000002MASK_SET 00000004NOT_PD 00000003NOT_RBPU 00000007NOT_TO 00000004OPTION_REG 00000081PCL 00000002PCLATH 0000000APORTA 00000005PORTB 00000006PS0 00000000PS1 00000001PS2 00000002PSA 00000003RBIE 00000003RBIF 00000000RD 00000000RP0 00000005RP1 00000006STATUS 00000003T0CS 00000005T0IE 00000005T0IF 00000002T0SE 00000004TMR0 00000001TRISA 00000085MPASM 02.30 Released PICCLOCK.ASM 4-13-2000 14:45:46 PAGE 11SYMBOL TABLELABEL VALUETRISB 00000086W 00000000WR 00000001WREN 00000002WRERR 00000003Z 00000002_CP_OFF 00003FFF_CP_ON 0000000F_HS_OSC 00003FFE_LP_OSC 00003FFC_PWRTE_OFF 00003FFF_PWRTE_ON 00003FF7_RC_OSC 00003FFF_WDT_OFF 00003FFB_WDT_ON 00003FFF_XT_OSC 00003FFD__16F84 00000001bcd 00000016bin2bcd 00000100breakchk_hsel 00000044chk_hsel_done 00000072chk_hsel_iec 00000070chk_tset 00000075chk_tset_done 00000089chk_tset_idc 00000087clock 00000021debounce_hset 00000096debounce_mset 00000092endclock 00000041entrypoint 00000000hours 00000013idc 00000015inc_hours 00000099inc_secs 0000002Einitialise 00000005intvector 00000004mins 00000012reset_mins 0000003Ereset_on12 0000009Breset_on24 000000A9reset_secs 00000035secs 00000011set_h12 00000057set_h12_am 00000060set_h12_pm 00000068set_h24 00000046set_hours 00000095set_loop 0000007Eset_mins 0000008Cstart 0000001Estate 00000010ticks 00000014MPASM 02.30 Released PICCLOCK.ASM 4-13-2000 14:45:46 PAGE 12SYMBOL TABLELABEL VALUEtoggle_hs 00000026wr_hours 000000CEwr_mins 000000BFwr_secs 000000B0wr_state 000000DDMEMORY USAGE MAP ('X' = Used, '-' = Unused)0000 : X---XXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX0040 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX0080 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX00C0 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXX------------- ----------------0100 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX0140 : XXXX------------ ---------------- ---------------- ----------------All other memory blocks unused.Program Memory Words Used: 292Program Memory Words Free: 732Errors : 0Warnings : 0 reported, 0 suppressedMessages : 2 reported, 0 suppressed
123version https://git-lfs.github.com/spec/v1oid sha256:67c545349b5f41a52ea71dd2e14ef7e512f95089ea899da8b3afd711d2002109size 22902123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420,,, LIST p=16F84 ; PIC16F844 is the target processor,,,,,, #include "P16F84.INC" ; Include header file,,,,,, CBLOCK 0x10 ; Temporary storage,,, state,,, secs,,, mins,,, hours,,, ticks,,, idc,,, bcd,,, ENDC,,,,,,; Constants for bit allocation. The BIT_x constants are actual bit numbers and,,,; the MASK_x are bit masks for the same bit.,,,BIT_HSEL EQU H'0000',,,BIT_TSET EQU H'0001',,,BIT_HSET EQU H'0002',,,BIT_MSET EQU H'0003',,,,,,BIT_H24 EQU H'0000',,,BIT_PM EQU H'0001',,,BIT_SET EQU H'0002',,,BIT_HSB EQU H'0003',,,,,,MASK_H24 EQU H'0001',,,MASK_PM EQU H'0002',,,MASK_SET EQU H'0004',,,MASK_HSB EQU H'0008',,,,,,,,,; Macro to generate a MOVLW instruction that also causes a model break:,,,break MACRO arg,,, DW 0x3100 | (arg & H'FF'),,, ENDM,,,,,, ORG 00000,2805,entrypoint,entrypoint goto initialise,,,,,, ORG 40004,2821,intvector,intvector goto clock,,,0005,,initialise,initialise ; Register set up:0005,0103,, clrw ; Zero.0006,0085,, movwf PORTA ; Ensure PORTA is zero before we enable it.0007,0086,, movwf PORTB ; Ensure PORTB is zero before we enable it.0008,1683,, bsf STATUS,RP0 ; Select Bank 10009,301F,, movlw H'1F' ; Mask for PORTA inputs/outputs.000A,0085,, movwf TRISA ; Set TRISA register.000B,3001,, movlw H'01' ; Mask for PORTA inputs/outputs.000C,0086,, movwf TRISB ; Set TRISB register.000D,1283,, bcf STATUS,RP0 ; Reselect Bank 0.,,,,,, ; Initialise clock:000E,0190,, clrf state000F,1590,, bsf state,BIT_HSB0010,3000,, movlw D'0'0011,0093,, movwf hours0012,3000,, movlw D'0'0013,0092,, movwf mins0014,3000,, movlw D'0'0015,0091,, movwf secs,,,,,, ; Clear 50Hz tick count:0016,0194,, clrf ticks,,,,,, ; Clear interrupt disable count (idc) semaphore:0017,0195,, clrf idc,,,,,, ; Initialise display:0018,20CE,, call wr_hours0019,20BF,, call wr_mins001A,20B0,, call wr_secs001B,20DD,, call wr_state,,,,,, ; Finally initialise interrupts for clock on RB0/INT pin:001C,3090,, movlw H'90'001D,008B,, movwf INTCON,,,001E,,start,start ; When not processing an interrupt we sit and check input pins:001E,2075,, call chk_tset ; Time set select active?001F,2044,, call chk_hsel ; H12/H24 display format select active?0020,281E,, goto start,,,,,,,,,;------------------------------------------------------------------------------,,,; Interrupt handler. We come here for every tick of the time base.,,,0021,,clock,clock ; Toggle half-second flag and set state outputs:0021,0A94,, incf ticks,F ; Increment clock ticks.0022,0814,, movf ticks,W ; Get ticks value.0023,3C19,, sublw D'25' ; Is it 25 (W=25-W)?0024,1D03,, btfss STATUS,Z ; Test zero flag.0025,2841,, goto endclock ; Return.,,,0026,,toggle_hs,toggle_hs ; Half second - toggle HS flag, write it and return:0026,0194,, clrf ticks ; Reset timebase,0027,0810,, movf state,W ; Get state.0028,3A08,, xorlw MASK_HSB ; Toggle half-second bit.0029,0090,, movwf state ; Save it back to register.002A,20DD,, call wr_state ; Display it.002B,0810,, movf state,W ; Get state.002C,1D90,, btfss state,BIT_HSB ; Is bit now clear?002D,2841,, goto endclock ; Return.,,,002E,,inc_secs,inc_secs ; Incrmement seconds...002E,0A91,, incf secs,F ; Increment seconds count.002F,0811,, movf secs,W ; Get it into W.0030,3C3C,, sublw D'60' ; Is it 60 (W=60-W)?0031,1903,, btfsc STATUS,Z ; Test zero flag, skip clear if no set.0032,2835,, goto reset_secs ; Clear seconds, increment minutes.0033,20B0,, call wr_secs ; Write seconds it to display.0034,2841,, goto endclock ; Done.,,,0035,0191,reset_secs,reset_secs clrf secs0036,20B0,, call wr_secs ; Write seconds to display.,,,0037,0A92,, incf mins,F ; Increment minute count.0038,0812,, movf mins,W ; Get it into W.0039,3C3C,, sublw D'60' ; Is it 60 (W=60-W)?003A,1903,, btfsc STATUS,Z ; Test zero flag, skip clear if no set.003B,283E,, goto reset_mins ; Clear minutes, increment hours.003C,20BF,, call wr_mins ; Write minutes it to display.003D,2841,, goto endclock ; Done.,,,003E,0192,reset_mins,reset_mins clrf mins ; Reset minute count to zero.003F,20BF,, call wr_mins ; Write minutes to display.,,,0040,2099,, call inc_hours ; Increment hours, display it with PM flag.,,,0041,3090,endclock,endclock movlw H'90'0042,008B,, movwf INTCON0043,0009,, retfie ; Return,,,,,,;------------------------------------------------------------------------------,,,; Subroutine. Check the state of the HSEL input and set h12/h24 format as,,,; required.,,,0044,1805,chk_hsel,chk_hsel btfsc PORTA,BIT_HSEL ; Test 12/24 select.0045,2857,, goto set_h12 ; H12 set so switch to 12 hour format.,,, ; fall through ; H12 not set so switch to 24 hour format.,,,0046,1810,set_h24,set_h24 btfsc state,BIT_H24 ; Are we on 12 hour format?0047,3400,, retlw 0 ; No, so no need to do anything...,,,0048,138B,, bcf INTCON,GIE ; Disable interrupts.0049,0A95,, incf idc,F ; Increment count of number of disables.004A,1410,, bsf state,BIT_H24 ; Clear h12 flag.,,,004B,0813,, movf hours,W ; Get hours value.004C,3C0C,, sublw D'12' ; Is it 12:xx?004D,1903,, btfsc STATUS,Z ; Test zero flag.004E,0193,, clrf hours ; Reset to zero.004F,0813,, movf hours,W ; Get hours value.0050,1890,, btfsc state,BIT_PM ; Is the PM indicator set?0051,3E0C,, addlw D'12' ; Add 12 to get 24 hour value.0052,0093,, movwf hours ; Save result (does nothing for AM).0053,1090,, bcf state,BIT_PM ; Clear PM flag.0054,20CE,, call wr_hours ; Write hours.0055,20DD,, call wr_state ; Write H12 state and PM state.0056,2870,, goto chk_hsel_iec ; Done.,,,0057,1C10,set_h12,set_h12 btfss state,BIT_H24 ; Are we on 12 hour format?0058,3400,, retlw 0 ; Yes, so no need to do anything...,,,0059,138B,, bcf INTCON,GIE ; Disable interrupts.005A,0A95,, incf idc,F ; Increment count of number of disables.005B,1010,, bcf state,BIT_H24 ; Set h12 flag.,,,005C,0813,, movf hours,W ; Get hour value.005D,3C0B,, sublw D'11' ; W=11-W. C is clear for a borrow (W>=12).005E,1C03,, btfss STATUS,C ; Test carry flag.005F,2868,, goto set_h12_pm ; Set PM.,,,0060,1090,set_h12_am,set_h12_am bcf state,BIT_PM ; Clear PM bit.0061,0813,, movf hours,W ; Get hours.0062,1903,, btfsc STATUS,Z ; Is it zero?0063,3E0C,, addlw D'12' ; Yes, add 12 to get 00:xx to 12:xx.0064,0093,, movwf hours ; Save any result.0065,20CE,, call wr_hours ; Display hours.0066,20DD,, call wr_state ; Display H12 and PM states.0067,2870,, goto chk_hsel_iec ; Done.,,,0068,1490,set_h12_pm,set_h12_pm bsf state,BIT_PM ; Set PM bit.0069,300C,, movlw D'12' ; Constant.006A,0293,, subwf hours,F ; hours=hours-12 (23..12 -> 11..0).006B,1903,, btfsc STATUS,Z ; Zero set?006C,0093,, movwf hours ; Yes, so reset to '12'.006D,20CE,, call wr_hours ; No, so leave hours alone and display it.006E,20DD,, call wr_state ; Display H12 and PM states.006F,2870,, goto chk_hsel_iec ; Done.,,,0070,0B95,chk_hsel_iec,chk_hsel_iec decfsz idc,F ; Decrement idc. If zero we can reenable interrupts.0071,3401,, retlw 1 ; Return without enabling interrupts.,,,0072,3090,chk_hsel_done,chk_hsel_done movlw H'90' ; Constant for GIE and T0IE.0073,008B,, movwf INTCON ; Set interrupt register.0074,3401,, retlw 1 ; Return.,,,,,,;------------------------------------------------------------------------------0075,1885,chk_tset,chk_tset btfsc PORTA,BIT_TSET ; Set mode?0076,3400,, retlw 0,,,0077,138B,, bcf INTCON,GIE ; Disable interrupts.0078,0A95,, incf idc,F ; Increment count of number of disables.0079,1510,, bsf state,BIT_SET ; Set the 'set mode' bit.007A,0191,, clrf secs ; Setting time resets seconds count.007B,20B0,, call wr_secs ; Display it.007C,1190,, bcf state,BIT_HSB ; Clear seconds toggle.007D,20DD,, call wr_state ; Update the state output latch.,,,007E,2044,set_loop,set_loop call chk_hsel ; Check for H12/H24 display change.007F,1D85,, btfss PORTA,BIT_MSET ; If pin is high then switch is open.0080,288C,, goto set_mins ; Bit not set, switch closed, set minutes.0081,1D05,, btfss PORTA,BIT_HSET ; If pin is high then switch is open.0082,2895,, goto set_hours ; Bit not set, switch closed, set hours.0083,1C85,, btfss PORTA,BIT_TSET ; If pin is high then switch is open.0084,287E,, goto set_loop ; Bit not set, switch closed, loop.,,,0085,1110,, bcf state,BIT_SET ; Clear the 'set mode' bit.0086,20DD,, call wr_state ; Update the state output latch.,,,0087,0B95,chk_tset_idc,chk_tset_idc decfsz idc,F ; Decrement idc. If zero we can reenable interrupts.0088,3401,, retlw 1 ; Return without enabling interrupts.0089,3090,chk_tset_done,chk_tset_done movlw H'90' ; Constant for GIE and T0IE.008A,008B,, movwf INTCON ; Set interrupt register.008B,3401,, retlw 1 ; Return.,,,008C,0A92,set_mins,set_mins incf mins,F ; Increment minute count.008D,0812,, movf mins,W ; Get it into W.008E,3C3C,, sublw D'60' ; Is it 60 (W=60-W)?008F,1903,, btfsc STATUS,Z ; Test zero flag, skip clear if no set.0090,0192,, clrf mins ; Clear minutes.0091,20BF,, call wr_mins ; Write minutes.,,,0092,1D85,debounce_mset,debounce_mset btfss PORTA,BIT_MSET ; Wait for MSET button to be released.0093,2892,, goto debounce_mset ; Loop.0094,287E,, goto set_loop ; Released so recheck buttons.,,,0095,2099,set_hours,set_hours call inc_hours ; Increment hours and display.0096,1D05,debounce_hset,debounce_hset btfss PORTA,BIT_HSET ; Wait for HSET button to be released.0097,2896,, goto debounce_hset ; Loop.0098,287E,, goto set_loop ; Released so recheck buttons.,,,,,,;------------------------------------------------------------------------------,,,; Increment hours, set PM indicator bit as necessary.,,,0099,1810,inc_hours,inc_hours btfsc state,BIT_H24 ; 12h display?009A,28A9,, goto reset_on24 ; No, so we reset when we get to 24.,,,009B,0813,reset_on12,reset_on12 movf hours,W ; Get hours009C,3C0C,, sublw D'12' ; Is it 12 (W=12-W)?009D,1903,, btfsc STATUS,Z ; Test zero flag, skip clear if no set.009E,0193,, clrf hours ; Clear hours.009F,0A93,, incf hours,F ; Increment hours.00A0,20CE,, call wr_hours ; Write it.00A1,0813,, movf hours,W ; Get hours00A2,3C0C,, sublw D'12' ; Is it 12 (W=12-W)?00A3,1D03,, btfss STATUS,Z ; Test zero flag.00A4,0008,, return ; Zero not set, so not 12, so return.00A5,3002,, movlw MASK_PM ; Get PM state bit mask.00A6,0690,, xorwf state,F ; Toggle PM state bit in state.00A7,20DD,, call wr_state ; Update state outputs.00A8,0008,, return ; Return.,,,00A9,0A93,reset_on24,reset_on24 incf hours,F ; Incrment hours.00AA,0813,, movf hours,W ; Get it in W.00AB,3C18,, sublw D'24' ; Is it 24 (W=24-W)?00AC,1903,, btfsc STATUS,Z ; Test zero flag, skip clear if no set.00AD,0193,, clrf hours ; Clear hours 24->0.00AE,20CE,, call wr_hours ; Write hours to display.00AF,0008,, return,,,,,,;------------------------------------------------------------------------------,,,; Get seconds value, split to get BCD pair and write to port.00B0,0811,wr_secs,wr_secs movf secs,W ; Get seconds.00B1,2100,, call bin2bcd ; Convert to BCD.00B2,0096,, movwf bcd ; Save result.00B3,39F0,, andlw 0xF0 ; Mask BCD pair to leave upper digit in W upper nibble.00B4,380A,, iorlw 0x0A ; Select strobe.00B5,0086,, movwf PORTB ; Write to PORTB.00B6,39F0,, andlw 0xF0 ; Clear strobe (by selecting Q0).00B7,0086,, movwf PORTB ; Write to PORTB.00B8,0E16,, swapf bcd,W ; Get lower BCD digit in to W upper nibble.00B9,39F0,, andlw 0xF0 ; Mask of strobe selection bits.00BA,380C,, iorlw 0x0C ; Set WR strobe.00BB,0086,, movwf PORTB ; Write to PORTB.00BC,39F0,, andlw 0xF0 ; Clear strobe.00BD,0086,, movwf PORTB ; Write to PORTB.00BE,0008,, return ; Return.,,,,,,;------------------------------------------------------------------------------,,,; Get minutes value, split to get BCD pair and write to port.00BF,0812,wr_mins,wr_mins movf mins,W ; Get minutes value.00C0,2100,, call bin2bcd ; Convert to BCD.00C1,0096,, movwf bcd ; Save result.00C2,39F0,, andlw 0xF0 ; Mask BCD pair to leave upper digit in W upper nibble.00C3,3806,, iorlw 0x06 ; Select strobe.00C4,0086,, movwf PORTB ; Write to PORTB.00C5,39F0,, andlw 0xF0 ; Clear strobe (by selecting Q0).00C6,0086,, movwf PORTB ; Write to PORTB.00C7,0E16,, swapf bcd,W ; Get lower BCD digit in to W upper nibble.00C8,39F0,, andlw 0xF0 ; Mask of strobe selection bits.00C9,3808,, iorlw 0x08 ; Set WR strobe.00CA,0086,, movwf PORTB ; Write to PORTB.00CB,39F0,, andlw 0xF0 ; Clear strobe.00CC,0086,, movwf PORTB ; Write to PORTB.00CD,0008,, return ; Return.,,,,,,;------------------------------------------------------------------------------,,,; Get hours value, split to get BCD pair and write to port.00CE,0813,wr_hours,wr_hours movf hours,W ; Get hours value/00CF,2100,, call bin2bcd ; Convert to BCD.00D0,0096,, movwf bcd ; Save result.00D1,39F0,, andlw 0xF0 ; Mask BCD pair to leave upper digit in W upper nibble.00D2,3802,, iorlw 0x02 ; Select strobe.00D3,0086,, movwf PORTB ; Write to PORTB.00D4,39F0,, andlw 0xF0 ; Clear strobe (by selecting Q0).00D5,0086,, movwf PORTB ; Write to PORTB.00D6,0E16,, swapf bcd,W ; Get lower BCD digit in to W upper nibble.00D7,39F0,, andlw 0xF0 ; Mask of strobe selection bits.00D8,3804,, iorlw 0x04 ; Set WR strobe.00D9,0086,, movwf PORTB ; Write to PORTB.00DA,39F0,, andlw 0xF0 ; Clear strobe.00DB,0086,, movwf PORTB ; Write to PORTB.00DC,0008,, return ; Return.,,,,,,;------------------------------------------------------------------------------,,,; Write state bits to state latch.00DD,0E10,wr_state,wr_state swapf state,W ; Get state bits in to W<4:1>.00DE,380E,, iorlw 0x0E ; Set WR strobe.00DF,0086,, movwf PORTB ; Write to PORTB.00E0,39F0,, andlw 0xF0 ; Clear strobe by selecting Q0.00E1,0086,, movwf PORTB ; Write to PORTB.00E2,0008,, return,,,,,,;------------------------------------------------------------------------------,,,; Routine to convert a binary value (0..63) in to a BCD pair. The result is,,,; returned in W. The lookup is done as a 'calculated goto' by modifying PCL,,,; (the lower eight bits of the program counter). PCL is only eight bits wide,,,; with the top five bits coming from the PCLATH register. We use an ORG,,,; statement to ensure that addition of the offset (0..63) to the table address,,,; doesn't overflow the PCL register (any overflow would be lost and would result,,,; in a jump to some other part of the code).,,,0100,,, ORG 0x0100,,,0100,018A,bin2bcd,bin2bcd clrf PCLATH ; Clear PCLATH.0101,140A,, bsf PCLATH,0 ; Set bit zero so that goto yields an,,, ; address 0x01xx.0102,393F,, andlw H'3F' ; Ensure we limit lookup.0103,0782,, addwf PCL,F ; Add offset in W to PCL to calc. goto.,,,0104,3400,, retlw 0x000105,3401,, retlw 0x010106,3402,, retlw 0x020107,3403,, retlw 0x030108,3404,, retlw 0x040109,3405,, retlw 0x05010A,3406,, retlw 0x06010B,3407,, retlw 0x07010C,3408,, retlw 0x08010D,3409,, retlw 0x09010E,3410,, retlw 0x10010F,3411,, retlw 0x110110,3412,, retlw 0x120111,3413,, retlw 0x130112,3414,, retlw 0x140113,3415,, retlw 0x150114,3416,, retlw 0x160115,3417,, retlw 0x170116,3418,, retlw 0x180117,3419,, retlw 0x190118,3420,, retlw 0x200119,3421,, retlw 0x21011A,3422,, retlw 0x22011B,3423,, retlw 0x23011C,3424,, retlw 0x24011D,3425,, retlw 0x25011E,3426,, retlw 0x26011F,3427,, retlw 0x270120,3428,, retlw 0x280121,3429,, retlw 0x290122,3430,, retlw 0x300123,3431,, retlw 0x310124,3432,, retlw 0x320125,3433,, retlw 0x330126,3434,, retlw 0x340127,3435,, retlw 0x350128,3436,, retlw 0x360129,3437,, retlw 0x37012A,3438,, retlw 0x38012B,3439,, retlw 0x39012C,3440,, retlw 0x40012D,3441,, retlw 0x41012E,3442,, retlw 0x42012F,3443,, retlw 0x430130,3444,, retlw 0x440131,3445,, retlw 0x450132,3446,, retlw 0x460133,3447,, retlw 0x470134,3448,, retlw 0x480135,3449,, retlw 0x490136,3450,, retlw 0x500137,3451,, retlw 0x510138,3452,, retlw 0x520139,3453,, retlw 0x53013A,3454,, retlw 0x54013B,3455,, retlw 0x55013C,3456,, retlw 0x56013D,3457,, retlw 0x57013E,3458,, retlw 0x58013F,3459,, retlw 0x590140,3460,, retlw 0x600141,3461,, retlw 0x610142,3462,, retlw 0x620143,3463,, retlw 0x63,,,,,, END
123version https://git-lfs.github.com/spec/v1oid sha256:68dddab4a62ec32526e112ee4ffa7c31a55b7fbb512beb90c47a1950a1215bffsize 160212345678910111213Message[302] K:\PRODEV\VSM\I2CMEM\SAMPLE\I2CMEM1.ASM 22 : Register in operand not in bank 0. Ensure that bank bits are correct.Message[302] K:\PRODEV\VSM\I2CMEM\SAMPLE\I2CMEM1.ASM 29 : Register in operand not in bank 0. Ensure that bank bits are correct.Message[302] K:\PRODEV\VSM\I2CMEM\SAMPLE\I2CMEM1.ASM 37 : Register in operand not in bank 0. Ensure that bank bits are correct.Message[302] K:\PRODEV\VSM\I2CMEM\SAMPLE\I2CMEM1.ASM 45 : Register in operand not in bank 0. Ensure that bank bits are correct.Message[302] K:\PRODEV\VSM\I2CMEM\SAMPLE\I2CMEM1.ASM 68 : Register in operand not in bank 0. Ensure that bank bits are correct.Message[302] K:\PRODEV\VSM\I2CMEM\SAMPLE\I2CMEM1.ASM 305 : Register in operand not in bank 0. Ensure that bank bits are correct.Message[302] K:\PRODEV\VSM\I2CMEM\SAMPLE\I2CMEM1.ASM 326 : Register in operand not in bank 0. Ensure that bank bits are correct.Message[302] K:\PRODEV\VSM\I2CMEM\SAMPLE\I2CMEM1.ASM 377 : Register in operand not in bank 0. Ensure that bank bits are correct.Message[302] K:\PRODEV\VSM\I2CMEM\SAMPLE\I2CMEM1.ASM 379 : Register in operand not in bank 0. Ensure that bank bits are correct.Message[302] K:\PRODEV\VSM\I2CMEM\SAMPLE\I2CMEM1.ASM 380 : Register in operand not in bank 0. Ensure that bank bits are correct.Message[305] K:\PRODEV\VSM\I2CMEM\SAMPLE\I2CMEM1.ASM 431 : Using default destination of 1 (file).Message[305] K:\PRODEV\VSM\I2CMEM\SAMPLE\I2CMEM1.ASM 432 : Using default destination of 1 (file).Message[305] K:\PRODEV\VSM\I2CMEM\SAMPLE\I2CMEM1.ASM 490 : Using default destination of 1 (file).
123version https://git-lfs.github.com/spec/v1oid sha256:3b96b96e6d1f7c0b7fd61c8b7a022ec2967492dff3302a14ab360711baa9b741size 21541234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950:020000001F29B6:080008000428831287138316FC:1000100087178312080083128713831687138312AE:100020000800831207178316071383120800831230:10003000071383160713831208000630B500B50BAB:100040001F2808001030B500B50B1F280800FF302E:1000500087000030831687008312080011202220B9:100060000B202220172022202220222008002220DC:10007000172022200B2022201120222005202220C0:1000800008001720222005202220112022200B20EA:100090002220172022200800172022200B202220B7:1000A00011202220172022200520222008001720BE:1000B0002220052022201120222017202220222069:1000C00008002220172022200B202220112040305F:1000D000B500B50B692805204030B500B50B6E287A:1000E0001720222011202220172022201120222038:1000F0001720222011202220172022201120222028:100100001720222011202220172022201120222017:100110001720222011202220172022201120222007:100120001720222011202220080083121D203308CE:10013000320503199D2805209F280B209F28831234:100140001D201120222017200800B2008030B300AB:1001500095200310B30CB308031DA8281D2005200B:100160001D2011201D2007088039803AB4001D2071:1001700017201D200800B2000830B300952003109E:10018000B30CB308031DBE281D2005201D2011201F:100190001D2007088039803AB4001D2017201D203B:1001A0000800831205201720222011201D20070897:1001B00080390319DD283308B2041D2017200800F8:1001C0000030B2008030B300D1200310B30CB3086C:1001D000031DE42832080800831288008316880172:1001E00083120514FF301621FF3016210510FF3051:1001F0001621FF301621F12808008312880083168B:1002000088018312051430300A21051003300A21B9:1002100002290800B500FF30B600FF30B700B70B69:100220000F29B60B0D29B50B0B290800B500FF30BF:10023000B600B60B1929B50B172908001E2927206F:100240006120831285018801831606309F002030CB:100250008500880183128501B001B101851E5229F4:100260002E20A630A5200130B4080319EC20300858:10027000A5200230B4080319EC203108A520033072:10028000B4080319EC2037202E20A630A520043016:10029000B40803194429B00AB10A301E30293720A6:1002A000103016212E20A630A5200530B4080319E1:1002B000EC20B0013008A5200630B4080319EC206A:1002C00037202E20A730A5200730B4080319EC20D2:1002D00085140000000000008510E0203008320284:1002E0000830031DEC20B00A301A78294C206D2903:0602F000572037201E21FB:00000001FF
123version https://git-lfs.github.com/spec/v1oid sha256:98278ec17299ab1fb2f1a16bd529e3283e6da15802bddf2304d1ff42e7228660size 46381123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947MPASM 02.30 Released I2CMEM1.ASM 12-19-2001 11:23:01 PAGE 1LOC OBJECT CODE LINE SOURCE TEXTVALUE00001 LIST p=16F87700002 #include "P16F877.INC"00001 LIST00002 ; P16F877.INC Standard Header File, Version 1.00 Microchip Technology, Inc.00373 LIST0000300000007 00004 SDO EQU 700000006 00005 CLK EQU 6000060000 00007 ORG 00000 291F 00008 entrypoint goto start000090004 00010 ORG 40004 2804 00011 intvector goto intvector0001200013 CBLOCK 0x3000000030 00014 address, value, byte, bit, ack00000035 00015 lc1, lc2, lc300016 ENDC00017000180005 1283 00019 set_sdo_high bcf STATUS,RP00006 1387 00020 bcf PORTC,SDO0007 1683 00021 bsf STATUS,RP0Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.0008 1787 00022 bsf TRISC,SDO0009 1283 00023 bcf STATUS,RP0000A 0008 00024 return00025000B 1283 00026 set_sdo_low bcf STATUS,RP0000C 1387 00027 bcf PORTC,SDO000D 1683 00028 bsf STATUS,RP0Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.000E 1387 00029 bcf TRISC,SDO000F 1283 00030 bcf STATUS,RP00010 0008 00031 return0003200033 ;-----------------------------------------------------------0011 1283 00034 set_clk_high bcf STATUS,RP00012 1707 00035 bsf PORTC,CLK0013 1683 00036 bsf STATUS,RP0Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.0014 1307 00037 bcf TRISC,CLK0015 1283 00038 bcf STATUS,RP00016 0008 00039 return0004000041 ;-----------------------------------------------------------0017 1283 00042 set_clk_low bcf STATUS,RP00018 1307 00043 bcf PORTC,CLK0019 1683 00044 bsf STATUS,RP0Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.001A 1307 00045 bcf TRISC,CLK001B 1283 00046 bcf STATUS,RP0MPASM 02.30 Released I2CMEM1.ASM 12-19-2001 11:23:01 PAGE 2LOC OBJECT CODE LINE SOURCE TEXTVALUE001C 0008 00047 return0004800049 ;-----------------------------------------------------------001D 3006 00050 wait_quarter_bit movlw 0x06001E 00B5 00051 movwf lc1001F 0BB5 00052 wqb0: decfsz lc1,F0020 281F 00053 goto wqb00021 0008 00054 return0005500056 ;-----------------------------------------------------------0022 3010 00057 wait_half_bit movlw 0x100023 00B5 00058 movwf lc10024 0BB5 00059 whb0: decfsz lc1,F0025 281F 00060 goto wqb00026 0008 00061 return0006200063 ;-----------------------------------------------------------0027 30FF 00064 init movlw 0xFF0028 0087 00065 movwf PORTC0029 3000 00066 movlw 0x00002A 1683 00067 bsf STATUS,RP0Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.002B 0087 00068 movwf TRISC002C 1283 00069 bcf STATUS,RP0002D 0008 00070 return0007100072 ;-----------------------------------------------------------002E 2011 00073 wr_start call set_clk_high002F 2022 00074 call wait_half_bit0030 200B 00075 call set_sdo_low0031 2022 00076 call wait_half_bit0032 2017 00077 call set_clk_low0033 2022 00078 call wait_half_bit0034 2022 00079 call wait_half_bit0035 2022 00080 call wait_half_bit0036 0008 00081 return00082 ;-----------------------------------------------------------0037 2022 00083 wr_stop call wait_half_bit0038 2017 00084 call set_clk_low0039 2022 00085 call wait_half_bit003A 200B 00086 call set_sdo_low003B 2022 00087 call wait_half_bit003C 2011 00088 call set_clk_high003D 2022 00089 call wait_half_bit003E 2005 00090 call set_sdo_high003F 2022 00091 call wait_half_bit0040 0008 00092 return0009300094 ;-----------------------------------------------------------0041 2017 00095 wr_restart call set_clk_low0042 2022 00096 call wait_half_bit0043 2005 00097 call set_sdo_high0044 2022 00098 call wait_half_bitMPASM 02.30 Released I2CMEM1.ASM 12-19-2001 11:23:01 PAGE 3LOC OBJECT CODE LINE SOURCE TEXTVALUE0045 2011 00099 call set_clk_high0046 2022 00100 call wait_half_bit0047 200B 00101 call set_sdo_low0048 2022 00102 call wait_half_bit0049 2017 00103 call set_clk_low004A 2022 00104 call wait_half_bit004B 0008 00105 return0010600107 ;-----------------------------------------------------------004C 2017 00108 wr_ack call set_clk_low004D 2022 00109 call wait_half_bit004E 200B 00110 call set_sdo_low004F 2022 00111 call wait_half_bit0050 2011 00112 call set_clk_high0051 2022 00113 call wait_half_bit0052 2017 00114 call set_clk_low0053 2022 00115 call wait_half_bit0054 2005 00116 call set_sdo_high0055 2022 00117 call wait_half_bit0056 0008 00118 return0011900120 ;-----------------------------------------------------------0057 2017 00121 wr_no_ack call set_clk_low0058 2022 00122 call wait_half_bit0059 2005 00123 call set_sdo_high005A 2022 00124 call wait_half_bit005B 2011 00125 call set_clk_high005C 2022 00126 call wait_half_bit005D 2017 00127 call set_clk_low005E 2022 00128 call wait_half_bit005F 2022 00129 call wait_half_bit0060 0008 00130 return0013100132 ;-----------------------------------------------------------00133 ; Generate a reset by generating a stop followed by at least00134 ; eight clock pulses.0061 2022 00135 wr_reset call wait_half_bit0062 2017 00136 call set_clk_low0063 2022 00137 call wait_half_bit0064 200B 00138 call set_sdo_low0065 2022 00139 call wait_half_bit0066 2011 00140 call set_clk_high001410067 3040 00142 movlw 0x400068 00B5 00143 movwf lc10069 0BB5 00144 wrr0: decfsz lc1,F006A 2869 00145 goto wrr000146006B 2005 00147 call set_sdo_high00148006C 3040 00149 movlw 0x40006D 00B5 00150 movwf lc1006E 0BB5 00151 wrr1: decfsz lc1,FMPASM 02.30 Released I2CMEM1.ASM 12-19-2001 11:23:01 PAGE 4LOC OBJECT CODE LINE SOURCE TEXTVALUE006F 286E 00152 goto wrr1001530070 2017 00154 call set_clk_low ; clk 00071 2022 00155 call wait_half_bit0072 2011 00156 call set_clk_high0073 2022 00157 call wait_half_bit0074 2017 00158 call set_clk_low ; clk 10075 2022 00159 call wait_half_bit0076 2011 00160 call set_clk_high0077 2022 00161 call wait_half_bit0078 2017 00162 call set_clk_low ; clk 20079 2022 00163 call wait_half_bit007A 2011 00164 call set_clk_high007B 2022 00165 call wait_half_bit007C 2017 00166 call set_clk_low ; clk 3007D 2022 00167 call wait_half_bit007E 2011 00168 call set_clk_high007F 2022 00169 call wait_half_bit0080 2017 00170 call set_clk_low ; clk 40081 2022 00171 call wait_half_bit0082 2011 00172 call set_clk_high0083 2022 00173 call wait_half_bit0084 2017 00174 call set_clk_low ; clk 50085 2022 00175 call wait_half_bit0086 2011 00176 call set_clk_high0087 2022 00177 call wait_half_bit0088 2017 00178 call set_clk_low ; clk 60089 2022 00179 call wait_half_bit008A 2011 00180 call set_clk_high008B 2022 00181 call wait_half_bit008C 2017 00182 call set_clk_low ; clk 7008D 2022 00183 call wait_half_bit008E 2011 00184 call set_clk_high008F 2022 00185 call wait_half_bit0090 2017 00186 call set_clk_low ; clk 80091 2022 00187 call wait_half_bit0092 2011 00188 call set_clk_high0093 2022 00189 call wait_half_bit001900094 0008 00191 return001920019300194 ;-----------------------------------------------------------0095 1283 00195 wr_bit bcf STATUS,RP00096 201D 00196 call wait_quarter_bit0097 0833 00197 movf bit,w0098 0532 00198 andwf byte,w0099 1903 00199 btfsc STATUS,Z009A 289D 00200 goto bit_is_000201009B 2005 00202 bit_is_1 call set_sdo_high009C 289F 00203 goto wbit000204MPASM 02.30 Released I2CMEM1.ASM 12-19-2001 11:23:01 PAGE 5LOC OBJECT CODE LINE SOURCE TEXTVALUE009D 200B 00205 bit_is_0 call set_sdo_low009E 289F 00206 goto wbit00020700208009F 1283 00209 wbit0 bcf STATUS,RP000A0 201D 00210 call wait_quarter_bit00A1 2011 00211 call set_clk_high00A2 2022 00212 call wait_half_bit00A3 2017 00213 call set_clk_low00A4 0008 00214 return0021500216 ;-----------------------------------------------------------00A5 00B2 00217 wr_byte movwf byte00A6 3080 00218 movlw 0x8000A7 00B3 00219 movwf bit0022000A8 2095 00221 wbyte0 call wr_bit00A9 1003 00222 bcf STATUS,C00AA 0CB3 00223 rrf bit,F00AB 08B3 00224 movf bit,F00AC 1D03 00225 btfss STATUS,Z00AD 28A8 00226 goto wbyte00022700AE 201D 00228 call wait_quarter_bit00AF 2005 00229 call set_sdo_high00B0 201D 00230 call wait_quarter_bit00B1 2011 00231 call set_clk_high00B2 201D 00232 call wait_quarter_bit00B3 0807 00233 movf PORTC,W00B4 3980 00234 andlw (1<<SDO)00B5 3A80 00235 xorlw (1<<SDO)00B6 00B4 00236 movwf ack00B7 201D 00237 call wait_quarter_bit00B8 2017 00238 call set_clk_low00B9 201D 00239 call wait_quarter_bit00BA 0008 00240 return0024100242 ;-----------------------------------------------------------00BB 00B2 00243 wr_halfbyte movwf byte00BC 3008 00244 movlw 0x0800BD 00B3 00245 movwf bit0024600BE 2095 00247 whbyte0 call wr_bit00BF 1003 00248 bcf STATUS,C00C0 0CB3 00249 rrf bit,F00C1 08B3 00250 movf bit,F00C2 1D03 00251 btfss STATUS,Z00C3 28BE 00252 goto whbyte00025300C4 201D 00254 call wait_quarter_bit00C5 2005 00255 call set_sdo_high00C6 201D 00256 call wait_quarter_bit00C7 2011 00257 call set_clk_highMPASM 02.30 Released I2CMEM1.ASM 12-19-2001 11:23:01 PAGE 6LOC OBJECT CODE LINE SOURCE TEXTVALUE00C8 201D 00258 call wait_quarter_bit00C9 0807 00259 movf PORTC,W00CA 3980 00260 andlw (1<<SDO)00CB 3A80 00261 xorlw (1<<SDO)00CC 00B4 00262 movwf ack00CD 201D 00263 call wait_quarter_bit00CE 2017 00264 call set_clk_low00CF 201D 00265 call wait_quarter_bit00D0 0008 00266 return0026700268 ;-----------------------------------------------------------00D1 1283 00269 rd_bit bcf STATUS,RP000D2 2005 00270 call set_sdo_high00D3 2017 00271 call set_clk_low00D4 2022 00272 call wait_half_bit00D5 2011 00273 call set_clk_high00D6 201D 00274 call wait_quarter_bit00D7 0807 00275 movf PORTC,W00D8 3980 00276 andlw (1<<SDO)00D9 1903 00277 btfsc STATUS,Z00DA 28DD 00278 goto rd_bit_clear00DB 0833 00279 movf bit,W00DC 04B2 00280 iorwf byte,F00DD 201D 00281 rd_bit_clear call wait_quarter_bit00DE 2017 00282 call set_clk_low00DF 0008 00283 return0028400285 ;-----------------------------------------------------------00E0 3000 00286 rd_byte movlw 0x0000E1 00B2 00287 movwf byte00E2 3080 00288 movlw 0x8000E3 00B3 00289 movwf bit0029000E4 20D1 00291 rbyte0 call rd_bit00E5 1003 00292 bcf STATUS,C00E6 0CB3 00293 rrf bit,F00E7 08B3 00294 movf bit,F00E8 1D03 00295 btfss STATUS,Z00E9 28E4 00296 goto rbyte000EA 0832 00297 movf byte,W00EB 0008 00298 return0029900300 ;-----------------------------------------------------------00301 ; Write W register to PORTD and hang.00EC 1283 00302 wr_error bcf STATUS,RP000ED 0088 00303 movwf PORTD00EE 1683 00304 bsf STATUS,RP0Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.00EF 0188 00305 clrf TRISD00F0 1283 00306 bcf STATUS,RP00030700F1 1405 00308 wre_flash bsf PORTA,000F2 30FF 00309 movlw 0xFFMPASM 02.30 Released I2CMEM1.ASM 12-19-2001 11:23:01 PAGE 7LOC OBJECT CODE LINE SOURCE TEXTVALUE00F3 2116 00310 call longwait00F4 30FF 00311 movlw 0xFF00F5 2116 00312 call longwait00F6 1005 00313 bcf PORTA,000F7 30FF 00314 movlw 0xFF00F8 2116 00315 call longwait00F9 30FF 00316 movlw 0xFF00FA 2116 00317 call longwait00FB 28F1 00318 goto wre_flash00FC 0008 00319 return0032000321 ;-----------------------------------------------------------00322 ; Write W register to PORTD and hang.00FD 1283 00323 wr_result bcf STATUS,RP000FE 0088 00324 movwf PORTD00FF 1683 00325 bsf STATUS,RP0Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.0100 0188 00326 clrf TRISD0101 1283 00327 bcf STATUS,RP0003280102 1405 00329 wrr_flash bsf PORTA,00103 3030 00330 movlw 0x300104 210A 00331 call vlongwait0105 1005 00332 bcf PORTA,00106 3003 00333 movlw 0x030107 210A 00334 call vlongwait0108 2902 00335 goto wrr_flash0109 0008 00336 return0033700338 ;-----------------------------------------------------------010A 00B5 00339 vlongwait movwf lc1010B 30FF 00340 vlw1 movlw 0xFF010C 00B6 00341 movwf lc2010D 30FF 00342 vlw2 movlw 0xFF010E 00B7 00343 movwf lc3010F 0BB7 00344 vlw3 decfsz lc3,F0110 290F 00345 goto vlw30111 0BB6 00346 decfsz lc2,F0112 290D 00347 goto vlw20113 0BB5 00348 decfsz lc1,F0114 290B 00349 goto vlw10115 0008 00350 return0035100352 ;-----------------------------------------------------------0116 00B5 00353 longwait movwf lc10117 30FF 00354 lw1 movlw 0xFF0118 00B6 00355 movwf lc20119 0BB6 00356 lw2 decfsz lc2,F011A 2919 00357 goto lw2011B 0BB5 00358 decfsz lc1,F011C 2917 00359 goto lw1011D 0008 00360 return00361MPASM 02.30 Released I2CMEM1.ASM 12-19-2001 11:23:01 PAGE 8LOC OBJECT CODE LINE SOURCE TEXTVALUE00362 ;-----------------------------------------------------------011E 291E 00363 hang goto hang003640036500366 ;===========================================================011F 2027 00367 start call init0120 2061 00368 call wr_reset00369003700121 1283 00371 bcf STATUS,RP00122 0185 00372 clrf PORTA0123 0188 00373 clrf PORTD003740124 1683 00375 bsf STATUS,RP00125 3006 00376 movlw 0x06Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.0126 009F 00377 movwf ADCON10127 3020 00378 movlw 0x20Message[302]: Register in operand not in bank 0. Ensure that bank bits are correct.0128 0085 00379 movwf TRISAMessage[302]: Register in operand not in bank 0. Ensure that bank bits are correct.0129 0188 00380 clrf TRISD00381012A 1283 00382 bcf STATUS,RP0012B 0185 00383 clrf PORTA012C 01B0 00384 clrf address012D 01B1 00385 clrf value0038600387 ; Test RA5 to see if we do writes:012E 1E85 00388 btfss PORTA,5012F 2952 00389 goto reset_addr0039000391 ; Do start condition:0130 202E 00392 main_wr_loop: call wr_start0039300394 ; Send write command:0131 30A6 00395 movlw 0xA60132 20A5 00396 call wr_byte0133 3001 00397 movlw 0x010134 08B4 00398 movf ack,F0135 1903 00399 btfsc STATUS,Z0136 20EC 00400 call wr_error0040100402 ; Send address:0137 0830 00403 movf address,W0138 20A5 00404 call wr_byte0139 3002 00405 movlw 0x02013A 08B4 00406 movf ack,F013B 1903 00407 btfsc STATUS,Z013C 20EC 00408 call wr_error0040900410 ; Send value:013D 0831 00411 movf value,WMPASM 02.30 Released I2CMEM1.ASM 12-19-2001 11:23:01 PAGE 9LOC OBJECT CODE LINE SOURCE TEXTVALUE013E 20A5 00412 call wr_byte013F 3003 00413 movlw 0x030140 08B4 00414 movf ack,F0141 1903 00415 btfsc STATUS,Z0142 20EC 00416 call wr_error0041700418 ; Do stop. This starts the write cycle.0143 2037 00419 call wr_stop0042000421 ; Now poll for acknowledge:0144 202E 00422 poll_for_ack call wr_start0145 30A6 00423 movlw 0xA60146 20A5 00424 call wr_byte0147 3004 00425 movlw 0x040148 08B4 00426 movf ack,F0149 1903 00427 btfsc STATUS,Z014A 2944 00428 goto poll_for_ack0042900430 ; Increment address/data and loop round:Message[305]: Using default destination of 1 (file).014B 0AB0 00431 incf addressMessage[305]: Using default destination of 1 (file).014C 0AB1 00432 incf value014D 1E30 00433 btfss address,4014E 2930 00434 goto main_wr_loop0043500436 ; Cancel sucessful poll command:014F 2037 00437 call wr_stop004380150 3010 00439 wait movlw 0x100151 2116 00440 call longwait004410152 00442 reset_addr ; Generate start condition...0152 202E 00443 call wr_start0044400445 ; Write command:0153 30A6 00446 movlw 0xA60154 20A5 00447 call wr_byte0155 3005 00448 movlw 0x050156 08B4 00449 movf ack,F0157 1903 00450 btfsc STATUS,Z0158 20EC 00451 call wr_error0045200453 ; Send address:0159 01B0 00454 clrf address015A 0830 00455 movf address,W015B 20A5 00456 call wr_byte015C 3006 00457 movlw 0x06015D 08B4 00458 movf ack,F015E 1903 00459 btfsc STATUS,Z015F 20EC 00460 call wr_error0046100462 ; Send stop:MPASM 02.30 Released I2CMEM1.ASM 12-19-2001 11:23:01 PAGE 10LOC OBJECT CODE LINE SOURCE TEXTVALUE0160 2037 00463 call wr_stop004640161 202E 00465 read_bytes call wr_start0162 30A7 00466 movlw 0xA70163 20A5 00467 call wr_byte0164 3007 00468 movlw 0x070165 08B4 00469 movf ack,F0166 1903 00470 btfsc STATUS,Z0167 20EC 00471 call wr_error004720168 1485 00473 bsf PORTA,10169 0000 00474 nop016A 0000 00475 nop016B 0000 00476 nop016C 1085 00477 bcf PORTA,10047800479 ; Do read:016D 20E0 00480 main_rd_loop call rd_byte0048100482 ; Is this the value we expected?016E 0830 00483 movf address,W016F 0232 00484 subwf byte,W0170 3008 00485 movlw 0x080171 1D03 00486 btfss STATUS,Z0172 20EC 00487 call wr_error0048800489 ; Increment address/data and loop round:Message[305]: Using default destination of 1 (file).0173 0AB0 00490 incf address0174 1A30 00491 btfsc address,40175 2978 00492 goto done0049300494 ; Not done yet so acknowledge byte and read next one:0176 204C 00495 call wr_ack0177 296D 00496 goto main_rd_loop004970049800499 ; Stop condition marks end of sequential read:0178 2057 00500 done call wr_no_ack0179 2037 00501 call wr_stop0050200503 ; End of test:017A 211E 00504 call hang0050500506 ENDMPASM 02.30 Released I2CMEM1.ASM 12-19-2001 11:23:01 PAGE 11SYMBOL TABLELABEL VALUEACKDT 00000005ACKEN 00000004ACKSTAT 00000006ADCON0 0000001FADCON1 0000009FADCS0 00000006ADCS1 00000007ADDEN 00000003ADFM 00000007ADIE 00000006ADIF 00000006ADON 00000000ADRESH 0000001EADRESL 0000009EBCLIE 00000003BCLIF 00000003BF 00000000BRGH 00000002C 00000000CCP1CON 00000017CCP1IE 00000002CCP1IF 00000002CCP1M0 00000000CCP1M1 00000001CCP1M2 00000002CCP1M3 00000003CCP1X 00000005CCP1Y 00000004CCP2CON 0000001DCCP2IE 00000000CCP2IF 00000000CCP2M0 00000000CCP2M1 00000001CCP2M2 00000002CCP2M3 00000003CCP2X 00000005CCP2Y 00000004CCPR1H 00000016CCPR1L 00000015CCPR2H 0000001CCCPR2L 0000001BCHS0 00000003CHS1 00000004CHS2 00000005CKE 00000006CKP 00000004CLK 00000006CREN 00000004CSRC 00000007D 00000005DATA_ADDRESS 00000005DC 00000001D_A 00000005MPASM 02.30 Released I2CMEM1.ASM 12-19-2001 11:23:01 PAGE 12SYMBOL TABLELABEL VALUEEEADR 0000010DEEADRH 0000010FEECON1 0000018CEECON2 0000018DEEDATA 0000010CEEDATH 0000010EEEIE 00000004EEIF 00000004EEPGD 00000007F 00000001FERR 00000002FSR 00000004GCEN 00000007GIE 00000007GO 00000002GO_DONE 00000002I2C_DATA 00000005I2C_READ 00000002I2C_START 00000003I2C_STOP 00000004IBF 00000007IBOV 00000005INDF 00000000INTCON 0000000BINTE 00000004INTEDG 00000006INTF 00000001IRP 00000007NOT_A 00000005NOT_ADDRESS 00000005NOT_BO 00000000NOT_BOR 00000000NOT_DONE 00000002NOT_PD 00000003NOT_POR 00000001NOT_RBPU 00000007NOT_RC8 00000006NOT_T1SYNC 00000002NOT_TO 00000004NOT_TX8 00000006NOT_W 00000002NOT_WRITE 00000002OBF 00000006OERR 00000001OPTION_REG 00000081P 00000004PCFG0 00000000PCFG1 00000001PCFG2 00000002PCFG3 00000003PCL 00000002PCLATH 0000000APCON 0000008EMPASM 02.30 Released I2CMEM1.ASM 12-19-2001 11:23:01 PAGE 13SYMBOL TABLELABEL VALUEPEIE 00000006PEN 00000002PIE1 0000008CPIE2 0000008DPIR1 0000000CPIR2 0000000DPORTA 00000005PORTB 00000006PORTC 00000007PORTD 00000008PORTE 00000009PR2 00000092PS0 00000000PS1 00000001PS2 00000002PSA 00000003PSPIE 00000007PSPIF 00000007PSPMODE 00000004R 00000002RBIE 00000003RBIF 00000000RC8_9 00000006RC9 00000006RCD8 00000000RCEN 00000003RCIE 00000005RCIF 00000005RCREG 0000001ARCSTA 00000018RD 00000000READ_WRITE 00000002RP0 00000005RP1 00000006RSEN 00000001RX9 00000006RX9D 00000000R_W 00000002S 00000003SDO 00000007SEN 00000000SMP 00000007SPBRG 00000099SPEN 00000007SREN 00000005SSPADD 00000093SSPBUF 00000013SSPCON 00000014SSPCON2 00000091SSPEN 00000005SSPIE 00000003SSPIF 00000003SSPM0 00000000MPASM 02.30 Released I2CMEM1.ASM 12-19-2001 11:23:01 PAGE 14SYMBOL TABLELABEL VALUESSPM1 00000001SSPM2 00000002SSPM3 00000003SSPOV 00000006SSPSTAT 00000094STATUS 00000003SYNC 00000004T0CS 00000005T0IE 00000005T0IF 00000002T0SE 00000004T1CKPS0 00000004T1CKPS1 00000005T1CON 00000010T1INSYNC 00000002T1OSCEN 00000003T1SYNC 00000002T2CKPS0 00000000T2CKPS1 00000001T2CON 00000012TMR0 00000001TMR1CS 00000001TMR1H 0000000FTMR1IE 00000000TMR1IF 00000000TMR1L 0000000ETMR1ON 00000000TMR2 00000011TMR2IE 00000001TMR2IF 00000001TMR2ON 00000002TOUTPS0 00000003TOUTPS1 00000004TOUTPS2 00000005TOUTPS3 00000006TRISA 00000085TRISB 00000086TRISC 00000087TRISD 00000088TRISE 00000089TRISE0 00000000TRISE1 00000001TRISE2 00000002TRMT 00000001TX8_9 00000006TX9 00000006TX9D 00000000TXD8 00000000TXEN 00000005TXIE 00000004TXIF 00000004TXREG 00000019TXSTA 00000098MPASM 02.30 Released I2CMEM1.ASM 12-19-2001 11:23:01 PAGE 15SYMBOL TABLELABEL VALUEUA 00000001W 00000000WCOL 00000007WR 00000001WREN 00000002WRERR 00000003Z 00000002_BODEN_OFF 00003FBF_BODEN_ON 00003FFF_CPD_OFF 00003FFF_CPD_ON 00003EFF_CP_ALL 00000FCF_CP_HALF 00001FDF_CP_OFF 00003FFF_CP_UPPER_256 00002FEF_DEBUG_OFF 00003FFF_DEBUG_ON 000037FF_HS_OSC 00003FFE_LP_OSC 00003FFC_LVP_OFF 00003F7F_LVP_ON 00003FFF_PWRTE_OFF 00003FFF_PWRTE_ON 00003FF7_RC_OSC 00003FFF_WDT_OFF 00003FFB_WDT_ON 00003FFF_WRT_ENABLE_OFF 00003DFF_WRT_ENABLE_ON 00003FFF_XT_OSC 00003FFD__16F877 00000001ack 00000034address 00000030bit 00000033bit_is_0 0000009Dbit_is_1 0000009Bbyte 00000032done 00000178entrypoint 00000000hang 0000011Einit 00000027intvector 00000004lc1 00000035lc2 00000036lc3 00000037longwait 00000116lw1 00000117lw2 00000119main_rd_loop 0000016Dmain_wr_loop 00000130poll_for_ack 00000144rbyte0 000000E4rd_bit 000000D1rd_bit_clear 000000DDMPASM 02.30 Released I2CMEM1.ASM 12-19-2001 11:23:01 PAGE 16SYMBOL TABLELABEL VALUErd_byte 000000E0read_bytes 00000161reset_addr 00000152set_clk_high 00000011set_clk_low 00000017set_sdo_high 00000005set_sdo_low 0000000Bstart 0000011Fvalue 00000031vlongwait 0000010Avlw1 0000010Bvlw2 0000010Dvlw3 0000010Fwait 00000150wait_half_bit 00000022wait_quarter_bit 0000001Dwbit0 0000009Fwbyte0 000000A8whb0 00000024whbyte0 000000BEwqb0 0000001Fwr_ack 0000004Cwr_bit 00000095wr_byte 000000A5wr_error 000000ECwr_halfbyte 000000BBwr_no_ack 00000057wr_reset 00000061wr_restart 00000041wr_result 000000FDwr_start 0000002Ewr_stop 00000037wre_flash 000000F1wrr0 00000069wrr1 0000006Ewrr_flash 00000102MEMORY USAGE MAP ('X' = Used, '-' = Unused)0000 : X---XXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX0040 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX0080 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX00C0 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX0100 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX0140 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXX-----All other memory blocks unused.Program Memory Words Used: 376Program Memory Words Free: 7816MPASM 02.30 Released I2CMEM1.ASM 12-19-2001 11:23:01 PAGE 17Errors : 0Warnings : 0 reported, 0 suppressedMessages : 13 reported, 0 suppressed
123version https://git-lfs.github.com/spec/v1oid sha256:f532fe85746819d6bcefdbdae7c2506020bc076e7991941cde531b1e63b5e883size 20629123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506,,, LIST p=16F877,,, #include "P16F877.INC",,,,,,SDO EQU 7,,,CLK EQU 6,,,,,, ORG 00000,291F,entrypoint,entrypoint goto start,,,,,, ORG 40004,2804,intvector,intvector goto intvector,,,,,, CBLOCK 0x30,,, address, value, byte, bit, ack,,, lc1, lc2, lc3,,, ENDC,,,,,,0005,1283,set_sdo_high,set_sdo_high bcf STATUS,RP00006,1387,, bcf PORTC,SDO0007,1683,, bsf STATUS,RP00008,1787,, bsf TRISC,SDO0009,1283,, bcf STATUS,RP0000A,0008,, return,,,000B,1283,set_sdo_low,set_sdo_low bcf STATUS,RP0000C,1387,, bcf PORTC,SDO000D,1683,, bsf STATUS,RP0000E,1387,, bcf TRISC,SDO000F,1283,, bcf STATUS,RP00010,0008,, return,,,,,,;-----------------------------------------------------------0011,1283,set_clk_high,set_clk_high bcf STATUS,RP00012,1707,, bsf PORTC,CLK0013,1683,, bsf STATUS,RP00014,1307,, bcf TRISC,CLK0015,1283,, bcf STATUS,RP00016,0008,, return,,,,,,;-----------------------------------------------------------0017,1283,set_clk_low,set_clk_low bcf STATUS,RP00018,1307,, bcf PORTC,CLK0019,1683,, bsf STATUS,RP0001A,1307,, bcf TRISC,CLK001B,1283,, bcf STATUS,RP0001C,0008,, return,,,,,,;-----------------------------------------------------------001D,3006,wait_quarter_bit,wait_quarter_bit movlw 0x06001E,00B5,, movwf lc1001F,0BB5,wqb0:,wqb0: decfsz lc1,F0020,281F,, goto wqb00021,0008,, return,,,,,,;-----------------------------------------------------------0022,3010,wait_half_bit,wait_half_bit movlw 0x100023,00B5,, movwf lc10024,0BB5,whb0:,whb0: decfsz lc1,F0025,281F,, goto wqb00026,0008,, return,,,,,,;-----------------------------------------------------------0027,30FF,init,init movlw 0xFF0028,0087,, movwf PORTC0029,3000,, movlw 0x00002A,1683,, bsf STATUS,RP0002B,0087,, movwf TRISC002C,1283,, bcf STATUS,RP0002D,0008,, return,,,,,,;-----------------------------------------------------------002E,2011,wr_start,wr_start call set_clk_high002F,2022,, call wait_half_bit0030,200B,, call set_sdo_low0031,2022,, call wait_half_bit0032,2017,, call set_clk_low0033,2022,, call wait_half_bit0034,2022,, call wait_half_bit0035,2022,, call wait_half_bit0036,0008,, return,,,;-----------------------------------------------------------0037,2022,wr_stop,wr_stop call wait_half_bit0038,2017,, call set_clk_low0039,2022,, call wait_half_bit003A,200B,, call set_sdo_low003B,2022,, call wait_half_bit003C,2011,, call set_clk_high003D,2022,, call wait_half_bit003E,2005,, call set_sdo_high003F,2022,, call wait_half_bit0040,0008,, return,,,,,,;-----------------------------------------------------------0041,2017,wr_restart,wr_restart call set_clk_low0042,2022,, call wait_half_bit0043,2005,, call set_sdo_high0044,2022,, call wait_half_bit0045,2011,, call set_clk_high0046,2022,, call wait_half_bit0047,200B,, call set_sdo_low0048,2022,, call wait_half_bit0049,2017,, call set_clk_low004A,2022,, call wait_half_bit004B,0008,, return,,,,,,;-----------------------------------------------------------004C,2017,wr_ack,wr_ack call set_clk_low004D,2022,, call wait_half_bit004E,200B,, call set_sdo_low004F,2022,, call wait_half_bit0050,2011,, call set_clk_high0051,2022,, call wait_half_bit0052,2017,, call set_clk_low0053,2022,, call wait_half_bit0054,2005,, call set_sdo_high0055,2022,, call wait_half_bit0056,0008,, return,,,,,,;-----------------------------------------------------------0057,2017,wr_no_ack,wr_no_ack call set_clk_low0058,2022,, call wait_half_bit0059,2005,, call set_sdo_high005A,2022,, call wait_half_bit005B,2011,, call set_clk_high005C,2022,, call wait_half_bit005D,2017,, call set_clk_low005E,2022,, call wait_half_bit005F,2022,, call wait_half_bit0060,0008,, return,,,,,,;-----------------------------------------------------------,,,; Generate a reset by generating a stop followed by at least,,,; eight clock pulses.0061,2022,wr_reset,wr_reset call wait_half_bit0062,2017,, call set_clk_low0063,2022,, call wait_half_bit0064,200B,, call set_sdo_low0065,2022,, call wait_half_bit0066,2011,, call set_clk_high,,,0067,3040,, movlw 0x400068,00B5,, movwf lc10069,0BB5,wrr0:,wrr0: decfsz lc1,F006A,2869,, goto wrr0,,,006B,2005,, call set_sdo_high,,,006C,3040,, movlw 0x40006D,00B5,, movwf lc1006E,0BB5,wrr1:,wrr1: decfsz lc1,F006F,286E,, goto wrr1,,,0070,2017,, call set_clk_low ; clk 00071,2022,, call wait_half_bit0072,2011,, call set_clk_high0073,2022,, call wait_half_bit0074,2017,, call set_clk_low ; clk 10075,2022,, call wait_half_bit0076,2011,, call set_clk_high0077,2022,, call wait_half_bit0078,2017,, call set_clk_low ; clk 20079,2022,, call wait_half_bit007A,2011,, call set_clk_high007B,2022,, call wait_half_bit007C,2017,, call set_clk_low ; clk 3007D,2022,, call wait_half_bit007E,2011,, call set_clk_high007F,2022,, call wait_half_bit0080,2017,, call set_clk_low ; clk 40081,2022,, call wait_half_bit0082,2011,, call set_clk_high0083,2022,, call wait_half_bit0084,2017,, call set_clk_low ; clk 50085,2022,, call wait_half_bit0086,2011,, call set_clk_high0087,2022,, call wait_half_bit0088,2017,, call set_clk_low ; clk 60089,2022,, call wait_half_bit008A,2011,, call set_clk_high008B,2022,, call wait_half_bit008C,2017,, call set_clk_low ; clk 7008D,2022,, call wait_half_bit008E,2011,, call set_clk_high008F,2022,, call wait_half_bit0090,2017,, call set_clk_low ; clk 80091,2022,, call wait_half_bit0092,2011,, call set_clk_high0093,2022,, call wait_half_bit,,,0094,0008,, return,,,,,,,,,;-----------------------------------------------------------0095,1283,wr_bit,wr_bit bcf STATUS,RP00096,201D,, call wait_quarter_bit0097,0833,, movf bit,w0098,0532,, andwf byte,w0099,1903,, btfsc STATUS,Z009A,289D,, goto bit_is_0,,,009B,2005,bit_is_1,bit_is_1 call set_sdo_high009C,289F,, goto wbit0,,,009D,200B,bit_is_0,bit_is_0 call set_sdo_low009E,289F,, goto wbit0,,,,,,009F,1283,wbit0,wbit0 bcf STATUS,RP000A0,201D,, call wait_quarter_bit00A1,2011,, call set_clk_high00A2,2022,, call wait_half_bit00A3,2017,, call set_clk_low00A4,0008,, return,,,,,,;-----------------------------------------------------------00A5,00B2,wr_byte,wr_byte movwf byte00A6,3080,, movlw 0x8000A7,00B3,, movwf bit,,,00A8,2095,wbyte0,wbyte0 call wr_bit00A9,1003,, bcf STATUS,C00AA,0CB3,, rrf bit,F00AB,08B3,, movf bit,F00AC,1D03,, btfss STATUS,Z00AD,28A8,, goto wbyte0,,,00AE,201D,, call wait_quarter_bit00AF,2005,, call set_sdo_high00B0,201D,, call wait_quarter_bit00B1,2011,, call set_clk_high00B2,201D,, call wait_quarter_bit00B3,0807,, movf PORTC,W00B4,3980,, andlw (1<<SDO)00B5,3A80,, xorlw (1<<SDO)00B6,00B4,, movwf ack00B7,201D,, call wait_quarter_bit00B8,2017,, call set_clk_low00B9,201D,, call wait_quarter_bit00BA,0008,, return,,,,,,;-----------------------------------------------------------00BB,00B2,wr_halfbyte,wr_halfbyte movwf byte00BC,3008,, movlw 0x0800BD,00B3,, movwf bit,,,00BE,2095,whbyte0,whbyte0 call wr_bit00BF,1003,, bcf STATUS,C00C0,0CB3,, rrf bit,F00C1,08B3,, movf bit,F00C2,1D03,, btfss STATUS,Z00C3,28BE,, goto whbyte0,,,00C4,201D,, call wait_quarter_bit00C5,2005,, call set_sdo_high00C6,201D,, call wait_quarter_bit00C7,2011,, call set_clk_high00C8,201D,, call wait_quarter_bit00C9,0807,, movf PORTC,W00CA,3980,, andlw (1<<SDO)00CB,3A80,, xorlw (1<<SDO)00CC,00B4,, movwf ack00CD,201D,, call wait_quarter_bit00CE,2017,, call set_clk_low00CF,201D,, call wait_quarter_bit00D0,0008,, return,,,,,,;-----------------------------------------------------------00D1,1283,rd_bit,rd_bit bcf STATUS,RP000D2,2005,, call set_sdo_high00D3,2017,, call set_clk_low00D4,2022,, call wait_half_bit00D5,2011,, call set_clk_high00D6,201D,, call wait_quarter_bit00D7,0807,, movf PORTC,W00D8,3980,, andlw (1<<SDO)00D9,1903,, btfsc STATUS,Z00DA,28DD,, goto rd_bit_clear00DB,0833,, movf bit,W00DC,04B2,, iorwf byte,F00DD,201D,rd_bit_clear,rd_bit_clear call wait_quarter_bit00DE,2017,, call set_clk_low00DF,0008,, return,,,,,,;-----------------------------------------------------------00E0,3000,rd_byte,rd_byte movlw 0x0000E1,00B2,, movwf byte00E2,3080,, movlw 0x8000E3,00B3,, movwf bit,,,00E4,20D1,rbyte0,rbyte0 call rd_bit00E5,1003,, bcf STATUS,C00E6,0CB3,, rrf bit,F00E7,08B3,, movf bit,F00E8,1D03,, btfss STATUS,Z00E9,28E4,, goto rbyte000EA,0832,, movf byte,W00EB,0008,, return,,,,,,;-----------------------------------------------------------,,,; Write W register to PORTD and hang.00EC,1283,wr_error,wr_error bcf STATUS,RP000ED,0088,, movwf PORTD00EE,1683,, bsf STATUS,RP000EF,0188,, clrf TRISD00F0,1283,, bcf STATUS,RP0,,,00F1,1405,wre_flash,wre_flash bsf PORTA,000F2,30FF,, movlw 0xFF00F3,2116,, call longwait00F4,30FF,, movlw 0xFF00F5,2116,, call longwait00F6,1005,, bcf PORTA,000F7,30FF,, movlw 0xFF00F8,2116,, call longwait00F9,30FF,, movlw 0xFF00FA,2116,, call longwait00FB,28F1,, goto wre_flash00FC,0008,, return,,,,,,;-----------------------------------------------------------,,,; Write W register to PORTD and hang.00FD,1283,wr_result,wr_result bcf STATUS,RP000FE,0088,, movwf PORTD00FF,1683,, bsf STATUS,RP00100,0188,, clrf TRISD0101,1283,, bcf STATUS,RP0,,,0102,1405,wrr_flash,wrr_flash bsf PORTA,00103,3030,, movlw 0x300104,210A,, call vlongwait0105,1005,, bcf PORTA,00106,3003,, movlw 0x030107,210A,, call vlongwait0108,2902,, goto wrr_flash0109,0008,, return,,,,,,;-----------------------------------------------------------010A,00B5,vlongwait,vlongwait movwf lc1010B,30FF,vlw1,vlw1 movlw 0xFF010C,00B6,, movwf lc2010D,30FF,vlw2,vlw2 movlw 0xFF010E,00B7,, movwf lc3010F,0BB7,vlw3,vlw3 decfsz lc3,F0110,290F,, goto vlw30111,0BB6,, decfsz lc2,F0112,290D,, goto vlw20113,0BB5,, decfsz lc1,F0114,290B,, goto vlw10115,0008,, return,,,,,,;-----------------------------------------------------------0116,00B5,longwait,longwait movwf lc10117,30FF,lw1,lw1 movlw 0xFF0118,00B6,, movwf lc20119,0BB6,lw2,lw2 decfsz lc2,F011A,2919,, goto lw2011B,0BB5,, decfsz lc1,F011C,2917,, goto lw1011D,0008,, return,,,,,,;-----------------------------------------------------------011E,291E,hang,hang goto hang,,,,,,,,,;===========================================================011F,2027,start,start call init0120,2061,, call wr_reset,,,,,,0121,1283,, bcf STATUS,RP00122,0185,, clrf PORTA0123,0188,, clrf PORTD,,,0124,1683,, bsf STATUS,RP00125,3006,, movlw 0x060126,009F,, movwf ADCON10127,3020,, movlw 0x200128,0085,, movwf TRISA0129,0188,, clrf TRISD,,,012A,1283,, bcf STATUS,RP0012B,0185,, clrf PORTA012C,01B0,, clrf address012D,01B1,, clrf value,,,,,, ; Test RA5 to see if we do writes:012E,1E85,, btfss PORTA,5012F,2952,, goto reset_addr,,,,,, ; Do start condition:0130,202E,main_wr_loop:,main_wr_loop: call wr_start,,,,,, ; Send write command:0131,30A6,, movlw 0xA60132,20A5,, call wr_byte0133,3001,, movlw 0x010134,08B4,, movf ack,F0135,1903,, btfsc STATUS,Z0136,20EC,, call wr_error,,,,,, ; Send address:0137,0830,, movf address,W0138,20A5,, call wr_byte0139,3002,, movlw 0x02013A,08B4,, movf ack,F013B,1903,, btfsc STATUS,Z013C,20EC,, call wr_error,,,,,, ; Send value:013D,0831,, movf value,W013E,20A5,, call wr_byte013F,3003,, movlw 0x030140,08B4,, movf ack,F0141,1903,, btfsc STATUS,Z0142,20EC,, call wr_error,,,,,, ; Do stop. This starts the write cycle.0143,2037,, call wr_stop,,,,,, ; Now poll for acknowledge:0144,202E,poll_for_ack,poll_for_ack call wr_start0145,30A6,, movlw 0xA60146,20A5,, call wr_byte0147,3004,, movlw 0x040148,08B4,, movf ack,F0149,1903,, btfsc STATUS,Z014A,2944,, goto poll_for_ack,,,,,, ; Increment address/data and loop round:014B,0AB0,, incf address014C,0AB1,, incf value014D,1E30,, btfss address,4014E,2930,, goto main_wr_loop,,,,,, ; Cancel sucessful poll command:014F,2037,, call wr_stop,,,0150,3010,wait,wait movlw 0x100151,2116,, call longwait,,,0152,,reset_addr,reset_addr ; Generate start condition...0152,202E,, call wr_start,,,,,, ; Write command:0153,30A6,, movlw 0xA60154,20A5,, call wr_byte0155,3005,, movlw 0x050156,08B4,, movf ack,F0157,1903,, btfsc STATUS,Z0158,20EC,, call wr_error,,,,,, ; Send address:0159,01B0,, clrf address015A,0830,, movf address,W015B,20A5,, call wr_byte015C,3006,, movlw 0x06015D,08B4,, movf ack,F015E,1903,, btfsc STATUS,Z015F,20EC,, call wr_error,,,,,, ; Send stop:0160,2037,, call wr_stop,,,0161,202E,read_bytes,read_bytes call wr_start0162,30A7,, movlw 0xA70163,20A5,, call wr_byte0164,3007,, movlw 0x070165,08B4,, movf ack,F0166,1903,, btfsc STATUS,Z0167,20EC,, call wr_error,,,0168,1485,, bsf PORTA,10169,0000,, nop016A,0000,, nop016B,0000,, nop016C,1085,, bcf PORTA,1,,,,,, ; Do read:016D,20E0,main_rd_loop,main_rd_loop call rd_byte,,,,,, ; Is this the value we expected?016E,0830,, movf address,W016F,0232,, subwf byte,W0170,3008,, movlw 0x080171,1D03,, btfss STATUS,Z0172,20EC,, call wr_error,,,,,, ; Increment address/data and loop round:0173,0AB0,, incf address0174,1A30,, btfsc address,40175,2978,, goto done,,,,,, ; Not done yet so acknowledge byte and read next one:0176,204C,, call wr_ack0177,296D,, goto main_rd_loop,,,,,,,,, ; Stop condition marks end of sequential read:0178,2057,done,done call wr_no_ack0179,2037,, call wr_stop,,,,,, ; End of test:017A,211E,, call hang,,,,,, END
123version https://git-lfs.github.com/spec/v1oid sha256:c7022e68484e9ef01b42cd2ea379e52d24d0fe326283eed945b2e70d185e428dsize 15702123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507LIST p=16F877#include "P16F877.INC"SDO EQU 7CLK EQU 6ORG 0entrypoint goto startORG 4intvector goto intvectorCBLOCK 0x30address, value, byte, bit, acklc1, lc2, lc3ENDCset_sdo_high bcf STATUS,RP0bcf PORTC,SDObsf STATUS,RP0bsf TRISC,SDObcf STATUS,RP0returnset_sdo_low bcf STATUS,RP0bcf PORTC,SDObsf STATUS,RP0bcf TRISC,SDObcf STATUS,RP0return;-----------------------------------------------------------set_clk_high bcf STATUS,RP0bsf PORTC,CLKbsf STATUS,RP0bcf TRISC,CLKbcf STATUS,RP0return;-----------------------------------------------------------set_clk_low bcf STATUS,RP0bcf PORTC,CLKbsf STATUS,RP0bcf TRISC,CLKbcf STATUS,RP0return;-----------------------------------------------------------wait_quarter_bit movlw 0x06movwf lc1wqb0: decfsz lc1,Fgoto wqb0return;-----------------------------------------------------------wait_half_bit movlw 0x10movwf lc1whb0: decfsz lc1,Fgoto wqb0return;-----------------------------------------------------------init movlw 0xFFmovwf PORTCmovlw 0x00bsf STATUS,RP0movwf TRISCbcf STATUS,RP0return;-----------------------------------------------------------wr_start call set_clk_highcall wait_half_bitcall set_sdo_lowcall wait_half_bitcall set_clk_lowcall wait_half_bitcall wait_half_bitcall wait_half_bitreturn;-----------------------------------------------------------wr_stop call wait_half_bitcall set_clk_lowcall wait_half_bitcall set_sdo_lowcall wait_half_bitcall set_clk_highcall wait_half_bitcall set_sdo_highcall wait_half_bitreturn;-----------------------------------------------------------wr_restart call set_clk_lowcall wait_half_bitcall set_sdo_highcall wait_half_bitcall set_clk_highcall wait_half_bitcall set_sdo_lowcall wait_half_bitcall set_clk_lowcall wait_half_bitreturn;-----------------------------------------------------------wr_ack call set_clk_lowcall wait_half_bitcall set_sdo_lowcall wait_half_bitcall set_clk_highcall wait_half_bitcall set_clk_lowcall wait_half_bitcall set_sdo_highcall wait_half_bitreturn;-----------------------------------------------------------wr_no_ack call set_clk_lowcall wait_half_bitcall set_sdo_highcall wait_half_bitcall set_clk_highcall wait_half_bitcall set_clk_lowcall wait_half_bitcall wait_half_bitreturn;-----------------------------------------------------------; Generate a reset by generating a stop followed by at least; eight clock pulses.wr_reset call wait_half_bitcall set_clk_lowcall wait_half_bitcall set_sdo_lowcall wait_half_bitcall set_clk_highmovlw 0x40movwf lc1wrr0: decfsz lc1,Fgoto wrr0call set_sdo_highmovlw 0x40movwf lc1wrr1: decfsz lc1,Fgoto wrr1call set_clk_low ; clk 0call wait_half_bitcall set_clk_highcall wait_half_bitcall set_clk_low ; clk 1call wait_half_bitcall set_clk_highcall wait_half_bitcall set_clk_low ; clk 2call wait_half_bitcall set_clk_highcall wait_half_bitcall set_clk_low ; clk 3call wait_half_bitcall set_clk_highcall wait_half_bitcall set_clk_low ; clk 4call wait_half_bitcall set_clk_highcall wait_half_bitcall set_clk_low ; clk 5call wait_half_bitcall set_clk_highcall wait_half_bitcall set_clk_low ; clk 6call wait_half_bitcall set_clk_highcall wait_half_bitcall set_clk_low ; clk 7call wait_half_bitcall set_clk_highcall wait_half_bitcall set_clk_low ; clk 8call wait_half_bitcall set_clk_highcall wait_half_bitreturn;-----------------------------------------------------------wr_bit bcf STATUS,RP0call wait_quarter_bitmovf bit,wandwf byte,wbtfsc STATUS,Zgoto bit_is_0bit_is_1 call set_sdo_highgoto wbit0bit_is_0 call set_sdo_lowgoto wbit0wbit0 bcf STATUS,RP0call wait_quarter_bitcall set_clk_highcall wait_half_bitcall set_clk_lowreturn;-----------------------------------------------------------wr_byte movwf bytemovlw 0x80movwf bitwbyte0 call wr_bitbcf STATUS,Crrf bit,Fmovf bit,Fbtfss STATUS,Zgoto wbyte0call wait_quarter_bitcall set_sdo_highcall wait_quarter_bitcall set_clk_highcall wait_quarter_bitmovf PORTC,Wandlw (1<<SDO)xorlw (1<<SDO)movwf ackcall wait_quarter_bitcall set_clk_lowcall wait_quarter_bitreturn;-----------------------------------------------------------wr_halfbyte movwf bytemovlw 0x08movwf bitwhbyte0 call wr_bitbcf STATUS,Crrf bit,Fmovf bit,Fbtfss STATUS,Zgoto whbyte0call wait_quarter_bitcall set_sdo_highcall wait_quarter_bitcall set_clk_highcall wait_quarter_bitmovf PORTC,Wandlw (1<<SDO)xorlw (1<<SDO)movwf ackcall wait_quarter_bitcall set_clk_lowcall wait_quarter_bitreturn;-----------------------------------------------------------rd_bit bcf STATUS,RP0call set_sdo_highcall set_clk_lowcall wait_half_bitcall set_clk_highcall wait_quarter_bitmovf PORTC,Wandlw (1<<SDO)btfsc STATUS,Zgoto rd_bit_clearmovf bit,Wiorwf byte,Frd_bit_clear call wait_quarter_bitcall set_clk_lowreturn;-----------------------------------------------------------rd_byte movlw 0x00movwf bytemovlw 0x80movwf bitrbyte0 call rd_bitbcf STATUS,Crrf bit,Fmovf bit,Fbtfss STATUS,Zgoto rbyte0movf byte,Wreturn;-----------------------------------------------------------; Write W register to PORTD and hang.wr_error bcf STATUS,RP0movwf PORTDbsf STATUS,RP0clrf TRISDbcf STATUS,RP0wre_flash bsf PORTA,0movlw 0xFFcall longwaitmovlw 0xFFcall longwaitbcf PORTA,0movlw 0xFFcall longwaitmovlw 0xFFcall longwaitgoto wre_flashreturn;-----------------------------------------------------------; Write W register to PORTD and hang.wr_result bcf STATUS,RP0movwf PORTDbsf STATUS,RP0clrf TRISDbcf STATUS,RP0wrr_flash bsf PORTA,0movlw 0x30call vlongwaitbcf PORTA,0movlw 0x03call vlongwaitgoto wrr_flashreturn;-----------------------------------------------------------vlongwait movwf lc1vlw1 movlw 0xFFmovwf lc2vlw2 movlw 0xFFmovwf lc3vlw3 decfsz lc3,Fgoto vlw3decfsz lc2,Fgoto vlw2decfsz lc1,Fgoto vlw1return;-----------------------------------------------------------longwait movwf lc1lw1 movlw 0xFFmovwf lc2lw2 decfsz lc2,Fgoto lw2decfsz lc1,Fgoto lw1return;-----------------------------------------------------------hang goto hang;===========================================================start call initcall wr_resetbcf STATUS,RP0clrf PORTAclrf PORTDbsf STATUS,RP0movlw 0x06movwf ADCON1movlw 0x20movwf TRISAclrf TRISDbcf STATUS,RP0clrf PORTAclrf addressclrf value; Test RA5 to see if we do writes:btfss PORTA,5goto reset_addr; Do start condition:main_wr_loop: call wr_start; Send write command:movlw 0xA6call wr_bytemovlw 0x01movf ack,Fbtfsc STATUS,Zcall wr_error; Send address:movf address,Wcall wr_bytemovlw 0x02movf ack,Fbtfsc STATUS,Zcall wr_error; Send value:movf value,Wcall wr_bytemovlw 0x03movf ack,Fbtfsc STATUS,Zcall wr_error; Do stop. This starts the write cycle.call wr_stop; Now poll for acknowledge:poll_for_ack call wr_startmovlw 0xA6call wr_bytemovlw 0x04movf ack,Fbtfsc STATUS,Zgoto poll_for_ack; Increment address/data and loop round:incf addressincf valuebtfss address,4goto main_wr_loop; Cancel sucessful poll command:call wr_stopwait movlw 0x10call longwaitreset_addr ; Generate start condition...call wr_start; Write command:movlw 0xA6call wr_bytemovlw 0x05movf ack,Fbtfsc STATUS,Zcall wr_error; Send address:clrf addressmovf address,Wcall wr_bytemovlw 0x06movf ack,Fbtfsc STATUS,Zcall wr_error; Send stop:call wr_stopread_bytes call wr_startmovlw 0xA7call wr_bytemovlw 0x07movf ack,Fbtfsc STATUS,Zcall wr_errorbsf PORTA,1nopnopnopbcf PORTA,1; Do read:main_rd_loop call rd_byte; Is this the value we expected?movf address,Wsubwf byte,Wmovlw 0x08btfss STATUS,Zcall wr_error; Increment address/data and loop round:incf addressbtfsc address,4goto done; Not done yet so acknowledge byte and read next one:call wr_ackgoto main_rd_loop; Stop condition marks end of sequential read:done call wr_no_ackcall wr_stop; End of test:call hangEND
123version https://git-lfs.github.com/spec/v1oid sha256:2d2d7b796fc2347dabbc0fa9f4d6e3ad8ea963982e6cd3e839331194d72dee6csize 6596123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131' Font CDATA table' Copy and paste this table into your own program' if an internal font is required.FONT:- CData $00,$00,$00,$00,$00,$00 'Graphic character 0CData $FF,$FF,$FF,$FF,$FF,$FF 'Graphic character 1CData $07,$07,$07,$00,$00,$00 'Graphic character 2CData $00,$00,$00,$07,$07,$07 'Graphic character 3CData $E0,$E0,$E0,$00,$00,$00 'Graphic character 4CData $00,$00,$00,$E0,$E0,$E0 'Graphic character 5CData $FF,$FF,$FF,$00,$00,$00 'Graphic character 6CData $00,$00,$00,$FF,$FF,$FF 'Graphic character 7CData $07,$07,$07,$07,$07,$07 'Graphic character 8CData $E0,$E0,$E0,$E0,$E0,$E0 'Graphic character 9CData $E0,$E0,$E0,$07,$07,$07 'Graphic character 10CData $07,$07,$07,$E0,$E0,$E0 'Graphic character 11CData $FF,$FF,$FF,$E0,$E0,$E0 'Graphic character 12CData $E0,$E0,$E0,$FF,$FF,$FF 'Graphic character 13CData $07,$07,$07,$FF,$FF,$FF 'Graphic character 14CData $FF,$FF,$FF,$07,$07,$07 'Graphic character 15CData $55,$AA,$55,$AA,$55,$AA 'Graphic character 16CData $AA,$55,$AA,$55,$AA,$55 'Graphic character 17CData $01,$01,$01,$01,$01,$01 'Graphic character 18CData $80,$80,$80,$80,$80,$80 'Graphic character 19CData $FF,$00,$00,$00,$00,$00 'Graphic character 20CData $00,$00,$00,$00,$00,$FF 'Graphic character 21CData $FF,$01,$01,$01,$01,$01 'Graphic character 22CData $01,$01,$01,$01,$01,$FF 'Graphic character 23CData $FF,$80,$80,$80,$80,$80 'Graphic character 24CData $80,$80,$80,$80,$80,$FF 'Graphic character 25CData $00,$00,$00,$00,$F0,$F0 'User defined character 26CData $00,$00,$00,$00,$0F,$0F 'User defined character 27CData $00,$00,$00,$00,$00,$00 'User defined character 28CData $00,$00,$00,$00,$00,$00 'User defined character 29CData $00,$00,$00,$00,$00,$00 'User defined character 30CData $00,$00,$00,$00,$00,$00 'User defined character 31CData $00,$00,$00,$00,$00,$00 '32 - - 20CData $00,$00,$4F,$00,$00,$00 '33 - ! - 21CData $00,$07,$00,$07,$00,$00 '34 - " - 22CData $14,$7F,$14,$7F,$14,$00 '35 - # - 23CData $24,$2A,$7F,$2A,$12,$00 '36 - $ - 24CData $23,$13,$08,$64,$62,$00 '37 - % - 25CData $36,$49,$55,$22,$50,$00 '38 - & - 26CData $00,$05,$03,$00,$00,$00 '39 - ' - 27CData $1C,$22,$41,$00,$00,$00 '40 - ( - 28CData $00,$00,$41,$22,$1C,$00 '41 - ) - 29CData $14,$08,$3E,$08,$14,$00 '42 - * - 2ACData $08,$08,$3E,$08,$08,$00 '43 - + - 2BCData $00,$50,$30,$00,$00,$00 '44 - , - 2CCData $08,$08,$08,$08,$08,$00 '45 - - - 2DCData $00,$60,$60,$00,$00,$00 '46 - . - 2ECData $20,$10,$08,$04,$02,$00 '47 - / - 2FCData $3E,$51,$49,$45,$3E,$00 '48 - 0 - 30CData $00,$42,$7F,$40,$00,$00 '49 - 1 - 31CData $42,$61,$51,$49,$46,$00 '50 - 2 - 32CData $21,$41,$45,$4B,$31,$00 '51 - 3 - 33CData $18,$14,$12,$7F,$10,$00 '52 - 4 - 34CData $27,$45,$45,$45,$39,$00 '53 - 5 - 35CData $3C,$4A,$49,$49,$30,$00 '54 - 6 - 36CData $01,$71,$09,$05,$03,$00 '55 - 7 - 37CData $36,$49,$49,$49,$36,$00 '56 - 8 - 38CData $06,$49,$49,$49,$3E,$00 '57 - 9 - 39CData $00,$36,$36,$00,$00,$00 '58 - : - 3ACData $00,$56,$36,$00,$00,$00 '59 - ; - 3BCData $08,$14,$22,$41,$00,$00 '60 - < - 3CCData $14,$14,$14,$14,$14,$00 '61 - = - 3DCData $00,$41,$22,$14,$08,$00 '62 - > - 3ECData $02,$01,$51,$09,$06,$00 '63 - ? - 3FCData $32,$49,$79,$41,$3E,$00 '64 - @ - 40CData $7E,$11,$11,$11,$7E,$00 '65 - A - 41CData $7F,$49,$49,$49,$36,$00 '66 - B - 42CData $3E,$41,$41,$41,$22,$00 '67 - C - 43CData $7F,$41,$41,$22,$1C,$00 '68 - D - 44CData $7F,$49,$49,$49,$41,$00 '69 - E - 45CData $7F,$09,$09,$09,$01,$00 '70 - F - 46CData $3E,$41,$49,$49,$7A,$00 '71 - G - 47CData $7F,$08,$08,$08,$7F,$00 '72 - H - 48CData $00,$41,$7F,$41,$00,$00 '73 - I - 49CData $20,$40,$41,$3F,$01,$00 '74 - J - 4ACData $7F,$08,$14,$22,$41,$00 '75 - K - 4BCData $7F,$40,$40,$40,$40,$00 '76 - L - 4CCData $7F,$02,$0C,$02,$7F,$00 '77 - M - 4DCData $7F,$04,$08,$10,$7F,$00 '78 - N - 4ECData $3E,$41,$41,$41,$3E,$00 '79 - O - 4FCData $7F,$09,$09,$09,$06,$00 '80 - P - 50CData $3E,$41,$51,$21,$5E,$00 '81 - Q - 51CData $7F,$09,$19,$29,$46,$00 '82 - R - 52CData $46,$49,$49,$49,$31,$00 '83 - S - 53CData $01,$01,$7F,$01,$01,$00 '84 - T - 54CData $3F,$40,$40,$40,$3F,$00 '85 - U - 55CData $1F,$20,$40,$20,$1F,$00 '86 - V - 56CData $3F,$40,$38,$40,$3F,$00 '87 - W - 57CData $63,$14,$08,$14,$63,$00 '88 - X - 58CData $07,$08,$70,$08,$07,$00 '89 - Y - 59CData $61,$51,$49,$45,$43,$00 '90 - Z - 5ACData $7F,$41,$41,$00,$00,$00 '91 - [ - 5BCData $02,$04,$08,$10,$20,$00 '92 - \ - 5CCData $00,$00,$41,$41,$7F,$00 '93 - ] - 5DCData $04,$02,$01,$02,$04,$00 '94 - ^ - 5ECData $40,$40,$40,$40,$40,$00 '95 - _ - 5FCData $00,$01,$02,$04,$00,$00 '96 - ` - 60CData $20,$54,$54,$54,$78,$00 '97 - a - 61CData $7F,$48,$44,$44,$38,$00 '98 - b - 62CData $38,$44,$44,$44,$20,$00 '99 - c - 63CData $38,$44,$44,$48,$7F,$00 '100 d - 64CData $38,$54,$54,$54,$18,$00 '101 e - 65CData $08,$7E,$09,$01,$02,$00 '102 f - 66CData $0C,$52,$52,$52,$3E,$00 '103 g - 67CData $7F,$08,$04,$04,$78,$00 '104 h - 68CData $00,$44,$7D,$40,$00,$00 '105 i - 69CData $00,$20,$40,$44,$3D,$00 '106 j - 6ACData $7F,$10,$28,$44,$00,$00 '107 k - 6BCData $00,$41,$7F,$40,$00,$00 '108 l - 6CCData $7C,$04,$18,$04,$78,$00 '109 m - 6DCData $7C,$08,$04,$04,$78,$00 '110 n - 6ECData $38,$44,$44,$44,$38,$00 '111 o - 6FCData $7C,$14,$14,$14,$08,$00 '112 p - 70CData $08,$14,$14,$18,$7C,$00 '113 q - 71CData $7C,$08,$04,$04,$08,$00 '114 r - 72CData $48,$54,$54,$54,$20,$00 '115 s - 73CData $04,$3F,$44,$40,$20,$00 '116 t - 74CData $3C,$40,$40,$20,$7C,$00 '117 u - 75CData $1C,$20,$40,$20,$1C,$00 '118 v - 76CData $3C,$40,$30,$40,$3C,$00 '119 w - 77CData $44,$28,$10,$28,$44,$00 '120 x - 78CData $0C,$50,$50,$50,$3C,$00 '121 y - 79CData $44,$64,$54,$4C,$44,$00 '122 z - 7ACData $08,$36,$41,$00,$00,$00 '123 { - 7BCData $00,$00,$7F,$00,$00,$00 '124 | - 7CCData $00,$00,$41,$36,$08,$00 '125 } - 7DCData $00,$08,$04,$08,$04,$00 '126 ~ - 7E
123version https://git-lfs.github.com/spec/v1oid sha256:956abb7af9ae85cc169c2abf9600677ed93d60bfc921103a891330f033fb7cedsize 559123456789101112131415161718192021222324252627' Display text and graphics on a graphic LCDInclude "PROTON_G4.INT"' Set up some VariablesDim Xpos as ByteDim Ypos as ByteClsPrint at 0 , 2 , "Graphic LCD Test"Again:For Xpos = 0 to 63Ypos = SIN XposPlot Xpos , YposDelayms 10NextFor Xpos = 0 to 63Ypos = SIN XposUnPlot Xpos , YposDelayms 10NextGoto AgainInclude "FONT.INC"
123version https://git-lfs.github.com/spec/v1oid sha256:429b57ef639302674c3919e1edcac8ffc05070d998399df3e738657e5683ea8asize 9937123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884;*******************************************************;* Code Produced by the *;* PROTON+ Compiler. Ver 1.24d *;* Copyright Rosetta Technologies/Crownhill Associates *;* Written by Les Johnson. 2002 *;*******************************************************NOLIST#include "S:\JKJ\CROWNH~2\GLCD_T~1.PBP"LISTXPOS Equ 54YPOS Equ 55F1_SOF equ $ ; GLCD_T~1.BASF2_SOF equ $ ; PROTON_G4.INTF2_000069 equ $ ; in [PROTON_G4.INT] ADCON1 = 7 ' Set PORTA and PORTE to all digitalMovlw 7Bsf STATUS,5ram_bank = 1Movwf ADCON1F2_EOF equ $ ; PROTON_G4.INTF1_000010 equ $ ; in [GLCD_T~1.BAS] ClsBcf STATUS,5ram_bank = 0F@Call GLcd@ClsF1_000011 equ $ ; in [GLCD_T~1.BAS] Print at 0 , 2 , "Graphic LCD Test"Clrf GENMovlw 2F@Call GLCD_CurMovlw 'G'F@Call PrintMovlw 'r'F@Call PrintMovlw 'a'F@Call PrintMovlw 'p'F@Call PrintMovlw 'h'F@Call PrintMovlw 'i'F@Call PrintMovlw 'c'F@Call PrintMovlw ' 'F@Call PrintMovlw 'L'F@Call PrintMovlw 'C'F@Call PrintMovlw 'D'F@Call PrintMovlw ' 'F@Call PrintMovlw 'T'F@Call PrintMovlw 'e'F@Call PrintMovlw 's'F@Call PrintMovlw 't'F@Call PrintAGAINF1_000014 equ $ ; in [GLCD_T~1.BAS] For Xpos = 0 to 63Clrf XPOSfr@lb2Movlw 64Subwf XPOS,Wset@page nx@lb3Btfsc STATUS,0Goto nx@lb3F1_000015 equ $ ; in [GLCD_T~1.BAS] Ypos = SIN XposMovfw XPOSF@Call SinMovwf YPOSF1_000016 equ $ ; in [GLCD_T~1.BAS] Plot Xpos , YposMovfw XPOSMovwf GENMovfw YPOSF@Call LCD@PlotF1_000017 equ $ ; in [GLCD_T~1.BAS] Delayms 10Movlw 10F@Call dl@msF1_000018 equ $ ; in [GLCD_T~1.BAS] NextIncf XPOS,Fset@page fr@lb2Btfss STATUS,2Goto fr@lb2nx@lb3F1_000019 equ $ ; in [GLCD_T~1.BAS] For Xpos = 0 to 63Clrf XPOSfr@lb4Movlw 64Subwf XPOS,Wset@page nx@lb5Btfsc STATUS,0Goto nx@lb5F1_000020 equ $ ; in [GLCD_T~1.BAS] Ypos = SIN XposMovfw XPOSF@Call SinMovwf YPOSF1_000021 equ $ ; in [GLCD_T~1.BAS] UnPlot Xpos , YposMovfw XPOSMovwf GENMovfw YPOSF@Call LCD@UnPlotF1_000022 equ $ ; in [GLCD_T~1.BAS] Delayms 10Movlw 10F@Call dl@msF1_000023 equ $ ; in [GLCD_T~1.BAS] NextIncf XPOS,Fset@page fr@lb4Btfss STATUS,2Goto fr@lb4nx@lb5F1_000024 equ $ ; in [GLCD_T~1.BAS] Goto AgainF@Jump AGAINF3_SOF equ $ ; FONT.INCFONTDATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 255DATA 255DATA 255DATA 255DATA 255DATA 255DATA 7DATA 7DATA 7DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 7DATA 7DATA 7DATA 224DATA 224DATA 224DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 224DATA 224DATA 224DATA 255DATA 255DATA 255DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 255DATA 255DATA 255DATA 7DATA 7DATA 7DATA 7DATA 7DATA 7DATA 224DATA 224DATA 224DATA 224DATA 224DATA 224DATA 224DATA 224DATA 224DATA 7DATA 7DATA 7DATA 7DATA 7DATA 7DATA 224DATA 224DATA 224DATA 255DATA 255DATA 255DATA 224DATA 224DATA 224DATA 224DATA 224DATA 224DATA 255DATA 255DATA 255DATA 7DATA 7DATA 7DATA 255DATA 255DATA 255DATA 255DATA 255DATA 255DATA 7DATA 7DATA 7DATA 85DATA 170DATA 85DATA 170DATA 85DATA 170DATA 170DATA 85DATA 170DATA 85DATA 170DATA 85DATA 1DATA 1DATA 1DATA 1DATA 1DATA 1DATA 128DATA 128DATA 128DATA 128DATA 128DATA 128DATA 255DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 255DATA 255DATA 1DATA 1DATA 1DATA 1DATA 1DATA 1DATA 1DATA 1DATA 1DATA 1DATA 255DATA 255DATA 128DATA 128DATA 128DATA 128DATA 128DATA 128DATA 128DATA 128DATA 128DATA 128DATA 255DATA 0DATA 0DATA 6DATA 9DATA 9DATA 6DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 0DATA 79DATA 0DATA 0DATA 0DATA 0DATA 7DATA 0DATA 7DATA 0DATA 0DATA 20DATA 127DATA 20DATA 127DATA 20DATA 0DATA 36DATA 42DATA 127DATA 42DATA 18DATA 0DATA 35DATA 19DATA 8DATA 100DATA 98DATA 0DATA 54DATA 73DATA 85DATA 34DATA 80DATA 0DATA 0DATA 5DATA 3DATA 0DATA 0DATA 0DATA 28DATA 34DATA 65DATA 0DATA 0DATA 0DATA 0DATA 0DATA 65DATA 34DATA 28DATA 0DATA 20DATA 8DATA 62DATA 8DATA 20DATA 0DATA 8DATA 8DATA 62DATA 8DATA 8DATA 0DATA 0DATA 80DATA 48DATA 0DATA 0DATA 0DATA 8DATA 8DATA 8DATA 8DATA 8DATA 0DATA 0DATA 96DATA 96DATA 0DATA 0DATA 0DATA 32DATA 16DATA 8DATA 4DATA 2DATA 0DATA 62DATA 81DATA 73DATA 69DATA 62DATA 0DATA 0DATA 66DATA 127DATA 64DATA 0DATA 0DATA 66DATA 97DATA 81DATA 73DATA 70DATA 0DATA 33DATA 65DATA 69DATA 75DATA 49DATA 0DATA 24DATA 20DATA 18DATA 127DATA 16DATA 0DATA 39DATA 69DATA 69DATA 69DATA 57DATA 0DATA 60DATA 74DATA 73DATA 73DATA 48DATA 0DATA 1DATA 113DATA 9DATA 5DATA 3DATA 0DATA 54DATA 73DATA 73DATA 73DATA 54DATA 0DATA 6DATA 73DATA 73DATA 73DATA 62DATA 0DATA 0DATA 54DATA 54DATA 0DATA 0DATA 0DATA 0DATA 86DATA 54DATA 0DATA 0DATA 0DATA 8DATA 20DATA 34DATA 65DATA 0DATA 0DATA 20DATA 20DATA 20DATA 20DATA 20DATA 0DATA 0DATA 65DATA 34DATA 20DATA 8DATA 0DATA 2DATA 1DATA 81DATA 9DATA 6DATA 0DATA 50DATA 73DATA 121DATA 65DATA 62DATA 0DATA 126DATA 17DATA 17DATA 17DATA 126DATA 0DATA 127DATA 73DATA 73DATA 73DATA 54DATA 0DATA 62DATA 65DATA 65DATA 65DATA 34DATA 0DATA 127DATA 65DATA 65DATA 34DATA 28DATA 0DATA 127DATA 73DATA 73DATA 73DATA 65DATA 0DATA 127DATA 9DATA 9DATA 9DATA 1DATA 0DATA 62DATA 65DATA 73DATA 73DATA 122DATA 0DATA 127DATA 8DATA 8DATA 8DATA 127DATA 0DATA 0DATA 65DATA 127DATA 65DATA 0DATA 0DATA 32DATA 64DATA 65DATA 63DATA 1DATA 0DATA 127DATA 8DATA 20DATA 34DATA 65DATA 0DATA 127DATA 64DATA 64DATA 64DATA 64DATA 0DATA 127DATA 2DATA 12DATA 2DATA 127DATA 0DATA 127DATA 4DATA 8DATA 16DATA 127DATA 0DATA 62DATA 65DATA 65DATA 65DATA 62DATA 0DATA 127DATA 9DATA 9DATA 9DATA 6DATA 0DATA 62DATA 65DATA 81DATA 33DATA 94DATA 0DATA 127DATA 9DATA 25DATA 41DATA 70DATA 0DATA 70DATA 73DATA 73DATA 73DATA 49DATA 0DATA 1DATA 1DATA 127DATA 1DATA 1DATA 0DATA 63DATA 64DATA 64DATA 64DATA 63DATA 0DATA 31DATA 32DATA 64DATA 32DATA 31DATA 0DATA 63DATA 64DATA 56DATA 64DATA 63DATA 0DATA 99DATA 20DATA 8DATA 20DATA 99DATA 0DATA 7DATA 8DATA 112DATA 8DATA 7DATA 0DATA 97DATA 81DATA 73DATA 69DATA 67DATA 0DATA 127DATA 65DATA 65DATA 0DATA 0DATA 0DATA 2DATA 4DATA 8DATA 16DATA 32DATA 0DATA 0DATA 0DATA 65DATA 65DATA 127DATA 0DATA 4DATA 2DATA 1DATA 2DATA 4DATA 0DATA 64DATA 64DATA 64DATA 64DATA 64DATA 0DATA 0DATA 1DATA 2DATA 4DATA 0DATA 0DATA 32DATA 84DATA 84DATA 84DATA 120DATA 0DATA 127DATA 72DATA 68DATA 68DATA 56DATA 0DATA 56DATA 68DATA 68DATA 68DATA 32DATA 0DATA 56DATA 68DATA 68DATA 72DATA 127DATA 0DATA 56DATA 84DATA 84DATA 84DATA 24DATA 0DATA 8DATA 126DATA 9DATA 1DATA 2DATA 0DATA 12DATA 82DATA 82DATA 82DATA 62DATA 0DATA 127DATA 8DATA 4DATA 4DATA 120DATA 0DATA 0DATA 68DATA 125DATA 64DATA 0DATA 0DATA 0DATA 32DATA 64DATA 68DATA 61DATA 0DATA 127DATA 16DATA 40DATA 68DATA 0DATA 0DATA 0DATA 65DATA 127DATA 64DATA 0DATA 0DATA 124DATA 4DATA 24DATA 4DATA 120DATA 0DATA 124DATA 8DATA 4DATA 4DATA 120DATA 0DATA 56DATA 68DATA 68DATA 68DATA 56DATA 0DATA 124DATA 20DATA 20DATA 20DATA 8DATA 0DATA 8DATA 20DATA 20DATA 24DATA 124DATA 0DATA 124DATA 8DATA 4DATA 4DATA 8DATA 0DATA 72DATA 84DATA 84DATA 84DATA 32DATA 0DATA 4DATA 63DATA 68DATA 64DATA 32DATA 0DATA 60DATA 64DATA 64DATA 32DATA 124DATA 0DATA 28DATA 32DATA 64DATA 32DATA 28DATA 0DATA 60DATA 64DATA 48DATA 64DATA 60DATA 0DATA 68DATA 40DATA 16DATA 40DATA 68DATA 0DATA 12DATA 80DATA 80DATA 80DATA 60DATA 0DATA 68DATA 100DATA 84DATA 76DATA 68DATA 0DATA 8DATA 54DATA 65DATA 0DATA 0DATA 0DATA 0DATA 0DATA 127DATA 0DATA 0DATA 0DATA 0DATA 0DATA 65DATA 54DATA 8DATA 0DATA 0DATA 8DATA 4DATA 8DATA 4DATA 0F3_EOF equ $ ; FONT.INCF1_EOF equ $ ; GLCD_T~1.BASEND
123version https://git-lfs.github.com/spec/v1oid sha256:16b89c27aacadc711fa9a8771ce54527e99695861e44e3cade65892e540eae9esize 1001Message[308] S:\JKJ\CROWNH~2\GLCD_T~1.PBP 19 : Warning level superceded by command line value. (2)
123version https://git-lfs.github.com/spec/v1oid sha256:bfed31937f523ba3713bc03d9d3f280e08896ec2db153bb1cc9268437fd6e5f0size 7177123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161:10000000000001308A008F29A7007F39271B803C20:100010000D20A71B003CA70008008A0182070034BE:100020000334063409340C341034133416341934C0:100030001C341F342234253428342B342E343134EC:100040003334363439343C343F3441344434473427:1000500049344C344E3451345334553458345A3472:100060005C345E34603462346434663468346A34D8:100070006B346D346F34703471347334743475345C:100080007634783479347A347A347B347C347D3401:100090007D347E347E347E347F347F347F347F34CD:1000A000A0101221891009113E303D21B3018710A3:1000B0003308B83842213D21B40187103408403854:1000C00042213D2103018710422187143D21B40ABA:1000D000341F5D28B30AB31D57288710A0101221C2:1000E0008A291221A500891000000911A0143F30AF:1000F0003D21B830220442213D212508B3000630BD:1001000055213308302133087F39A500403842217A:100110003D218A291221AE00250830212B08A30099:100120002C08A4002E08B30006305521FC303307FC:1001300003178D0001300318013E03133407031722:100140008F0003130630B3006021AB00B620031705:100150008D0A03198F0A0313B30BA42889140915F8:100160002308AB002408AC002E088A292B0887102E:10017000422187143D21A50A803025020318A501DC:10018000250830218710250842213D292015C9283E:1001900020111221DD20B001A20A0314B00DA20B20:1001A000CE283008201DD6283104D828FF3A310542:1001B0008710422187143D218A29AE003021031087:1001C000220CAF000310AF0C0310AF0C0730A205D8:1001D000B8302F0442213D2140302E0442213D21E0:1001E0002E08F228B20000214030320442213D2185:1001F00000214030320442213D218714310808009B:100200004221871407148316FF30880083120914D3:1002100009290808B1000910831688018312071004:10022000871008006400B500A0182D298316091056:10023000871007108910091188018312A014091072:1002400007108710A501B83042213D2140304221DE:100250003D21C0303D213F303D2187103508080049:10026000A60040302602031839298910000009151C:1002700008008914000009110800091488004029A9:100280000910080007148316880188038312A70148:1002900009144A2909104C29881F5029A70F4829F9:1002A00083168801831207100800B401A701A7155F:1002B000B30C0318B407B40CB30CA70B59290800EE:1002C000831603178C170C14652983120C088A29CE:1002D000AA01A900FF30A907031CAA07031C8A2949:1002E0000330A800DF3076216A29A801E83EA70084:1002F000A809FC30031C7F29A70703187C29A7073E:100300000000A80F7C2927188529A71C892900002F:100310008929080083138312031300000800A00139:10032000073083169F0083128A015020A2010230F9:100330008A01712047308A018A2072308A018A201E:1003400061308A018A2070308A018A2068308A01EF:100350008A2069308A018A2063308A018A2020300D:100360008A018A204C308A018A2043308A018A20FF:1003700044308A018A2020308A018A2054308A0140:100380008A2065308A018A2073308A018A2074307D:100390008A018A20B601403036028A110A120318F7:1003A000E22936088A010420B7003608A20037087F:1003B0008A01C6200A308A016821B60A8A110A1207:1003C000031DCB29B601403036028A110A120318E8:1003D000FA2936088A010420B7003608A200370837:1003E0008A01C8200A308A016821B60A8A110A12D5:1003F000031DE3298A01CA29000000000000000053:1004000000000000FF00FF00FF00FF00FF00FF00F2:1004100007000700070000000000000000000000C7:100420000000070007000700E000E000E000000017:1004300000000000000000000000E000E000E0001C:10044000FF00FF00FF0000000000000000000000AF:100450000000FF00FF00FF00070007000700070083:1004600007000700E000E000E000E000E000E0003E:10047000E000E000E00007000700070007000700B9:100480000700E000E000E000FF00FF00FF00E000E8:10049000E000E000E000E000E000FF00FF00FF00FF:1004A000070007000700FF00FF00FF00FF00FF003C:1004B000FF000700070007005500AA005500AA002A:1004C0005500AA00AA005500AA005500AA00550030:1004D0000100010001000100010001008000800016:1004E0008000800080008000FF000000000000000D:1004F0000000000000000000000000000000FF00FD:10050000FF000100010001000100010001000100E5:10051000010001000100FF00FF008000800080005A:100520008000800080008000800080008000FF004C:10053000000000000600090009000600000000009D:1005400000000000000000000000000000000000AB:10055000000000000000000000000000000000009B:10056000000000000000000000000000000000008B:10057000000000000000000000000000000000007B:1005800000000000000000004F000000000000001C:1005900000000700000007000000000014007F00BA:1005A00014007F001400000024002A007F002A00AD:1005B0001200000023001300080064006200000025:1005C00036004900550022005000000000000500E0:1005D00003000000000000001C0022004100000099:1005E0000000000000000000410022001C0000008C:1005F000140008003E000800140000000800080075:100600003E0008000800000000005000300000001C:1006100000000000080008000800080008000000B2:1006200000006000600000000000000020001000DA:1006300008000400020000003E005100490045008F:100640003E000000000042007F004000000000006B:1006500042006100510049004600000021004100B5:1006600045004B00310000001800140012007F000C:10067000100000002700450045004500390000003B:100680003C004A00490049003000000001007100B0:100690000900050003000000360049004900490038:1006A0003600000006004900490049003E000000F5:1006B0000000360036000000000000000000560078:1006C0003600000000000000080014002200410075:1006D00000000000140014001400140014000000B6:1006E0000000410022001400080000000200010088:1006F0005100090006000000320049007900410065:100700003E0000007E001100110011007E0000007C:100710007F00490049004900360000003E004100CA:1007200041004100220000007F0041004100220002:100730001C0000007F004900490049004100000002:100740007F00090009000900010000003E0041008F:10075000490049007A0000007F00080008000800F6:100760007F000000000041007F0041000000000009:100770002000400041003F00010000007F00080011:1007800014002200410000007F00400040004000B3:10079000400000007F0002000C0002007F0000000B:1007A0007F000400080010007F0000003E004100B0:1007B000410041003E0000007F00090009000900DF:1007C000060000003E004100510021005E000000D4:1007D0007F0009001900290046000000460049007A:1007E0004900490031000000010001007F000100C4:1007F000010000003F004000400040003F000000BA:100800001F002000400020001F0000003F004000AB:10081000380040003F00000063001400080014008E:1008200063000000070008007000080007000000D7:100830006100510049004500430000007F00410075:100840004100000000000000020004000800100049:100850002000000000000000410041007F00000077:1008600004000200010002000400000040004000FB:1008700040004000400000000000010002000400B1:1008800000000000200054005400540078000000D4:100890007F00480044004400380000003800440055:1008A0004400440020000000380044004400480098:1008B0007F0000003800540054005400180000006D:1008C00008007E0009000100020000000C00520038:1008D000520052003E0000007F00080004000400A7:1008E00078000000000044007D004000000000008F:1008F00000002000400044003D0000007F00100088:100900002800440000000000000041007F0040007B:10091000000000007C0004001800040078000000C3:100920007C00080004000400780000003800440047:1009300044004400380000007C001400140014003F:100940000800000008001400140018007C000000DB:100950007C00080004000400080000004800540067:10096000540054002000000004003F0044004000F8:10097000200000003C004000400020007C000000FF:100980001C002000400020001C0000003C00400033:10099000300040003C000000440028001000280007:1009A000440000000C005000500050003C000000CB:1009B0004400640054004C0044000000080036006D:1009C0004100000000000000000000007F00000067:1009D0000000000000000000410036000800000098:0C09E000000008000400080004000000F3:02400E00323F3F:00000001FF
123version https://git-lfs.github.com/spec/v1oid sha256:e8e6424efd6445e49efab131f01ac87c38be1af541de949fe903f5170ae5c0b5size 11012316F877,1270,24,PROGRAM COMPILED OK. 1270 Words used24 Variables used in the 16F877 from a possible 368
123version https://git-lfs.github.com/spec/v1oid sha256:54b0d8ead91666f9acc7ea88c9693e76f9526a1bf2516fdb617c495d8bc3f3d9size 9009123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644LIST;{;FILE F1 = S:\JKJ\CROWNH~2\GLCD_T~1.BAS;FILE F2 = S:\JKJ\CROWNH~2\PROTON_G4.INT;FILE F3 = C:\Program Files\PIC BASIC Plus\INC\FONT.INC;};[Variable Listing];XPOS,0036,DT_BYTE,1;YPOS,0037,DT_BYTE,1;[End Listing]NOLIST;*******************************************************;* Code Produced by the *;* PROTON+ Compiler. Ver 1.24d *;* Copyright Rosetta Technologies/Crownhill Associates *;* Written by Les Johnson. 2002 *;*******************************************************LISTLIST P = 16F877,f = INHX8M ,w = 2, x = on, r = DEC, mm = ON, n = 0, c = 255#include C:\PROGRA~1\PICBAS~1\INC\P16F877.lpbXTAL = 4_CORE = 14_MAXMEM = 8192_ADC = 8_ADC_RES = 10_EEPROM = 256_PAGES = 4_BANKS = 3RAM_BANKS = 4_USART = 1_USB = 0_FLASH = 1BANK0_START = 32BANK0_END = 127BANK1_START = 160BANK1_END = 239BANK2_START = 272BANK2_END = 367BANK3_START = 400BANK3_END = 495ram_bank = 0f@call macro destif (dest < 1)if ((dest & 2048) == 0)bcf 10,3elsebsf 10,3endifif ((dest & 4096) == 0)bcf 10,4elsebsf 10,4endifelseif (dest > $)if ((dest & 2048) == 0)bcf 10,3elsebsf 10,3endifif ((dest & 4096) == 0)bcf 10,4elsebsf 10,4endifelseif ((dest & 6144) == 0)clrf 10elseif ((dest & 2048) == 0)bcf 10,3elsebsf 10,3endifif ((dest & 4096) == 0)bcf 10,4elsebsf 10,4endifendifendifendifcall destendmf@jump macro destif (dest < 1)if ((dest & 2048) == 0)bcf 10,3elsebsf 10,3endifif ((dest & 4096) == 0)bcf 10,4elsebsf 10,4endifelseif (dest > $)if ((dest & 2048) == 0)bcf 10,3elsebsf 10,3endifif ((dest & 4096) == 0)bcf 10,4elsebsf 10,4endifelseif ((dest & 6144) == 0)clrf 10elseif ((dest & 2048) == 0)bcf 10,3elsebsf 10,3endifif ((dest & 4096) == 0)bcf 10,4elsebsf 10,4endifendifendifendifgoto destendmset@page macro destif ((dest & 2048) == 0)bcf 10,3elsebsf 10,3endifif ((dest & 4096) == 0)bcf 10,4elsebsf 10,4endifendms@b macro varinif((varin & 384) == 0)if(ram_bank == 1)bcf 3,5endifif(ram_bank == 2)bcf 3,6endifif(ram_bank == 3)bcf 3,5bcf 3,6endifram_bank = 0endifif((varin & 384) == 128)if(ram_bank == 0)bsf 3,5endifif(ram_bank == 2)bsf 3,5bcf 3,6endifif(ram_bank == 3)bcf 3,6endifram_bank = 1endifif((varin & 384) == 256)if(ram_bank == 0)bsf 3,6endifif(ram_bank == 1)bcf 3,5bsf 3,6endifif(ram_bank == 3)bcf 3,5endifram_bank = 2endifif((varin & 384) == 384)if(ram_bank == 0)bsf 3,5bsf 3,6endifif(ram_bank == 1)bsf 3,6endifif(ram_bank == 2)bsf 3,5endifram_bank = 3endifendmr@b macroif((ram_bank & 1) != 0)bcf 3,5endifif((ram_bank & 2) != 0)bcf 3,6endifram_bank = 0endm#include C:\PROGRA~1\PICBAS~1\INC\REG_LD14.INCBPF = 32BPFH = 33GEN = 34GEN3 = 35GEN3H = 36GLCD_XPOS = 37GPR = 38PP0 = 39PP0H = 40PP1 = 41PP1H = 42PP2 = 43PP2H = 44PP3 = 45PP3H = 46PP4 = 47PP4H = 48PP5 = 49PP5H = 50PP6 = 51PP6H = 52PP7H = 53T300 = 3313T300H = 12N300 = 19697N300H = 76T600 = 1646T600H = 6N600 = 18030N600H = 70T1200 = 813T1200H = 3N1200 = 17197N1200H = 67T2400 = 400T2400H = 1N2400 = 16780N2400H = 65T4800 = 188N4800 = 16572N4800H = 64T9600 = 84N9600 = 16468N9600H = 64OT2400 = 33164OT2400H = 160OT1200 = 33581OT1200H = 160OT9600 = 32852OT9600H = 160OT300 = 36081OT300H = 160ON2400 = 49548ON2400H = 193ON1200 = 49965ON1200H = 195ON9600 = 49236ON9600H = 192ON300 = 52465ON300H = 204HOME = 1BELL = 7BKSP = 8TAB = 9CR = 13org 0nopmovlw high Start@movwf 10goto Start@org 4sin movwf 39sin@a andlw 127btfsc 39,6sublw 128call si@gbtfsc 39,7sublw 0movwf 39returnsi@g clrf 10addwf 2,fdt 0,3,6,9,12,16,19,22,25,28,31dt 34,37,40,43,46,49,51,54,57,60dt 63,65,68,71,73,76,78,81,83,85dt 88,90,92,94,96,98,100,102,104dt 106,107,109,111,112,113,115,116,117dt 118,120,121,122,122,123,124,125dt 125,126,126,126,127,127,127,127glcd@clsbcf 32,1call setup@lcdbcf PORTE,1bcf PORTE,2movlw 00111110bcall tg@lclrf 51gld@l1 bcf PORTC,1movfw 51iorlw 10111000bcall read@statuscall tg@lclrf 52glcd@l2 bcf PORTC,1movfw 52iorlw 01000000bcall read@statuscall tg@lclrwbcf PORTC,1call read@statusbsf PORTC,1call tg@lincf 52,fbtfss 52,6goto glcd@l2incf 51,fbtfss 51,3goto gld@l1bcf PORTC,1bcf 32,1call setup@lcdgoto i@ntglcd_curcall setup@lcdmovwf GLCD_XPOSbcf PORTE,1nopbcf PORTE,2bsf 32,1movlw 00111111bcall tg@lmovlw 10111000biorwf 34,wcall read@statuscall tg@lmovfw GLCD_XPOSmovwf 51movlw 6call mul@8x8movfw 51call check@pagemovfw 51andlw 127movwf GLCD_XPOSiorlw 01000000bcall read@statuscall tg@lgoto i@ntLCD_DTPORT = PORTDLCD_DTPIN = 4LCD_RSPORT = PORTCLCD_RSPIN = 1LCD_RWPORT = PORTCLCD_RWPIN = 0LCD_ENPORT = PORTELCD_ENPIN = 0LCD_CS1PORT = PORTELCD_CS1PIN = 1LCD_CS2PORT = PORTELCD_CS2PIN = 2LCD_TYPE = 1LCD_CS_INVERTED = 0print call setup@lcdmovwf 46movfw GLCD_XPOScall check@pagemovfw 43movwf 35movfw 44movwf 36movfw 46movwf 51movlw 6call mul@8x8movlw low FONTaddwf 51,wbsf 3,6movwf 269movlw high FONTskpncaddlw 1bcf 3,6addwf 52,wbsf 3,6movwf 271bcf 3,6movlw 6movwf 51glcd_l2 call c@readmovwf 43call lcdwritebsf 3,6incf 269,fskpnzincf 271,fbcf 3,6decfsz 51,fgoto glcd_l2bsf PORTE,1bsf PORTE,2movfw 35movwf 43movfw 36movwf 44lcd_donemovfw 46goto i@ntlcdwritemovfw 43bcf PORTC,1call read@statusbsf PORTC,1call tg@lincf GLCD_XPOS,fmovlw 128subwf GLCD_XPOS,wskpncclrf GLCD_XPOSmovfw GLCD_XPOScall check@pagebcf PORTC,1movfw GLCD_XPOScall read@statusgoto tg@llcd@plotbsf 32,2goto $ + 2lcd@unplotbcf 32,2call setup@lcdcall getbit@posclrf 48incf 34,fsetcrlf 48,fdecfsz 34,fgoto $ - 2movfw 48btfss 32,2goto $ + 3iorwf 49,wgoto $ + 3xorlw 255andwf 49,wbcf PORTC,1call read@statusbsf PORTC,1call tg@lgoto i@ntgetbit@posmovwf 46call check@pageclrcrrf 34,wmovwf 47clrcrrf 47,fclrcrrf 47,fmovlw 7andwf 34,fmovlw 10111000biorwf 47,wcall read@statuscall tg@lmovlw 01000000biorwf 46,wcall read@statuscall tg@lmovfw 46goto read@byteread@Bytemovwf 50call read@itmovlw 01000000biorwf 50,wcall read@statuscall tg@lcall read@itmovlw 01000000biorwf 50,wcall read@statuscall tg@lbsf PORTC,1movfw 49returnread@itcall read@statusbsf PORTC,1bsf PORTC,0bsf 3,5movlw 255movwf PORTDbcf 3,5bsf PORTE,0goto $ + 1movfw PORTDmovwf 49bcf PORTE,0bsf 3,5clrf PORTDbcf 3,5bcf PORTC,0bcf PORTC,1returnsetup@lcdclrwdtmovwf 53btfsc 32,1goto skp@gcsinbsf 3,5bcf PORTE,0bcf PORTC,1bcf PORTC,0bcf PORTE,1bcf PORTE,2clrf PORTDbcf 3,5bsf 32,1bcf PORTE,0bcf PORTC,0bcf PORTC,1clrf GLCD_XPOSmovlw 10111000bcall read@statuscall tg@lmovlw 01000000bcall read@statuscall tg@lmovlw 11000000bcall tg@lmovlw 00111111bcall tg@lskp@gcsinbcf PORTC,1movfw 53returncheck@pagemovwf 38movlw 64subwf 38,wskpncgoto skp@gchkbcf PORTE,1nopbsf PORTE,2returnskp@gchkbsf PORTE,1nopbcf PORTE,2returntg@l bsf PORTE,0movwf PORTDgoto $ + 1bcf PORTE,0returnread@status bsf PORTC,0bsf 3,5clrf PORTDdecf PORTD,fbcf 3,5clrf 39r@slp1 bsf PORTE,0goto $ + 1bcf PORTE,0goto $ + 1btfss PORTD,7goto $ + 3incfsz 39,fgoto r@slp1bsf 3,5clrf PORTDbcf 3,5bcf PORTC,0returnmul@8x8clrf 52clrf 39bsf 39,3rrf 51,fmpy@lp1skpncaddwf 52,frrf 52,frrf 51,fdecfsz 39,fgoto mpy@lp1returnrsout@c@readbsf 3,5bsf 3,6bsf 396,EEPGDbsf 396,RDgoto $ + 1bcf 3,5movfw 268goto i@ntdl@ms clrf 42dly@w movwf 41movlw 255addwf 41,fskpcaddwf 42,fskpcgoto i@ntmovlw 3movwf 40movlw 223call dlus@wgoto $ - 10dl@us clrf 40dlus@w addlw 232movwf 39comf 40,fmovlw 252skpcgoto $ + 4addwf 39,fskpncgoto $ - 2addwf 39,fnopincfsz 40,fgoto $ - 6btfsc 39,0goto $ + 1btfss 39,1goto $ + 3nopgoto $ + 1returni@nt bcf 3,7bcf 3,5bcf 3,6nopreturnStart@clrf 32
123version https://git-lfs.github.com/spec/v1oid sha256:3d388e74d49d49e25cced0e7acf90438003db981f2f149f8f6fce450c573b817size 13531123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235[][][0]FILE_REF S 1,GLCD_T~1.BAS[][][0]' Display text and graphics on a graphic LCD[][][1][][][2] Include "PROTON_G4.INT"[1][PROTON_G4.INT][0]FILE_REF S 2,PROTON_G4.INT[1][PROTON_G4.INT][1]' Operating on 4MHz.[1][PROTON_G4.INT][2]' Using a GRAPHIC LCD with an internal FONT[1][PROTON_G4.INT][3][1][PROTON_G4.INT][4] DEVICE = 16F877[1][PROTON_G4.INT][5] XTAL = 4[1][PROTON_G4.INT][6] REMARKS = ON[1][PROTON_G4.INT][7] WATCHDOG = OFF[1][PROTON_G4.INT][8] MACRO_PARAMS = ON[1][PROTON_G4.INT][9][1][PROTON_G4.INT][10] LCD_DTPORT = PORTD[1][PROTON_G4.INT][11] LCD_RSPIN = PORTC.1[1][PROTON_G4.INT][12] LCD_ENPIN = PORTE.0[1][PROTON_G4.INT][13] LCD_RWPIN = PORTC.0[1][PROTON_G4.INT][14] LCD_CS1PIN = PORTE.1[1][PROTON_G4.INT][15] LCD_CS2PIN = PORTE.2[1][PROTON_G4.INT][16] LCD_TYPE = GRAPHIC[1][PROTON_G4.INT][17] INTERNAL_FONT = ON[1][PROTON_G4.INT][18] FONT_ADDR = 0[1][PROTON_G4.INT][19] GLCD_FAST_STROBE = OFF[1][PROTON_G4.INT][20][1][PROTON_G4.INT][21] SDA_PIN = PORTC.4[1][PROTON_G4.INT][22] SCL_PIN = PORTC.3[1][PROTON_G4.INT][23][1][PROTON_G4.INT][24] SERIAL_BAUD = 9600[1][PROTON_G4.INT][25] RSOUT_PIN = PORTC.6[1][PROTON_G4.INT][26] RSOUT_MODE = TRUE[1][PROTON_G4.INT][27] RSOUT_PACE = 1[1][PROTON_G4.INT][28] RSIN_PIN = PORTC.7[1][PROTON_G4.INT][29] RSIN_MODE = TRUE[1][PROTON_G4.INT][30][1][PROTON_G4.INT][31] HSERIAL_BAUD = 2400 ' Set baud rate to 2400 for 4MHz XTAL[1][PROTON_G4.INT][32] HSERIAL_RCSTA = %10010000 ' Enable serial port and continuous receive[1][PROTON_G4.INT][33] HSERIAL_TXSTA = %00100000 ' Enable transmit and asynchronous mode[1][PROTON_G4.INT][34] HSERIAL_CLEAR = ON ' Enable Error clearing on received characters[1][PROTON_G4.INT][35][1][PROTON_G4.INT][36] KEYPAD_PORT = PORTB[1][PROTON_G4.INT][37][1][PROTON_G4.INT][38] Symbol T300 = 3313 NO_LIST[1][PROTON_G4.INT][39] Symbol N300 = 3313 + $4000 NO_LIST[1][PROTON_G4.INT][40] Symbol T600 = 1646 NO_LIST[1][PROTON_G4.INT][41] Symbol N600 = 1646 + $4000 NO_LIST[1][PROTON_G4.INT][42] Symbol T1200 = 813 NO_LIST[1][PROTON_G4.INT][43] Symbol N1200 = 813 + $4000 NO_LIST[1][PROTON_G4.INT][44] Symbol T2400 = 396 NO_LIST[1][PROTON_G4.INT][45] Symbol N2400 = 396 + $4000 NO_LIST[1][PROTON_G4.INT][46] Symbol T4800 = 188 NO_LIST[1][PROTON_G4.INT][47] Symbol N4800 = 188 + $4000 NO_LIST[1][PROTON_G4.INT][48] Symbol T9600 = 84 NO_LIST[1][PROTON_G4.INT][49] Symbol N9600 = 84 + $4000 NO_LIST[1][PROTON_G4.INT][50][1][PROTON_G4.INT][51] Symbol OT2400 = 396 + $8000 NO_LIST ' Open True[1][PROTON_G4.INT][52] Symbol OT1200 = 813 + $8000 NO_LIST ' Open True[1][PROTON_G4.INT][53] Symbol OT9600 = 84 + $8000 NO_LIST ' Open True[1][PROTON_G4.INT][54] Symbol OT300 = 3313 + $8000 NO_LIST ' Open True[1][PROTON_G4.INT][55][1][PROTON_G4.INT][56] Symbol ON2400 = 396 + $4000 + $8000 NO_LIST ' Open Inverted[1][PROTON_G4.INT][57] Symbol ON1200 = 813 + $4000 + $8000 NO_LIST ' Open Inverted[1][PROTON_G4.INT][58] Symbol ON9600 = 84 + $4000 + $8000 NO_LIST ' Open Inverted[1][PROTON_G4.INT][59] Symbol ON300 = 3313 + $4000 + $8000 NO_LIST ' Open Inverted[1][PROTON_G4.INT][60][1][PROTON_G4.INT][61]' Rsout / Serial Constants[1][PROTON_G4.INT][62] Symbol HOME = 1 NO_LIST[1][PROTON_G4.INT][63] Symbol BELL = 7 NO_LIST[1][PROTON_G4.INT][64] Symbol BKSP = 8 NO_LIST[1][PROTON_G4.INT][65] Symbol TAB = 9 NO_LIST[1][PROTON_G4.INT][66] Symbol CR = 13 NO_LIST[1][PROTON_G4.INT][67][1][PROTON_G4.INT][68] ADCON1 = 7 ' Set PORTA and PORTE to all digital[1][PROTON_G4.INT][69][1][PROTON_G4.INT][70][1][PROTON_G4.INT][71][1][PROTON_G4.INT][72]FILE_REF E 2,PROTON_G4.INT[][][3][][][4]' Set up some Variables[][][5][][][6] Dim Xpos as Byte[][][7] Dim Ypos as Byte[][][8][][][9] Cls[][][10] Print at 0 , 2 , "Graphic LCD Test"[][][11][][][12]Again:[][][13] For Xpos = 0 to 63[][][14] Ypos = SIN Xpos[][][15] Plot Xpos , Ypos[][][16] Delayms 10[][][17] Next[][][18] For Xpos = 0 to 63[][][19] Ypos = SIN Xpos[][][20] UnPlot Xpos , Ypos[][][21] Delayms 10[][][22] Next[][][23] Goto Again[][][24][][][25] Include "FONT.INC"[2][FONT.INC][0]FILE_REF S 3,FONT.INC[2][FONT.INC][1]' Copy and paste this table into your own program[2][FONT.INC][2]' if an internal font is required.[2][FONT.INC][3]FONT:- CData $00,$00,$00,$00,$00,$00 'Graphic character 0[2][FONT.INC][4] CData $FF,$FF,$FF,$FF,$FF,$FF 'Graphic character 1[2][FONT.INC][5] CData $07,$07,$07,$00,$00,$00 'Graphic character 2[2][FONT.INC][6] CData $00,$00,$00,$07,$07,$07 'Graphic character 3[2][FONT.INC][7] CData $E0,$E0,$E0,$00,$00,$00 'Graphic character 4[2][FONT.INC][8] CData $00,$00,$00,$E0,$E0,$E0 'Graphic character 5[2][FONT.INC][9] CData $FF,$FF,$FF,$00,$00,$00 'Graphic character 6[2][FONT.INC][10] CData $00,$00,$00,$FF,$FF,$FF 'Graphic character 7[2][FONT.INC][11] CData $07,$07,$07,$07,$07,$07 'Graphic character 8[2][FONT.INC][12] CData $E0,$E0,$E0,$E0,$E0,$E0 'Graphic character 9[2][FONT.INC][13] CData $E0,$E0,$E0,$07,$07,$07 'Graphic character 10[2][FONT.INC][14] CData $07,$07,$07,$E0,$E0,$E0 'Graphic character 11[2][FONT.INC][15] CData $FF,$FF,$FF,$E0,$E0,$E0 'Graphic character 12[2][FONT.INC][16] CData $E0,$E0,$E0,$FF,$FF,$FF 'Graphic character 13[2][FONT.INC][17] CData $07,$07,$07,$FF,$FF,$FF 'Graphic character 14[2][FONT.INC][18] CData $FF,$FF,$FF,$07,$07,$07 'Graphic character 15[2][FONT.INC][19] CData $55,$AA,$55,$AA,$55,$AA 'Graphic character 16[2][FONT.INC][20] CData $AA,$55,$AA,$55,$AA,$55 'Graphic character 17[2][FONT.INC][21] CData $01,$01,$01,$01,$01,$01 'Graphic character 18[2][FONT.INC][22] CData $80,$80,$80,$80,$80,$80 'Graphic character 19[2][FONT.INC][23] CData $FF,$00,$00,$00,$00,$00 'Graphic character 20[2][FONT.INC][24] CData $00,$00,$00,$00,$00,$FF 'Graphic character 21[2][FONT.INC][25] CData $FF,$01,$01,$01,$01,$01 'Graphic character 22[2][FONT.INC][26] CData $01,$01,$01,$01,$01,$FF 'Graphic character 23[2][FONT.INC][27] CData $FF,$80,$80,$80,$80,$80 'Graphic character 24[2][FONT.INC][28] CData $80,$80,$80,$80,$80,$FF 'Graphic character 25[2][FONT.INC][29] CData $00,$00,$06,$09,$09,$06 'User defined character 26[2][FONT.INC][30] CData $00,$00,$00,$00,$00,$00 'User defined character 27[2][FONT.INC][31] CData $00,$00,$00,$00,$00,$00 'User defined character 28[2][FONT.INC][32] CData $00,$00,$00,$00,$00,$00 'User defined character 29[2][FONT.INC][33] CData $00,$00,$00,$00,$00,$00 'User defined character 30[2][FONT.INC][34] CData $00,$00,$00,$00,$00,$00 'User defined character 31[2][FONT.INC][35] CData $00,$00,$00,$00,$00,$00 '32 - - 20[2][FONT.INC][36] CData $00,$00,$4F,$00,$00,$00 '33 - ! - 21[2][FONT.INC][37] CData $00,$07,$00,$07,$00,$00 '34 - " - 22[2][FONT.INC][38] CData $14,$7F,$14,$7F,$14,$00 '35 - # - 23[2][FONT.INC][39] CData $24,$2A,$7F,$2A,$12,$00 '36 - $ - 24[2][FONT.INC][40] CData $23,$13,$08,$64,$62,$00 '37 - % - 25[2][FONT.INC][41] CData $36,$49,$55,$22,$50,$00 '38 - & - 26[2][FONT.INC][42] CData $00,$05,$03,$00,$00,$00 '39 - ' - 27[2][FONT.INC][43] CData $1C,$22,$41,$00,$00,$00 '40 - ( - 28[2][FONT.INC][44] CData $00,$00,$41,$22,$1C,$00 '41 - ) - 29[2][FONT.INC][45] CData $14,$08,$3E,$08,$14,$00 '42 - * - 2A[2][FONT.INC][46] CData $08,$08,$3E,$08,$08,$00 '43 - + - 2B[2][FONT.INC][47] CData $00,$50,$30,$00,$00,$00 '44 - , - 2C[2][FONT.INC][48] CData $08,$08,$08,$08,$08,$00 '45 - - - 2D[2][FONT.INC][49] CData $00,$60,$60,$00,$00,$00 '46 - . - 2E[2][FONT.INC][50] CData $20,$10,$08,$04,$02,$00 '47 - / - 2F[2][FONT.INC][51] CData $3E,$51,$49,$45,$3E,$00 '48 - 0 - 30[2][FONT.INC][52] CData $00,$42,$7F,$40,$00,$00 '49 - 1 - 31[2][FONT.INC][53] CData $42,$61,$51,$49,$46,$00 '50 - 2 - 32[2][FONT.INC][54] CData $21,$41,$45,$4B,$31,$00 '51 - 3 - 33[2][FONT.INC][55] CData $18,$14,$12,$7F,$10,$00 '52 - 4 - 34[2][FONT.INC][56] CData $27,$45,$45,$45,$39,$00 '53 - 5 - 35[2][FONT.INC][57] CData $3C,$4A,$49,$49,$30,$00 '54 - 6 - 36[2][FONT.INC][58] CData $01,$71,$09,$05,$03,$00 '55 - 7 - 37[2][FONT.INC][59] CData $36,$49,$49,$49,$36,$00 '56 - 8 - 38[2][FONT.INC][60] CData $06,$49,$49,$49,$3E,$00 '57 - 9 - 39[2][FONT.INC][61] CData $00,$36,$36,$00,$00,$00 '58 - : - 3A[2][FONT.INC][62] CData $00,$56,$36,$00,$00,$00 '59 - ; - 3B[2][FONT.INC][63] CData $08,$14,$22,$41,$00,$00 '60 - < - 3C[2][FONT.INC][64] CData $14,$14,$14,$14,$14,$00 '61 - = - 3D[2][FONT.INC][65] CData $00,$41,$22,$14,$08,$00 '62 - > - 3E[2][FONT.INC][66] CData $02,$01,$51,$09,$06,$00 '63 - ? - 3F[2][FONT.INC][67] CData $32,$49,$79,$41,$3E,$00 '64 - @ - 40[2][FONT.INC][68] CData $7E,$11,$11,$11,$7E,$00 '65 - A - 41[2][FONT.INC][69] CData $7F,$49,$49,$49,$36,$00 '66 - B - 42[2][FONT.INC][70] CData $3E,$41,$41,$41,$22,$00 '67 - C - 43[2][FONT.INC][71] CData $7F,$41,$41,$22,$1C,$00 '68 - D - 44[2][FONT.INC][72] CData $7F,$49,$49,$49,$41,$00 '69 - E - 45[2][FONT.INC][73] CData $7F,$09,$09,$09,$01,$00 '70 - F - 46[2][FONT.INC][74] CData $3E,$41,$49,$49,$7A,$00 '71 - G - 47[2][FONT.INC][75] CData $7F,$08,$08,$08,$7F,$00 '72 - H - 48[2][FONT.INC][76] CData $00,$41,$7F,$41,$00,$00 '73 - I - 49[2][FONT.INC][77] CData $20,$40,$41,$3F,$01,$00 '74 - J - 4A[2][FONT.INC][78] CData $7F,$08,$14,$22,$41,$00 '75 - K - 4B[2][FONT.INC][79] CData $7F,$40,$40,$40,$40,$00 '76 - L - 4C[2][FONT.INC][80] CData $7F,$02,$0C,$02,$7F,$00 '77 - M - 4D[2][FONT.INC][81] CData $7F,$04,$08,$10,$7F,$00 '78 - N - 4E[2][FONT.INC][82] CData $3E,$41,$41,$41,$3E,$00 '79 - O - 4F[2][FONT.INC][83] CData $7F,$09,$09,$09,$06,$00 '80 - P - 50[2][FONT.INC][84] CData $3E,$41,$51,$21,$5E,$00 '81 - Q - 51[2][FONT.INC][85] CData $7F,$09,$19,$29,$46,$00 '82 - R - 52[2][FONT.INC][86] CData $46,$49,$49,$49,$31,$00 '83 - S - 53[2][FONT.INC][87] CData $01,$01,$7F,$01,$01,$00 '84 - T - 54[2][FONT.INC][88] CData $3F,$40,$40,$40,$3F,$00 '85 - U - 55[2][FONT.INC][89] CData $1F,$20,$40,$20,$1F,$00 '86 - V - 56[2][FONT.INC][90] CData $3F,$40,$38,$40,$3F,$00 '87 - W - 57[2][FONT.INC][91] CData $63,$14,$08,$14,$63,$00 '88 - X - 58[2][FONT.INC][92] CData $07,$08,$70,$08,$07,$00 '89 - Y - 59[2][FONT.INC][93] CData $61,$51,$49,$45,$43,$00 '90 - Z - 5A[2][FONT.INC][94] CData $7F,$41,$41,$00,$00,$00 '91 - [ - 5B[2][FONT.INC][95] CData $02,$04,$08,$10,$20,$00 '92 - \ - 5C[2][FONT.INC][96] CData $00,$00,$41,$41,$7F,$00 '93 - ] - 5D[2][FONT.INC][97] CData $04,$02,$01,$02,$04,$00 '94 - ^ - 5E[2][FONT.INC][98] CData $40,$40,$40,$40,$40,$00 '95 - _ - 5F[2][FONT.INC][99] CData $00,$01,$02,$04,$00,$00 '96 - ` - 60[2][FONT.INC][100] CData $20,$54,$54,$54,$78,$00 '97 - a - 61[2][FONT.INC][101] CData $7F,$48,$44,$44,$38,$00 '98 - b - 62[2][FONT.INC][102] CData $38,$44,$44,$44,$20,$00 '99 - c - 63[2][FONT.INC][103] CData $38,$44,$44,$48,$7F,$00 '100 d - 64[2][FONT.INC][104] CData $38,$54,$54,$54,$18,$00 '101 e - 65[2][FONT.INC][105] CData $08,$7E,$09,$01,$02,$00 '102 f - 66[2][FONT.INC][106] CData $0C,$52,$52,$52,$3E,$00 '103 g - 67[2][FONT.INC][107] CData $7F,$08,$04,$04,$78,$00 '104 h - 68[2][FONT.INC][108] CData $00,$44,$7D,$40,$00,$00 '105 i - 69[2][FONT.INC][109] CData $00,$20,$40,$44,$3D,$00 '106 j - 6A[2][FONT.INC][110] CData $7F,$10,$28,$44,$00,$00 '107 k - 6B[2][FONT.INC][111] CData $00,$41,$7F,$40,$00,$00 '108 l - 6C[2][FONT.INC][112] CData $7C,$04,$18,$04,$78,$00 '109 m - 6D[2][FONT.INC][113] CData $7C,$08,$04,$04,$78,$00 '110 n - 6E[2][FONT.INC][114] CData $38,$44,$44,$44,$38,$00 '111 o - 6F[2][FONT.INC][115] CData $7C,$14,$14,$14,$08,$00 '112 p - 70[2][FONT.INC][116] CData $08,$14,$14,$18,$7C,$00 '113 q - 71[2][FONT.INC][117] CData $7C,$08,$04,$04,$08,$00 '114 r - 72[2][FONT.INC][118] CData $48,$54,$54,$54,$20,$00 '115 s - 73[2][FONT.INC][119] CData $04,$3F,$44,$40,$20,$00 '116 t - 74[2][FONT.INC][120] CData $3C,$40,$40,$20,$7C,$00 '117 u - 75[2][FONT.INC][121] CData $1C,$20,$40,$20,$1C,$00 '118 v - 76[2][FONT.INC][122] CData $3C,$40,$30,$40,$3C,$00 '119 w - 77[2][FONT.INC][123] CData $44,$28,$10,$28,$44,$00 '120 x - 78[2][FONT.INC][124] CData $0C,$50,$50,$50,$3C,$00 '121 y - 79[2][FONT.INC][125] CData $44,$64,$54,$4C,$44,$00 '122 z - 7A[2][FONT.INC][126] CData $08,$36,$41,$00,$00,$00 '123 { - 7B[2][FONT.INC][127] CData $00,$00,$7F,$00,$00,$00 '124 | - 7C[2][FONT.INC][128] CData $00,$00,$41,$36,$08,$00 '125 } - 7D[2][FONT.INC][129] CData $00,$08,$04,$08,$04,$00 '126 ~ - 7E[2][FONT.INC][130][2][FONT.INC][131]FILE_REF E 3,FONT.INC[][][26][][][27][][][0]FILE_REF E 1,GLCD_T~1.BAS
123version https://git-lfs.github.com/spec/v1oid sha256:ebbaae5fec0d137d2292f7bbe72025a01105a453f456b53ba8c0472d999746fcsize 5988123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334NOLISTW = 0F = 1; Register FilesINDF EQU H'0000'TMR0 EQU H'0001'PCL EQU H'0002'STATUS EQU H'0003'FSR EQU H'0004'PORTA EQU H'0005'PORTB EQU H'0006'PORTC EQU H'0007'PORTD EQU H'0008'PORTE EQU H'0009'PCLATH EQU H'000A'INTCON EQU H'000B'PIR1 EQU H'000C'PIR2 EQU H'000D'TMR1L EQU H'000E'TMR1LH EQU H'000F'TMR1H EQU H'000F'T1CON EQU H'0010'TMR2 EQU H'0011'T2CON EQU H'0012'SSPBUF EQU H'0013'SSPCON EQU H'0014'CCPR1L EQU H'0015'CCPR1LH EQU H'0016'CCPR1H EQU H'0016'CCP1CON EQU H'0017'RCSTA EQU H'0018'TXREG EQU H'0019'RCREG EQU H'001A'CCPR2L EQU H'001B'CCPR2LH EQU H'001C'CCPR2H EQU H'001C'CCP2CON EQU H'001D'ADRESLH EQU H'001E'ADRESH EQU H'001E'ADCON0 EQU H'001F'OPTION_REG Equ H'81'TRISA Equ H'85'TRISB Equ H'86'TRISC Equ H'87'TRISD Equ H'88'TRISE Equ H'89'PIE1 Equ H'8C'PIE2 Equ H'8D'PCON Equ H'8E'SSPCON2 Equ H'91'PR2 Equ H'92'SSPADD Equ H'93'SSPSTAT Equ H'94'TXSTA Equ H'98'SPBRG Equ H'99'ADRESL Equ H'9E'ADRES Equ H'9E'ADCON1 Equ H'9F'EEDAT Equ H'010C'EEADR Equ H'010D'EEDATH Equ H'010E'EEADRH Equ H'010F'EECON1 Equ H'018C'EECON2 Equ H'018D'; STATUS BitsIRP = 7RP1 = 6RP0 = 5NOT_TO = 4NOT_PD = 3Z = 2DC = 1C = 0; INTCON BitsGIE = 7PEIE = 6T0IE = 5INTE = 4RBIE = 3T0IF = 2INTF = 1RBIF = 0; PIR1 BitsPSPIF = 7ADIF = 6RCIF = 5TXIF = 4SSPIF = 3CCP1IF = 2TMR2IF = 1TMR1IF = 0; PIR2 BitsEEIF = 4BCLIF = 3CCP2IF = 0; T1CON BitsT1CKPS1 = 5T1CKPS0 = 4T1OSCEN = 3NOT_T1SYNC = 2T1INSYNC = 2T1SYNC = 2TMR1CS = 1TMR1ON = 0; T2CON BitsTOUTPS3 = 6TOUTPS2 = 5TOUTPS1 = 4TOUTPS0 = 3TMR2ON = 2T2CKPS1 = 1T2CKPS0 = 0; SSPCON BitsWCOL = 7SSPOV = 6SSPEN = 5CKP = 4SSPM3 = 3SSPM2 = 2SSPM1 = 1SSPM0 = 0; CCP1CON BitsCCP1X = 5CCP1Y = 4CCP1M3 = 3CCP1M2 = 2CCP1M1 = 1CCP1M0 = 0; RCSTA BitsSPEN = 7RX9 = 6RC9 = 6NOT_RC8 = 6RC8_9 = 6SREN = 5CREN = 4ADDEN = 3FERR = 2OERR = 1RX9D = 0RCD8 = 0; CCP2CON BitsCCP2X = 5CCP2Y = 4CCP2M3 = 3CCP2M2 = 2CCP2M1 = 1CCP2M0 = 0; ADCON0 BitsADCS1 = 7ADCS0 = 6CHS2 = 5CHS1 = 4CHS0 = 3GO = 2NOT_DONE = 2GO_DONE = 2ADON = 0; OPTION_REG BitsNOT_RBPU = 7INTEDG = 6T0CS = 5T0SE = 4PSA = 3PS2 = 2PS1 = 1PS0 = 0; TRISE BitsIBF = 7OBF = 6IBOV = 5PSPMODE = 4TRISE2 = 2TRISE1 = 1TRISE0 = 0; PIE1 BitsPSPIE = 7ADIE = 6RCIE = 5TXIE = 4SSPIE = 3CCP1IE = 2TMR2IE = 1TMR1IE = 0; PIE2 BitsEEIE = 4BCLIE = 3CCP2IE = 0; PCON BitsNOT_POR = 1NOT_BO = 0NOT_BOR = 0; SSPCON2 BitsGCEN = 7ACKSTAT = 6ACKDT = 5ACKEN = 4RCEN = 3PEN = 2RSEN = 1SEN = 0; SSPSTAT BitsSMP = 7CKE = 6D = 5I2C_DTA = 5NOT_A = 5NOT_ADDRESS = 5D_A = 5DATA_ADDR = 5P = 4I2C_STP = 4S = 3I2C_STRT = 3R = 2I2C_RD = 2NOT_W = 2NOT_WRT = 2R_W = 2READ_WRT = 2UA = 1BF = 0; TXSTA BitsCSRC = 7TX9 = 6NOT_TX8 = 6TX8_9 = 6TXEN = 5SYNC = 4BRGH = 2TRMT = 1TX9D = 0TXD8 = 0; ADCON1 BitsADFM = 7PCFG3 = 3PCFG2 = 2PCFG1 = 1PCFG0 = 0; EECON1 BitsEEPGD = 7WRERR = 3WREN = 2WR = 1RD = 0__MAXRAM H'1FF'__BADRAM H'8F'-H'90', H'95'-H'97', H'9A'-H'9D'__BADRAM H'105', H'107'-H'109'__BADRAM H'185', H'187'-H'189', H'18E'-H'18F';Configuration BitsCP_ALL Equ H'0FCF'CP_HALF Equ H'1FDF'CP_UPPER_256 Equ H'2FEF'CP_OFF Equ H'3FFF'DEBUG_ON Equ H'37FF'DEBUG_OFF Equ H'3FFF'WRTE_ON Equ H'3FFF'WRTE_OFF Equ H'3DFF'CPD_ON Equ H'3EFF'CPD_OFF Equ H'3FFF'LVP_ON Equ H'3FFF'LVP_OFF Equ H'3F7F'BODEN_ON Equ H'3FFF'BODEN_OFF Equ H'3FBF'PWRTE_OFF Equ H'3FFF'PWRTE_ON Equ H'3FF7'WDT_ON Equ H'3FFF'WDT_OFF Equ H'3FFB'LP_OSC Equ H'3FFC'XT_OSC Equ H'3FFD'HS_OSC Equ H'3FFE'RC_OSC Equ H'3FFF'; Set the default fuse configurationifndef CONFIG_REQifdef WATCHDOG_REQ__config HS_OSC & WDT_ON & PWRTE_ON & BODEN_OFF & LVP_OFF & WRTE_ON & CP_OFF & DEBUG_OFFelse__config HS_OSC & WDT_OFF & PWRTE_ON & BODEN_OFF & LVP_OFF & WRTE_ON & CP_OFF & DEBUG_OFFendifendifLIST
123version https://git-lfs.github.com/spec/v1oid sha256:8f2d33438a37daa0a01aa0347eed5ab5cd72b006c3147e19c4ffe2ea19056e54size 2161123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172' PROTON board' Operating on 4MHz.' Using a GRAPHIC LCD with an internal FONTDEVICE = 16F877XTAL = 4REMARKS = ONWATCHDOG = OFFMACRO_PARAMS = ONLCD_DTPORT = PORTDLCD_RSPIN = PORTC.1LCD_ENPIN = PORTE.0LCD_RWPIN = PORTC.0LCD_CS1PIN = PORTE.1LCD_CS2PIN = PORTE.2LCD_TYPE = GRAPHICINTERNAL_FONT = ONFONT_ADDR = 0GLCD_FAST_STROBE = OFFSDA_PIN = PORTC.4SCL_PIN = PORTC.3SERIAL_BAUD = 9600RSOUT_PIN = PORTC.6RSOUT_MODE = TRUERSOUT_PACE = 1RSIN_PIN = PORTC.7RSIN_MODE = TRUEHSERIAL_BAUD = 2400 ' Set baud rate to 2400 for 4MHz XTALHSERIAL_RCSTA = %10010000 ' Enable serial port and continuous receiveHSERIAL_TXSTA = %00100000 ' Enable transmit and asynchronous modeHSERIAL_CLEAR = ON ' Enable Error clearing on received charactersKEYPAD_PORT = PORTBSymbol T300 = 3313 NO_LISTSymbol N300 = 3313 + $4000 NO_LISTSymbol T600 = 1646 NO_LISTSymbol N600 = 1646 + $4000 NO_LISTSymbol T1200 = 813 NO_LISTSymbol N1200 = 813 + $4000 NO_LISTSymbol T2400 = 396 NO_LISTSymbol N2400 = 396 + $4000 NO_LISTSymbol T4800 = 188 NO_LISTSymbol N4800 = 188 + $4000 NO_LISTSymbol T9600 = 84 NO_LISTSymbol N9600 = 84 + $4000 NO_LISTSymbol OT2400 = 396 + $8000 NO_LIST ' Open TrueSymbol OT1200 = 813 + $8000 NO_LIST ' Open TrueSymbol OT9600 = 84 + $8000 NO_LIST ' Open TrueSymbol OT300 = 3313 + $8000 NO_LIST ' Open TrueSymbol ON2400 = 396 + $4000 + $8000 NO_LIST ' Open InvertedSymbol ON1200 = 813 + $4000 + $8000 NO_LIST ' Open InvertedSymbol ON9600 = 84 + $4000 + $8000 NO_LIST ' Open InvertedSymbol ON300 = 3313 + $4000 + $8000 NO_LIST ' Open Inverted' Rsout / Serial ConstantsSymbol HOME = 1 NO_LISTSymbol BELL = 7 NO_LISTSymbol BKSP = 8 NO_LISTSymbol TAB = 9 NO_LISTSymbol CR = 13 NO_LISTADCON1 = 7 ' Set PORTA and PORTE to all digital
123version https://git-lfs.github.com/spec/v1oid sha256:7738bd127c11283e0b838075e6c48d2cf924a86637263e4b663b19e2c30deb95size 3381123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113## There exist several targets which are by default empty and which can be# used for execution of your targets. These targets are usually executed# before and after some main targets. They are:## .build-pre: called before 'build' target# .build-post: called after 'build' target# .clean-pre: called before 'clean' target# .clean-post: called after 'clean' target# .clobber-pre: called before 'clobber' target# .clobber-post: called after 'clobber' target# .all-pre: called before 'all' target# .all-post: called after 'all' target# .help-pre: called before 'help' target# .help-post: called after 'help' target## Targets beginning with '.' are not intended to be called on their own.## Main targets can be executed directly, and they are:## build build a specific configuration# clean remove built files from a configuration# clobber remove all built files# all build all configurations# help print help mesage## Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and# .help-impl are implemented in nbproject/makefile-impl.mk.## Available make variables:## CND_BASEDIR base directory for relative paths# CND_DISTDIR default top distribution directory (build artifacts)# CND_BUILDDIR default top build directory (object files, ...)# CONF name of current configuration# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)# CND_PACKAGE_NAME_${CONF} name of package (current configuration)# CND_PACKAGE_PATH_${CONF} path to package (current configuration)## NOCDDL# EnvironmentMKDIR=mkdirCP=cpCCADMIN=CCadminRANLIB=ranlib# buildbuild: .build-post.build-pre:# Add your pre 'build' code here....build-post: .build-impl# Add your post 'build' code here...# cleanclean: .clean-post.clean-pre:# Add your pre 'clean' code here...# WARNING: the IDE does not call this target since it takes a long time to# simply run make. Instead, the IDE removes the configuration directories# under build and dist directly without calling make.# This target is left here so people can do a clean when running a clean# outside the IDE..clean-post: .clean-impl# Add your post 'clean' code here...# clobberclobber: .clobber-post.clobber-pre:# Add your pre 'clobber' code here....clobber-post: .clobber-impl# Add your post 'clobber' code here...# allall: .all-post.all-pre:# Add your pre 'all' code here....all-post: .all-impl# Add your post 'all' code here...# helphelp: .help-post.help-pre:# Add your pre 'help' code here....help-post: .help-impl# Add your post 'help' code here...# include project implementation makefileinclude nbproject/Makefile-impl.mk# include project make variablesinclude nbproject/Makefile-variables.mk
123version https://git-lfs.github.com/spec/v1oid sha256:14185e805bcff0fda731992f500e1247bc9ef70ece5491c9525e2fde67dc8125size 17171234567891011121314151617181920212223242526272829303132333435363738394041:020000040000FA:0400000080311B2808:100008007E1480310B1F09280A2819284E011B1F4E:100018000E280F281928111F122813281928803193:10002800DC2080318131202180317E10090080312F:100038001D287E1040018031F52840019A01990160:1000480096019701980107309500CF309100DF3075:1000580092009301FF309400FF307E01D900CE0159:10006800DF30C3000730E4004C30B800DA01E501A6:10007800C401B901CF01E601BA01C501D001DB0114:10008800FF30BB00FF30C600FF30D100FF30DC007E:100098000730E700FF30BC00FF30C700FF30D20058:1000A800FF30DD000F30E800013094007D01BB0116:1000B80003307E019D000230950001307D01BC00B7:1000C800080081310921803180312120803181313E:1000D800002180318031992080318031CF208031DA:1000E8008031C12080318031812080318031AE2043:1000F80080318031E9208031080001307C01A50081:100108000130A6002130A7002330A8002130A90023:100118000230AA000830AB002030AC00AD019530A9:10012800A4004E0111131B1708000C307C0191002C:100138001A3092002130930022309400223095002A:1001480002309600083097002030980099018230DC:10015800900008000A307C019B0001309C009D0142:1001680023309E0001309F000230A000A101203002:10017800A200A30185309A0008004B019201930167:100188008E018D018C01063091006630900066303A:100198008F00921708007C01AF01B001B101B201D4:1001A800B301B401B501B601B7018230AE00080051:1001B80081311121803140019800003081311821AE:1001C80080317C01AF17AF130800C03040019F0099:1001D800FF309D009C014E018C12803040019E0032:1001E80008008031652080318B170B1781311D2164:1001F8008031FD2880311B28623051018D008F012C:10020800910102309300920108004F019601970175:10021800980199019A019B01080040011C08F0000F:100228007008F10071080800F000700840019C0097:0E023800080040019E1708004E011113080037:020000040001F9:0A000E00EC3FFF3F9F3FFF3FFF3F25:00000001FF
123version https://git-lfs.github.com/spec/v1oid sha256:c8549ff8df696166b357053a897d9f77353f5bc74d96d6562914e5deff6a1c06size 247612345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879/**Generated Main Source FileCompany:Microchip Technology Inc.File Name:main.cSummary:This is the main file generated using PIC10 / PIC12 / PIC16 / PIC18 MCUsDescription:This header file provides implementations for driver APIs for all modules selected in the GUI.Generation Information :Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.7Device : PIC16F18877Driver Version : 2.00*//*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms, you may use Microchip software and anyderivatives exclusively with Microchip products. It is your responsibility to comply with third partylicense terms applicable to your use of third party software (including open source software) thatmay accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANYIMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESSFOR A PARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIPHAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TOTHE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALLCLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNTOF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THISSOFTWARE.*/#include "mcc_generated_files/mcc.h"void USER_ISR_CLC(void){// Pulse measuredLATC = TMR0_ReadTimer();TMR0_WriteTimer(0);// Generate Reset pulseCLC4POLbits.POL = 1;CLC4POLbits.POL = 0;}void main(void){// initialize the deviceSYSTEM_Initialize();// When using interrupts, you need to set the Global and Peripheral Interrupt Enable bits// Use the following macros to:// Enable the Global InterruptsINTERRUPT_GlobalInterruptEnable();// Enable the Peripheral InterruptsINTERRUPT_PeripheralInterruptEnable();TMR0_StartTimer();while (1){// Add your application code}}/**End of File*/
123version https://git-lfs.github.com/spec/v1oid sha256:e879919d0da9563426c5e136aa89dcdaac55b51f8df80b57b12b3218fd65ffd3size 34071234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192/**CLC1 Generated Driver File@CompanyMicrochip Technology Inc.@File Nameclc1.c@SummaryThis is the generated driver implementation file for the CLC1 driver using PIC10 / PIC12 / PIC16 / PIC18 MCUs@DescriptionThis source file provides implementations for driver APIs for CLC1.Generation Information :Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.7Device : PIC16F18877Driver Version : 2.11The generated drivers are tested against the following:Compiler : XC8 2.31 and above or laterMPLAB : MPLAB X 5.45*//*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms, you may use Microchip software and anyderivatives exclusively with Microchip products. It is your responsibility to comply with third partylicense terms applicable to your use of third party software (including open source software) thatmay accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANYIMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESSFOR A PARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIPHAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TOTHE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALLCLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNTOF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THISSOFTWARE.*//**Section: Included Files*/#include <xc.h>#include "clc1.h"/**Section: CLC1 APIs*/void CLC1_Initialize(void){// Set the CLC1 to the options selected in the User Interface// LC1G1POL not_inverted; LC1G2POL not_inverted; LC1G3POL inverted; LC1G4POL inverted; LC1POL not_inverted;CLC1POL = 0x0C;// LC1D1S NCO1_OUT;CLC1SEL0 = 0x1A;// LC1D2S CLC2_OUT;CLC1SEL1 = 0x21;// LC1D3S CLC3_OUT;CLC1SEL2 = 0x22;// LC1D4S CLC3_OUT;CLC1SEL3 = 0x22;// LC1G1D3N disabled; LC1G1D2N disabled; LC1G1D4N disabled; LC1G1D1T enabled; LC1G1D3T disabled; LC1G1D2T disabled; LC1G1D4T disabled; LC1G1D1N disabled;CLC1GLS0 = 0x02;// LC1G2D2N disabled; LC1G2D1N disabled; LC1G2D4N disabled; LC1G2D3N disabled; LC1G2D2T enabled; LC1G2D1T disabled; LC1G2D4T disabled; LC1G2D3T disabled;CLC1GLS1 = 0x08;// LC1G3D1N disabled; LC1G3D2N disabled; LC1G3D3N disabled; LC1G3D4N disabled; LC1G3D1T disabled; LC1G3D2T disabled; LC1G3D3T enabled; LC1G3D4T disabled;CLC1GLS2 = 0x20;// LC1G4D1N disabled; LC1G4D2N disabled; LC1G4D3N disabled; LC1G4D4N disabled; LC1G4D1T disabled; LC1G4D2T disabled; LC1G4D3T disabled; LC1G4D4T disabled;CLC1GLS3 = 0x00;// LC1EN enabled; INTN disabled; INTP disabled; MODE 4-input AND;CLC1CON = 0x82;}bool CLC1_OutputStatusGet(void){return(CLC1CONbits.LC1OUT);}/**End of File*/
123version https://git-lfs.github.com/spec/v1oid sha256:a68a7a00e10ce19621ae1da46704bd29f5c7338489c4cad93019d7bc047baa37size 2959123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125/**CLC1 Generated Driver API Header File@CompanyMicrochip Technology Inc.@File Nameclc1.h@SummaryThis is the generated header file for the CLC1 driver using PIC10 / PIC12 / PIC16 / PIC18 MCUs@DescriptionThis header file provides APIs for driver for CLC1.Generation Information :Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.7Device : PIC16F18877Driver Version : 2.11The generated drivers are tested against the following:Compiler : XC8 2.31 and above or laterMPLAB : MPLAB X 5.45*//*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms, you may use Microchip software and anyderivatives exclusively with Microchip products. It is your responsibility to comply with third partylicense terms applicable to your use of third party software (including open source software) thatmay accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANYIMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESSFOR A PARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIPHAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TOTHE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALLCLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNTOF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THISSOFTWARE.*/#ifndef CLC1_H#define CLC1_H/**Section: Included Files*/#include <xc.h>#include <stdint.h>#include <stdbool.h>#ifdef __cplusplus // Provide C++ Compatibilityextern "C" {#endif/**Section: CLC1 APIs*//**@SummaryInitializes the CLC1@DescriptionThis routine configures the CLC1 specific control registers@PreconditionsNone@ReturnsNone@ParamNone@Comment@Example<code>CLC1_Initialize();</code>*/void CLC1_Initialize(void);/**@SummaryReturns output pin status of the CLC module.@DescriptionThis routine returns output pin status of the CLC module.@ParamNone.@ReturnsOutput pin status@Example<code>bool outputStatus;outputStatus = CLC1_OutputStatusGet();</code>*/bool CLC1_OutputStatusGet(void);#ifdef __cplusplus // Provide C++ Compatibility}#endif#endif // CLC1_H/**End of File*/
123version https://git-lfs.github.com/spec/v1oid sha256:675e3864354a29c9651f2322b88d88d33a33165fcb9fbecc17878974cb449ae3size 34531234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192/**CLC2 Generated Driver File@CompanyMicrochip Technology Inc.@File Nameclc2.c@SummaryThis is the generated driver implementation file for the CLC2 driver using PIC10 / PIC12 / PIC16 / PIC18 MCUs@DescriptionThis source file provides implementations for driver APIs for CLC2.Generation Information :Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.7Device : PIC16F18877Driver Version : 2.11The generated drivers are tested against the following:Compiler : XC8 2.31 and above or laterMPLAB : MPLAB X 5.45*//*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms, you may use Microchip software and anyderivatives exclusively with Microchip products. It is your responsibility to comply with third partylicense terms applicable to your use of third party software (including open source software) thatmay accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANYIMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESSFOR A PARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIPHAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TOTHE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALLCLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNTOF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THISSOFTWARE.*//**Section: Included Files*/#include <xc.h>#include "clc2.h"/**Section: CLC2 APIs*/void CLC2_Initialize(void){// Set the CLC2 to the options selected in the User Interface// LC2G1POL not_inverted; LC2G2POL inverted; LC2G3POL not_inverted; LC2G4POL inverted; LC2POL not_inverted;CLC2POL = 0x0A;// LC2D1S CLCIN1 (CLCIN1PPS);CLC2SEL0 = 0x01;// LC2D2S CLCIN0 (CLCIN0PPS);CLC2SEL1 = 0x00;// LC2D3S CLC4_OUT;CLC2SEL2 = 0x23;// LC2D4S CLCIN1 (CLCIN1PPS);CLC2SEL3 = 0x01;// LC2G1D3N disabled; LC2G1D2N disabled; LC2G1D4N disabled; LC2G1D1T enabled; LC2G1D3T disabled; LC2G1D2T disabled; LC2G1D4T disabled; LC2G1D1N disabled;CLC2GLS0 = 0x02;// LC2G2D2N disabled; LC2G2D1N disabled; LC2G2D4N disabled; LC2G2D3N disabled; LC2G2D2T disabled; LC2G2D1T disabled; LC2G2D4T disabled; LC2G2D3T disabled;CLC2GLS1 = 0x00;// LC2G3D1N disabled; LC2G3D2N disabled; LC2G3D3N disabled; LC2G3D4N disabled; LC2G3D1T disabled; LC2G3D2T disabled; LC2G3D3T enabled; LC2G3D4T disabled;CLC2GLS2 = 0x20;// LC2G4D1N disabled; LC2G4D2N disabled; LC2G4D3N disabled; LC2G4D4N disabled; LC2G4D1T disabled; LC2G4D2T disabled; LC2G4D3T disabled; LC2G4D4T disabled;CLC2GLS3 = 0x00;// LC2EN enabled; INTN disabled; INTP disabled; MODE 2-input D flip-flop with R;CLC2CON = 0x85;}bool CLC2_OutputStatusGet(void){return(CLC2CONbits.LC2OUT);}/**End of File*/
123version https://git-lfs.github.com/spec/v1oid sha256:52b494d243cc5e5ec672e3719829035c3475b30720508587844b263287c68c2bsize 2959123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125/**CLC2 Generated Driver API Header File@CompanyMicrochip Technology Inc.@File Nameclc2.h@SummaryThis is the generated header file for the CLC2 driver using PIC10 / PIC12 / PIC16 / PIC18 MCUs@DescriptionThis header file provides APIs for driver for CLC2.Generation Information :Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.7Device : PIC16F18877Driver Version : 2.11The generated drivers are tested against the following:Compiler : XC8 2.31 and above or laterMPLAB : MPLAB X 5.45*//*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms, you may use Microchip software and anyderivatives exclusively with Microchip products. It is your responsibility to comply with third partylicense terms applicable to your use of third party software (including open source software) thatmay accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANYIMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESSFOR A PARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIPHAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TOTHE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALLCLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNTOF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THISSOFTWARE.*/#ifndef CLC2_H#define CLC2_H/**Section: Included Files*/#include <xc.h>#include <stdint.h>#include <stdbool.h>#ifdef __cplusplus // Provide C++ Compatibilityextern "C" {#endif/**Section: CLC2 APIs*//**@SummaryInitializes the CLC2@DescriptionThis routine configures the CLC2 specific control registers@PreconditionsNone@ReturnsNone@ParamNone@Comment@Example<code>CLC2_Initialize();</code>*/void CLC2_Initialize(void);/**@SummaryReturns output pin status of the CLC module.@DescriptionThis routine returns output pin status of the CLC module.@ParamNone.@ReturnsOutput pin status@Example<code>bool outputStatus;outputStatus = CLC2_OutputStatusGet();</code>*/bool CLC2_OutputStatusGet(void);#ifdef __cplusplus // Provide C++ Compatibility}#endif#endif // CLC2_H/**End of File*/
123version https://git-lfs.github.com/spec/v1oid sha256:29166f7cf153d98cd5ae2b8b6193e023ed8be6a27b5c7fb64ccd4f64c402977csize 3647123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101/**CLC3 Generated Driver File@CompanyMicrochip Technology Inc.@File Nameclc3.c@SummaryThis is the generated driver implementation file for the CLC3 driver using PIC10 / PIC12 / PIC16 / PIC18 MCUs@DescriptionThis source file provides implementations for driver APIs for CLC3.Generation Information :Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.7Device : PIC16F18877Driver Version : 2.11The generated drivers are tested against the following:Compiler : XC8 2.31 and above or laterMPLAB : MPLAB X 5.45*//*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms, you may use Microchip software and anyderivatives exclusively with Microchip products. It is your responsibility to comply with third partylicense terms applicable to your use of third party software (including open source software) thatmay accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANYIMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESSFOR A PARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIPHAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TOTHE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALLCLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNTOF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THISSOFTWARE.*//**Section: Included Files*/#include <xc.h>#include "clc3.h"/**Section: CLC3 APIs*/void CLC3_Initialize(void){// Set the CLC3 to the options selected in the User Interface// LC3G1POL inverted; LC3G2POL not_inverted; LC3G3POL not_inverted; LC3G4POL not_inverted; LC3POL not_inverted;CLC3POL = 0x01;// LC3D1S CLCIN1 (CLCIN1PPS);CLC3SEL0 = 0x01;// LC3D2S CLC2_OUT;CLC3SEL1 = 0x21;// LC3D3S CLC4_OUT;CLC3SEL2 = 0x23;// LC3D4S CLC2_OUT;CLC3SEL3 = 0x21;// LC3G1D3N disabled; LC3G1D2N disabled; LC3G1D4N disabled; LC3G1D1T enabled; LC3G1D3T disabled; LC3G1D2T disabled; LC3G1D4T disabled; LC3G1D1N disabled;CLC3GLS0 = 0x02;// LC3G2D2N disabled; LC3G2D1N disabled; LC3G2D4N disabled; LC3G2D3N disabled; LC3G2D2T enabled; LC3G2D1T disabled; LC3G2D4T disabled; LC3G2D3T disabled;CLC3GLS1 = 0x08;// LC3G3D1N disabled; LC3G3D2N disabled; LC3G3D3N disabled; LC3G3D4N disabled; LC3G3D1T disabled; LC3G3D2T disabled; LC3G3D3T enabled; LC3G3D4T disabled;CLC3GLS2 = 0x20;// LC3G4D1N disabled; LC3G4D2N disabled; LC3G4D3N disabled; LC3G4D4N disabled; LC3G4D1T disabled; LC3G4D2T disabled; LC3G4D3T disabled; LC3G4D4T disabled;CLC3GLS3 = 0x00;// LC3EN enabled; INTN disabled; INTP enabled; MODE 2-input D flip-flop with R;CLC3CON = 0x95;// Clear the CLC interrupt flagPIR5bits.CLC3IF = 0;// Enabling CLC3 interrupt.PIE5bits.CLC3IE = 1;}void CLC3_ISR(void){// Clear the CLC interrupt flagPIR5bits.CLC3IF = 0;}bool CLC3_OutputStatusGet(void){return(CLC3CONbits.LC3OUT);}/**End of File*/
123version https://git-lfs.github.com/spec/v1oid sha256:34c27e885ba9ae1b6b09c5a471693fe45b892eb275fd98845fd3140dc3d63b96size 3327123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143/**CLC3 Generated Driver API Header File@CompanyMicrochip Technology Inc.@File Nameclc3.h@SummaryThis is the generated header file for the CLC3 driver using PIC10 / PIC12 / PIC16 / PIC18 MCUs@DescriptionThis header file provides APIs for driver for CLC3.Generation Information :Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.7Device : PIC16F18877Driver Version : 2.11The generated drivers are tested against the following:Compiler : XC8 2.31 and above or laterMPLAB : MPLAB X 5.45*//*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms, you may use Microchip software and anyderivatives exclusively with Microchip products. It is your responsibility to comply with third partylicense terms applicable to your use of third party software (including open source software) thatmay accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANYIMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESSFOR A PARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIPHAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TOTHE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALLCLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNTOF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THISSOFTWARE.*/#ifndef CLC3_H#define CLC3_H/**Section: Included Files*/#include <xc.h>#include <stdint.h>#include <stdbool.h>#ifdef __cplusplus // Provide C++ Compatibilityextern "C" {#endif/**Section: CLC3 APIs*//**@SummaryInitializes the CLC3@DescriptionThis routine configures the CLC3 specific control registers@PreconditionsNone@ReturnsNone@ParamNone@Comment@Example<code>CLC3_Initialize();</code>*/void CLC3_Initialize(void);/**@SummaryCLC3 Interrupt Service Routine@DescriptionThis is the CLC3 interrupt service routine called by the Interrupt Manager. Place your CLC3 interrupt code here.@PreconditionsCLC3_Initialize() function should have been called before calling this function@ReturnsNone@ParamNone*/void CLC3_ISR(void);/**@SummaryReturns output pin status of the CLC module.@DescriptionThis routine returns output pin status of the CLC module.@ParamNone.@ReturnsOutput pin status@Example<code>bool outputStatus;outputStatus = CLC3_OutputStatusGet();</code>*/bool CLC3_OutputStatusGet(void);#ifdef __cplusplus // Provide C++ Compatibility}#endif#endif // CLC3_H/**End of File*/
123version https://git-lfs.github.com/spec/v1oid sha256:a89b292d75beb4c4638eea59cc7715bfa0400a51e1503b4349a3612a4dac9895size 34581234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192/**CLC4 Generated Driver File@CompanyMicrochip Technology Inc.@File Nameclc4.c@SummaryThis is the generated driver implementation file for the CLC4 driver using PIC10 / PIC12 / PIC16 / PIC18 MCUs@DescriptionThis source file provides implementations for driver APIs for CLC4.Generation Information :Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.7Device : PIC16F18877Driver Version : 2.11The generated drivers are tested against the following:Compiler : XC8 2.31 and above or laterMPLAB : MPLAB X 5.45*//*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms, you may use Microchip software and anyderivatives exclusively with Microchip products. It is your responsibility to comply with third partylicense terms applicable to your use of third party software (including open source software) thatmay accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANYIMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESSFOR A PARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIPHAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TOTHE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALLCLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNTOF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THISSOFTWARE.*//**Section: Included Files*/#include <xc.h>#include "clc4.h"/**Section: CLC4 APIs*/void CLC4_Initialize(void){// Set the CLC4 to the options selected in the User Interface// LC4G1POL not_inverted; LC4G2POL not_inverted; LC4G3POL not_inverted; LC4G4POL not_inverted; LC4POL not_inverted;CLC4POL = 0x00;// LC4D1S CLCIN0 (CLCIN0PPS);CLC4SEL0 = 0x00;// LC4D2S CLCIN0 (CLCIN0PPS);CLC4SEL1 = 0x00;// LC4D3S CLCIN0 (CLCIN0PPS);CLC4SEL2 = 0x00;// LC4D4S CLCIN0 (CLCIN0PPS);CLC4SEL3 = 0x00;// LC4G1D3N disabled; LC4G1D2N disabled; LC4G1D4N disabled; LC4G1D1T disabled; LC4G1D3T disabled; LC4G1D2T disabled; LC4G1D4T disabled; LC4G1D1N disabled;CLC4GLS0 = 0x00;// LC4G2D2N disabled; LC4G2D1N disabled; LC4G2D4N disabled; LC4G2D3N disabled; LC4G2D2T disabled; LC4G2D1T disabled; LC4G2D4T disabled; LC4G2D3T disabled;CLC4GLS1 = 0x00;// LC4G3D1N disabled; LC4G3D2N disabled; LC4G3D3N disabled; LC4G3D4N disabled; LC4G3D1T disabled; LC4G3D2T disabled; LC4G3D3T disabled; LC4G3D4T disabled;CLC4GLS2 = 0x00;// LC4G4D1N disabled; LC4G4D2N disabled; LC4G4D3N disabled; LC4G4D4N disabled; LC4G4D1T disabled; LC4G4D2T disabled; LC4G4D3T disabled; LC4G4D4T disabled;CLC4GLS3 = 0x00;// LC4EN enabled; INTN disabled; INTP disabled; MODE 4-input AND;CLC4CON = 0x82;}bool CLC4_OutputStatusGet(void){return(CLC4CONbits.LC4OUT);}/**End of File*/
123version https://git-lfs.github.com/spec/v1oid sha256:a14eac62738e4a78ae8f9f7c1185f01a70702f82726ae7b8dcb64837cb4f5d37size 2959123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125/**CLC4 Generated Driver API Header File@CompanyMicrochip Technology Inc.@File Nameclc4.h@SummaryThis is the generated header file for the CLC4 driver using PIC10 / PIC12 / PIC16 / PIC18 MCUs@DescriptionThis header file provides APIs for driver for CLC4.Generation Information :Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.7Device : PIC16F18877Driver Version : 2.11The generated drivers are tested against the following:Compiler : XC8 2.31 and above or laterMPLAB : MPLAB X 5.45*//*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms, you may use Microchip software and anyderivatives exclusively with Microchip products. It is your responsibility to comply with third partylicense terms applicable to your use of third party software (including open source software) thatmay accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANYIMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESSFOR A PARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIPHAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TOTHE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALLCLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNTOF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THISSOFTWARE.*/#ifndef CLC4_H#define CLC4_H/**Section: Included Files*/#include <xc.h>#include <stdint.h>#include <stdbool.h>#ifdef __cplusplus // Provide C++ Compatibilityextern "C" {#endif/**Section: CLC4 APIs*//**@SummaryInitializes the CLC4@DescriptionThis routine configures the CLC4 specific control registers@PreconditionsNone@ReturnsNone@ParamNone@Comment@Example<code>CLC4_Initialize();</code>*/void CLC4_Initialize(void);/**@SummaryReturns output pin status of the CLC module.@DescriptionThis routine returns output pin status of the CLC module.@ParamNone.@ReturnsOutput pin status@Example<code>bool outputStatus;outputStatus = CLC4_OutputStatusGet();</code>*/bool CLC4_OutputStatusGet(void);#ifdef __cplusplus // Provide C++ Compatibility}#endif#endif // CLC4_H/**End of File*/
123version https://git-lfs.github.com/spec/v1oid sha256:4fab2fbe0ee14a72c8c8c68cf03476030f44b66414aae3139e0ac8c4b5c28c13size 44451234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980/**@Generated PIC10 / PIC12 / PIC16 / PIC18 MCUs Source File@Company:Microchip Technology Inc.@File Name:mcc.c@Summary:This is the device_config.c file generated using PIC10 / PIC12 / PIC16 / PIC18 MCUs@Description:This header file provides implementations for driver APIs for all modules selected in the GUI.Generation Information :Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.7Device : PIC16F18877Driver Version : 2.00The generated drivers are tested against the following:Compiler : XC8 2.31 and above or laterMPLAB : MPLAB X 5.45*//*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms, you may use Microchip software and anyderivatives exclusively with Microchip products. It is your responsibility to comply with third partylicense terms applicable to your use of third party software (including open source software) thatmay accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANYIMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESSFOR A PARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIPHAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TOTHE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALLCLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNTOF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THISSOFTWARE.*/// Configuration bits: selected in the GUI// CONFIG1#pragma config FEXTOSC = OFF // External Oscillator mode selection bits->Oscillator not enabled#pragma config RSTOSC = HFINT1 // Power-up default value for COSC bits->HFINTOSC (1MHz)#pragma config CLKOUTEN = OFF // Clock Out Enable bit->CLKOUT function is disabled; i/o or oscillator function on OSC2#pragma config CSWEN = ON // Clock Switch Enable bit->Writing to NOSC and NDIV is allowed#pragma config FCMEN = ON // Fail-Safe Clock Monitor Enable bit->FSCM timer enabled// CONFIG2#pragma config MCLRE = ON // Master Clear Enable bit->MCLR pin is Master Clear function#pragma config PWRTE = OFF // Power-up Timer Enable bit->PWRT disabled#pragma config LPBOREN = OFF // Low-Power BOR enable bit->ULPBOR disabled#pragma config BOREN = ON // Brown-out reset enable bits->Brown-out Reset Enabled, SBOREN bit is ignored#pragma config BORV = LO // Brown-out Reset Voltage Selection->Brown-out Reset Voltage (VBOR) set to 1.9V on LF, and 2.45V on F Devices#pragma config ZCD = OFF // Zero-cross detect disable->Zero-cross detect circuit is disabled at POR.#pragma config PPS1WAY = ON // Peripheral Pin Select one-way control->The PPSLOCK bit can be cleared and set only once in software#pragma config STVREN = ON // Stack Overflow/Underflow Reset Enable bit->Stack Overflow or Underflow will cause a reset#pragma config DEBUG = OFF // Background Debugger->Background Debugger disabled// CONFIG3#pragma config WDTCPS = WDTCPS_31 // WDT Period Select bits->Divider ratio 1:65536; software control of WDTPS#pragma config WDTE = OFF // WDT operating mode->WDT Disabled, SWDTEN is ignored#pragma config WDTCWS = WDTCWS_7 // WDT Window Select bits->window always open (100%); software control; keyed access not required#pragma config WDTCCS = SC // WDT input clock selector->Software Control// CONFIG4#pragma config WRT = OFF // UserNVM self-write protection bits->Write protection off#pragma config SCANE = available // Scanner Enable bit->Scanner module is available for use#pragma config LVP = ON // Low Voltage Programming Enable bit->Low Voltage programming enabled. MCLR/Vpp pin function is MCLR.// CONFIG5#pragma config CP = OFF // UserNVM Program memory code protection bit->Program Memory code protection disabled#pragma config CPD = OFF // DataNVM code protection bit->Data EEPROM code protection disabled
123version https://git-lfs.github.com/spec/v1oid sha256:849b1ff86564ba54e24a2a4b8218402b40cf609df1201086b5d03c8fcbc0e34fsize 208712345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455/**@Generated PIC10 / PIC12 / PIC16 / PIC18 MCUs Header File@Company:Microchip Technology Inc.@File Name:mcc.c@Summary:This is the device_config.h file generated using PIC10 / PIC12 / PIC16 / PIC18 MCUs@Description:This header file provides implementations for driver APIs for all modules selected in the GUI.Generation Information :Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.7Device : PIC16F18877Driver Version : 2.00The generated drivers are tested against the following:Compiler : XC8 2.31 and above or laterMPLAB : MPLAB X 5.45*//*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms, you may use Microchip software and anyderivatives exclusively with Microchip products. It is your responsibility to comply with third partylicense terms applicable to your use of third party software (including open source software) thatmay accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANYIMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESSFOR A PARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIPHAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TOTHE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALLCLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNTOF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THISSOFTWARE.*/#ifndef DEVICE_CONFIG_H#define DEVICE_CONFIG_H#define _XTAL_FREQ 1000000#endif /* DEVICE_CONFIG_H *//**End of File*/
123version https://git-lfs.github.com/spec/v1oid sha256:d0c4fefc7b0438b38b4b6f7b2fb4218adc7115bf7afbd8244fc71e45f961d924size 254912345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576/**Generated Interrupt Manager Source File@Company:Microchip Technology Inc.@File Name:interrupt_manager.c@Summary:This is the Interrupt Manager file generated using PIC10 / PIC12 / PIC16 / PIC18 MCUs@Description:This header file provides implementations for global interrupt handling.For individual peripheral handlers please see the peripheral driver forall modules selected in the GUI.Generation Information :Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.7Device : PIC16F18877Driver Version : 2.04The generated drivers are tested against the following:Compiler : XC8 2.31 and above or laterMPLAB : MPLAB X 5.45*//*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms, you may use Microchip software and anyderivatives exclusively with Microchip products. It is your responsibility to comply with third partylicense terms applicable to your use of third party software (including open source software) thatmay accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANYIMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESSFOR A PARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIPHAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TOTHE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALLCLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNTOF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THISSOFTWARE.*/#include "interrupt_manager.h"#include "mcc.h"extern void USER_ISR_CLC(void);void __interrupt() INTERRUPT_InterruptManager (void){// interrupt handlerif(INTCONbits.PEIE == 1){if(PIE5bits.CLC3IE == 1 && PIR5bits.CLC3IF == 1){USER_ISR_CLC();CLC3_ISR();}else{//Unhandled Interrupt}}else{//Unhandled Interrupt}}/**End of File*/
123version https://git-lfs.github.com/spec/v1oid sha256:a30e05a4bfb8144afae6e41674a43a79f9cff36c0c8044a331f376bd063b295csize 3139123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104/**Generated Interrupt Manager Header File@Company:Microchip Technology Inc.@File Name:interrupt_manager.h@Summary:This is the Interrupt Manager file generated using PIC10 / PIC12 / PIC16 / PIC18 MCUs@Description:This header file provides implementations for global interrupt handling.For individual peripheral handlers please see the peripheral driver forall modules selected in the GUI.Generation Information :Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.7Device : PIC16F18877Driver Version : 2.03The generated drivers are tested against the following:Compiler : XC8 2.31 and above or laterMPLAB : MPLAB X 5.45*//*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms, you may use Microchip software and anyderivatives exclusively with Microchip products. It is your responsibility to comply with third partylicense terms applicable to your use of third party software (including open source software) thatmay accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANYIMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESSFOR A PARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIPHAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TOTHE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALLCLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNTOF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THISSOFTWARE.*/#ifndef INTERRUPT_MANAGER_H#define INTERRUPT_MANAGER_H/*** @Paramnone* @Returnsnone* @DescriptionThis macro will enable global interrupts.* @ExampleINTERRUPT_GlobalInterruptEnable();*/#define INTERRUPT_GlobalInterruptEnable() (INTCONbits.GIE = 1)/*** @Paramnone* @Returnsnone* @DescriptionThis macro will disable global interrupts.* @ExampleINTERRUPT_GlobalInterruptDisable();*/#define INTERRUPT_GlobalInterruptDisable() (INTCONbits.GIE = 0)/*** @Paramnone* @Returnsnone* @DescriptionThis macro will enable peripheral interrupts.* @ExampleINTERRUPT_PeripheralInterruptEnable();*/#define INTERRUPT_PeripheralInterruptEnable() (INTCONbits.PEIE = 1)/*** @Paramnone* @Returnsnone* @DescriptionThis macro will disable peripheral interrupts.* @ExampleINTERRUPT_PeripheralInterruptDisable();*/#define INTERRUPT_PeripheralInterruptDisable() (INTCONbits.PEIE = 0)#endif // INTERRUPT_MANAGER_H/**End of File*/
123version https://git-lfs.github.com/spec/v1oid sha256:53779827e4b4c046d0f5d32152ab5276ce0e918b82b02b19727b6256c698b546size 3663123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596/**@Generated PIC10 / PIC12 / PIC16 / PIC18 MCUs Source File@Company:Microchip Technology Inc.@File Name:mcc.c@Summary:This is the mcc.c file generated using PIC10 / PIC12 / PIC16 / PIC18 MCUs@Description:This header file provides implementations for driver APIs for all modules selected in the GUI.Generation Information :Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.7Device : PIC16F18877Driver Version : 2.00The generated drivers are tested against the following:Compiler : XC8 2.31 and above or laterMPLAB : MPLAB X 5.45*//*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms, you may use Microchip software and anyderivatives exclusively with Microchip products. It is your responsibility to comply with third partylicense terms applicable to your use of third party software (including open source software) thatmay accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANYIMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESSFOR A PARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIPHAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TOTHE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALLCLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNTOF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THISSOFTWARE.*/#include "mcc.h"void SYSTEM_Initialize(void){PMD_Initialize();PIN_MANAGER_Initialize();OSCILLATOR_Initialize();CLC1_Initialize();CLC4_Initialize();NCO1_Initialize();CLC3_Initialize();CLC2_Initialize();TMR0_Initialize();}void OSCILLATOR_Initialize(void){// NOSC HFINTOSC; NDIV 4;OSCCON1 = 0x62;// CSWHOLD may proceed; SOSCPWR Low power;OSCCON3 = 0x00;// MFOEN disabled; LFOEN disabled; ADOEN disabled; SOSCEN disabled; EXTOEN disabled; HFOEN disabled;OSCEN = 0x00;// HFFRQ 4_MHz;OSCFRQ = 0x02;// HFTUN 0;OSCTUNE = 0x00;}void PMD_Initialize(void){// CLKRMD CLKR enabled; SYSCMD SYSCLK enabled; SCANMD SCANNER enabled; FVRMD FVR enabled; IOCMD IOC enabled; CRCMD CRC enabled; NVMMD NVM enabled;PMD0 = 0x00;// TMR0MD TMR0 enabled; TMR1MD TMR1 enabled; TMR4MD TMR4 enabled; TMR5MD TMR5 enabled; TMR2MD TMR2 enabled; TMR3MD TMR3 enabled; NCOMD DDS(NCO) enabled; TMR6MD TMR6 enabled;PMD1 = 0x00;// ZCDMD ZCD enabled; DACMD DAC enabled; CMP1MD CMP1 enabled; ADCMD ADC enabled; CMP2MD CMP2 enabled;PMD2 = 0x00;// CCP2MD CCP2 enabled; CCP1MD CCP1 enabled; CCP4MD CCP4 enabled; CCP3MD CCP3 enabled; CCP5MD CCP5 enabled; PWM6MD PWM6 enabled; PWM7MD PWM7 enabled;PMD3 = 0x00;// CWG3MD CWG3 enabled; CWG2MD CWG2 enabled; CWG1MD CWG1 enabled; MSSP1MD MSSP1 enabled; UART1MD EUSART enabled; MSSP2MD MSSP2 enabled;PMD4 = 0x00;// DSMMD DSM enabled; CLC3MD CLC3 enabled; CLC4MD CLC4 enabled; SMT1MD SMT1 enabled; SMT2MD SMT2 enabled; CLC1MD CLC1 enabled; CLC2MD CLC2 enabled;PMD5 = 0x00;}/**End of File*/
123version https://git-lfs.github.com/spec/v1oid sha256:8823edc2384a152445f6d5b787d50c8c373ba97f554360ab76adbd42d04e96e8size 3043123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108/**@Generated PIC10 / PIC12 / PIC16 / PIC18 MCUs Header File@Company:Microchip Technology Inc.@File Name:mcc.h@Summary:This is the mcc.h file generated using PIC10 / PIC12 / PIC16 / PIC18 MCUs@Description:This header file provides implementations for driver APIs for all modules selected in the GUI.Generation Information :Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.7Device : PIC16F18877Driver Version : 2.00The generated drivers are tested against the following:Compiler : XC8 2.31 and above or laterMPLAB : MPLAB X 5.45*//*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms, you may use Microchip software and anyderivatives exclusively with Microchip products. It is your responsibility to comply with third partylicense terms applicable to your use of third party software (including open source software) thatmay accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANYIMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESSFOR A PARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIPHAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TOTHE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALLCLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNTOF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THISSOFTWARE.*/#ifndef MCC_H#define MCC_H#include <xc.h>#include "device_config.h"#include "pin_manager.h"#include <stdint.h>#include <stdbool.h>#include <conio.h>#include "interrupt_manager.h"#include "nco1.h"#include "clc4.h"#include "clc3.h"#include "clc2.h"#include "clc1.h"#include "tmr0.h"/*** @Paramnone* @Returnsnone* @DescriptionInitializes the device to the default states configured in the* MCC GUI* @ExampleSYSTEM_Initialize(void);*/void SYSTEM_Initialize(void);/*** @Paramnone* @Returnsnone* @DescriptionInitializes the oscillator to the default states configured in the* MCC GUI* @ExampleOSCILLATOR_Initialize(void);*/void OSCILLATOR_Initialize(void);/*** @Paramnone* @Returnsnone* @DescriptionInitializes the PMD module to the default states configured in the* MCC GUI* @ExamplePMD_Initialize(void);*/void PMD_Initialize(void);#endif /* MCC_H *//**End of File*/
123version https://git-lfs.github.com/spec/v1oid sha256:393a884766174729f67f59bd47d0624243d6fd416f948d3590e623dc30a3162bsize 268512345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091/**NCO1 Generated Driver File@CompanyMicrochip Technology Inc.@File Namenco1.c@SummaryThis is the generated driver implementation file for the NCO1 driver using PIC10 / PIC12 / PIC16 / PIC18 MCUs@DescriptionThis source file provides implementations for driver APIs for NCO1.Generation Information :Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.7Device : PIC16F18877Driver Version : 2.11The generated drivers are tested against the following:Compiler : XC8 2.31 and above or laterMPLAB : MPLAB X 5.45*//*(c) 2018 Microchip Technology Inc. and its subsidiaries.Subject to your compliance with these terms, you may use Microchip software and anyderivatives exclusively with Microchip products. It is your responsibility to comply with third partylicense terms applicable to your use of third party software (including open source software) thatmay accompany Microchip software.THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHEREXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANYIMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESSFOR A PARTICULAR PURPOSE.IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KINDWHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIPHAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TOTHE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALLCLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNTOF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THISSOFTWARE.*//**Section: Included Files*/#include <xc.h>#include "nco1.h"/**Section: NCO Module APIs*/void NCO1_Initialize (void){// Set the NCO to the options selected in the GUI// N1EN disabled; N1POL active_lo; N1PFM FDC_mode;NCO1CON = 0x00;// N1CKS FOSC; N1PWS 1_clk;NCO1CLK = 0x00;//NCO1ACCU = 0x00;//NCO1ACCH = 0x00;//NCO1ACCL = 0x00;//NCO1INCU = 0x06;//NCO1INCH = 0x66;//NCO1INCL = 0x66;// Enable the NCO moduleNCO1CONbits.N1EN = 1;}bool NCO1_GetOutputStatus(void){// Return output status on accumulator over flowreturn (NCO1CONbits.N1OUT);}/**End of File*/
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Calculator/PICCALC.XCL+162-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Calculator/PICCALC.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Clock/PICCLOCK.ASM+420-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Clock/PICCLOCK.COD
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Clock/PICCLOCK.ERR+2-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Clock/PICCLOCK.HEX+40-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Clock/PICCLOCK.LST+630-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Clock/PICCLOCK.SDI+420-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Clock/PICCLOCK.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Doorbell/Doorbell.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Serial Memory Example/I2CMEM1.ERR+13-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Serial Memory Example/I2CMEM1.HEX+50-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Serial Memory Example/I2CMEM1.LST+947-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Serial Memory Example/i2cmem1.SDI+506-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Serial Memory Example/i2cmem1.asm+507-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/PIC Serial Memory Example/i2cmem1.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/FONT.Inc+131-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/GLCD_Test.bas+27-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/GLCD_T~1.ASM+884-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/GLCD_T~1.COD
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/GLCD_T~1.ERR+1-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/GLCD_T~1.HEX+161-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/GLCD_T~1.LST
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/GLCD_T~1.PBE+3-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/GLCD_T~1.PBP+644-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/GLCD_T~1.RAW+235-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/P16F877.lpb+334-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/PICBASIC.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/Proton Plus/PROTON_G4.INT+72-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/PIC16F18877.pdsprj
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/Makefile+113-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/MyConfig.mc3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/dist/default/production/src.production.cof
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/dist/default/production/src.production.hex+41-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/main.c+79-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/clc1.c+92-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/clc1.h+125-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/clc2.c+92-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/clc2.h+125-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/clc3.c+101-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/clc3.h+143-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/clc4.c+92-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/clc4.h+125-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/device_config.c+80-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/device_config.h+55-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/interrupt_manager.c+76-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/interrupt_manager.h+104-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/mcc.c+96-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/mcc.h+108-3
Proteus 8 Professional/DATA/SAMPLES/VSM for PICMICRO/VSM for PIC16/TB3133. CLC on PIC Microcontrollers/src/mcc_generated_files/nco1.c+91-3