chinusneha
New Member
please help
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
list p=16f877A ; list directive to define processor
#include <p16f877A.inc> ; processor specific variable definitions
__CONFIG _CP_OFF & _WDT_OFF & _BODEN_OFF & _PWRTE_ON & _RC_OSC & _WRT_OFF & _LVP_ON & _CPD_OFF
; '__CONFIG' directive is used to embed configuration data within .asm file.
; The lables following the directive are located in the respective .inc file.
; See respective data sheet for additional information on configuration word.
cblock 0x20 ;start of general purpose registers
count ;used in looping routines
endc
;**********************************************************************
ORG 0x000 ; processor reset vector
nop ; nop required for icd
goto main ; go to beginning of program
ORG 0x004 ; interrupt vector location
main:
BANKSEL ADCON1 ;disable analogue inputs
movlw 0x06
movwf ADCON1
BANKSEL PORTA
banksel TRISA
movlw b'00000001' ;Set port data directions, data output
movwf TRISA
banksel TRISB
movlw b'00000000'
movwf TRISB
banksel PORTB
clrf PORTB
loop
btfsc PORTA,0 ; if input gos high
incf PORTB,f ; count it out to leds on PORTB
goto loop ; repeat forever
END ; directive 'end of program'
My clock at
**broken link removed**
counts the pulses using the rb0 interrupt, you can download the code ( boostc )
Hi Russ,
Thought I'd have a look at this; there are no source files in the zip file for this projects... perhaps you forgot to update your download?
contents of DClock_v1.zip:
ClockFace.png
MotorMount1.png
PICClock.wmv
PowerSupplyBoardBrd.png
PowerSupplyBoardSch.png
ProcessorBoardBrd.png
ProcessorBoardSch.png
WClockNoPS.sch
WClockNoPS_2.brd
WClockPS.brd
WClockPS.sch