Spanish Italian
8287 Users    

SUCKERmenu

05 Firmware

FIRMWARE

;*************************************
;* RESKEY
;* Chiave elettronica resistiva ad autoapprendimento
;*
;* Revisione 2
;*
;* PIC 16C54 RC
;* f= 4MHz
;* 2 livelli stack
;* 512x12 EPROM 32x8 RAM (24 general purpose register)
;* 13 I/O 18 PIN
;*
;******************************************
w equ 00h ;Accumulatore
rtcc equ 01h ;fosc/4 x prescaler
pc equ 02h ;Program counter 9bit
status equ 03h ;Status word register
fsr equ 04h ;Registro indiretto
porta equ 05h ;RA0-RA3
portb equ 06h ;RB0-RB7
RXRIP equ 07h ;NON USATO
TIMER EQU 08H ;Contatore convertitore A/D
ERRO1 EQU 09H ;Key false x inibizione
VOLTE EQU 0AH ;Letture x 16
MIS0 EQU 0BH ;RA0x16/MIS3
REG0 EQU 0CH ;Registro var. program
MIS1 EQU 0DH ;RA1x16/MIS3
REG1 EQU 0EH ;Reg. vario + timer
MIS2 EQU 0FH ;RA2x16/MIS3
REG2 EQU 010H ;Reg. vario + timer
COD0 EQU 011H ;Codice RA0
LO EQU 012H ;Byte basso misura
MIS3 EQU 013H ;Variabile carica condensatore x16/16/2
COD1 EQU 014H ;Codice RA1
TXBUF EQU 015H ;Eeprom
HI EQU 016H ;byte alto misura
COD2 EQU 017H ;Codice RA2
EMA EQU 018H ;Ripetizioni misura nel main
REG EQU 019H ;Reg. vario + timer + divis
MIS3H EQU 01AH ;Byte alto di MIS3
ADDR EQU 01BH ;Indirizzo eeprom
DAT EQU 01CH ;Dato eeprom
COUNT EQU 01DH ;Eeprom
RXBUF EQU 01EH ;Eeprom
EEP EQU 01FH ;Eeprom
;
TOLL EQU .7 ;tolleranza +- della lettura
;
LIST P=16C54
ORG 1FFH
RESET
GOTO main
ORG 00H
;
confronto goto conf
;***************************************************************
; READ/WRITE 24C02
;***************************************************************

;***************************************************************
;* TIMER
;* tim200 = 200ms
;* tim4s = 4s
;* Usati REG REG1 REG2
;* f=4MHz
;**************************************************************
t
;**************************************************************
;Div16 divides for 16 and then for 2
;
;Divis enters with hi and the /mis3 and exits with reg=result
;
;***********************************************
;Controls if the key is inserted
;
;***********************************************
;Charge and discharge cap. with delay
;
;****************************************************
; Misura
;Exit with MIS0, MIS1, MIS2 gi... divided for the relative MIS3
;Therefore the discharge comes multiplied x 16 and divided for MIS3
;MIS3 comes multiplied for 16 and div for 16 and 2
;TIMERx16/MIS3x16/16/2=MIS0
;****************************************************
;***************************************************************
; ACTIVATION RELE and LED if j=0 then step-step for the time key
;***************************************************************
;***************************************************************
; ERRORE antisabotaggio ERRO1=240 to the reset
; if error for 16 times then inhibition for 16s
;***************************************************************
;**************************************************************
; EXTERNAL COMPARISON EEPROM CODE WITH EXTERNAL CODE
; MIS0-MIS1-MIS1 with COD0-COD1-COD2***exit with error or assets
;**************************************************************
;********************************************codice riconosciuto
;***************************************************************
; PROGRAMMING KEY
;***************************************************************

;***************************************************************
; MAIN PROGRAM
;
;***************************************************************

;*****************************reset memoria eeprom
;
END

DOWNLOAD THE FIRMWARE IN PDF -->reskey_asm.pdf

Who's new

  • chulhee
  • moliv
  • pippopippo
  • athamer
  • jayasimhan

Who's online

There are currently 0 users and 16 guests online.