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.
At the moment I wish to know how to obtain 1Hz signal at an ouput port without using timer and by using only internal clock oscillator of 1 MHz
If you have any idea please let me know
Delay_OneHalfSecondMinus2InstructionTimes
movlw .83
movwf d1
movlw .138
movwf d2
movlw .3
movwf d3
Loop_499998us
decfsz d1,f ;dec reg d1 and skip next instr if zero, place result in d1
goto Loop_499998us
decfsz d2,f ;dec reg d2 and skip next instr if zero, place result in d2
goto Loop_499998us
decfsz d3,f ;dec reg d3 and skip next instr if zero, place result in d3
goto Loop_499998us
goto Goto_499998us
Goto_499998us
return
Delay_OneHalfSecondMinus3InstructionTimes
movlw .83
movwf d1
movlw .138
movwf d2
movlw .3
movwf d3
Loop_499997us
decfsz d1,f ;dec reg d1 and skip next instr if zero, place result in d1
goto Loop_499997us
decfsz d2,f ;dec reg d2 and skip next instr if zero, place result in d2
goto Loop_499997us
decfsz d3,f ;dec reg d3 and skip next instr if zero, place result in d3
goto Loop_499997us
nop
return
I am using PIC 16f887.
I just want to know if I can use the 1Mhz clock signal to generate 1Hz signal at any output port.
without any timers or time delays
Is it possible to implement a real time clock and then use the constant 1 second interval from that clock?