
Originally Posted by
_ab What part in the code should i change to convert it to the pic16f628???
You have asked the question badly. It is not about changing from 16F84 to 16F628. The original author had already provided correct source code for the 16F628. It is the function you required not being provided in the F628 source code. So it is a question of modifying the 16F628 source code to include your requirement.
The change required is easily done. See below, change marked with "<<<<<<".
Code:
;**********************************************************************
; *
; Filename: cl2.asm *
; Date: *
; File Version: Combination lock rewritten *
; *
; Author: Peter Jakab <el@jap.hu> *
; http://jap.hu/electronic/ *
;**********************************************************************
;..............
;
pulseout ; # operates output
movf PORTA, W ;get port A into W <<<<<<<<<<
xorlw 0x04 ;toggle RA2 <<<<<<<<<<
movwf PORTA
movlw msg_line
call lcd_cmdout
movlw msg_ok
call lcd_strout
movlw pulsewidth
movwf dcnt2
out0 movlw d'200'
call udelay
decfsz dcnt2, F
goto out0
goto loop