Copy Link
Add to Bookmark
Report

Antifurto

DrWatson's profile picture
Published in 
guide hacker
 · 30 May 2019

Cari Roxyyy , Krapac e tutti i membri di sharefree e noflyzone eccovi una variante di un vecchio progetto "CARSTARTER" ideato da me e realizzato da Krapac...Questo Progetto Ë una semplice realizzazione Home-hobby di elettronica.Antifurto per auto ed applicabile anche in qualsiasi luogo.

Kr‡ riguardando lo schema che avevi fatto mi Ë venuto in mente di utilizzare il PIC 16F84 per creare un antifurto per auto o per casa basato su sensori ad infrarosso, anche per roxyy che gli scatta sempre l'allarme.hiiih...cosÏ ora se qualcuno vuole capire come fare (spendendo solo 20 Euro) basta
Seguire le istruzioni...Inoltre ho scritto anche il programmino in asm da caricare all'interno del PIC16f84. (Testato e simulato con il MPASM).Vi faccio nota che l'header dell'asm per i pic 16f84 Ë sempre lo stesso dal comando LIST in poi si aggiunge il programma vero e proprio.
Vi allego anche compilato in Esadecimale /se qualcuno vuole scriverlo nel pic e renderlo operativo)

Eccovi prima lo schema:

Antifurto
Pin it

Segue sorgente.
(La prima parte del sorgente Ë standard per i PIC16f84 segue dal secondo comando LIST la personalizzazione dell'antifurto.

 

LIST
; P16F84.INC Standard Header File, Version 2.00 Microchip Technology, Inc.
NOLIST
;======================================================================
;
; Verify Processor
;
;======================================================================

IFNDEF __16F84
MESSG "Processor-header file mismatch. Verify selected processor."
ENDIF

;======================================================================
;
; Register Definitions
;
;======================================================================

W EQU H'0000'
F EQU H'0001'

;----- Register Files------------------------------------------------------

INDF 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'
EEDATA EQU H'0008'
EEADR EQU H'0009'
PCLATH EQU H'000A'
INTCON EQU H'000B'

OPTION_REG EQU H'0081'
TRISA EQU H'0085'
TRISB EQU H'0086'
EECON1 EQU H'0088'
EECON2 EQU H'0089'

;----- STATUS Bits --------------------------------------------------------

IRP EQU H'0007'
RP1 EQU H'0006'
RP0 EQU H'0005'
NOT_TO EQU H'0004'
NOT_PD EQU H'0003'
Z EQU H'0002'
DC EQU H'0001'
C EQU H'0000'

;----- INTCON Bits --------------------------------------------------------

GIE EQU H'0007'
EEIE EQU H'0006'
T0IE EQU H'0005'
INTE EQU H'0004'
RBIE EQU H'0003'
T0IF EQU H'0002'
INTF EQU H'0001'
RBIF EQU H'0000'

;----- OPTION Bits --------------------------------------------------------

NOT_RBPU EQU H'0007'
INTEDG EQU H'0006'
T0CS EQU H'0005'
T0SE EQU H'0004'
PSA EQU H'0003'
PS2 EQU H'0002'
PS1 EQU H'0001'
PS0 EQU H'0000'

;----- EECON1 Bits --------------------------------------------------------

EEIF EQU H'0004'
WRERR EQU H'0003'
WREN EQU H'0002'
WR EQU H'0001'
RD EQU H'0000'

;======================================================================
;
; RAM Definition
;
;======================================================================

__MAXRAM H'CF'
__BADRAM H'07', H'50'-H'7F', H'87'


;======================================================================
; Configuration Bits
;
;======================================================================

_CP_ON EQU H'000F'
_CP_OFF EQU H'3FFF'
_PWRTE_ON EQU H'3FF7'
_PWRTE_OFF EQU H'3FFF'
_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'

LIST p=16f84

RADIX HEX
W EQU 0
F EQU 0
STATO EQU 0*03
PORTAA EQU 0*05
PORTAB EQU 0*06
INTCON EQU 0*0B

;Definizione degli indirizzi di inizio del programma principale e della routine di interrupt

ORG 0
Goto inizio
ORG 4
Goto inter
ORG 5

;Configurazione delle porte di ingresso ed uscita

inizio bsf STATO,5
movlw b'0000 0000'
movwf PORTAA
movlw b'1111 1111'
movwf PORTAB
clrf PORTAA
clrf PORTAB

;BIT di abilitazione dell'interrupt

movlw b'1001 1000'
movwf INTCON ;Ciclo infinito in attesa di interrupt
ciclo goto ciclo

;Programma principale
MAIN CODE
start
inter btfss INTCON,0
goto fermare
goto allarme

allarme clrf PORTAB
movlw b'1001 1000'
movwf INTCON

sirena bsf PORTAA,0
nOP
bcf PORTAA,0
bsf PORTAA,1
nop
bcf PORTAA,1
Goto sirena

Fermare clrf PORTAA
bcf PORTAB,0
movlw b'10001 1000'
movwf INTCON
Goto ciclo

end

ciauzzz ragazzi...alla faccia di chi sapete gi‡! Saluti da Tron72 ex zorks56 ma forse manterrÚ Zork vedremo.....ciauzzzz

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT