Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
pkcontrol

pkcontrol

Ratings: (0)|Views: 12|Likes:
Published by Tiago Caetano
PICF16 , control parking work in the school with microcontroler
PICF16 , control parking work in the school with microcontroler

More info:

Published by: Tiago Caetano on Jun 14, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less

06/14/2010

pdf

text

original

 
#INCLUDE <P16F627.INC>;# especificação do controlador a usarORG 0x40; Definir o endereço para que o microcontroladordeve ir quando se liga a alimentaçãoCOUNTEQU 0x20; Variável para utilizar no ciclo delayORG0X00CLRFPORTA; inicializa PORTAMOVLW0x07MOVWFCMCON; Comparadores offCAREQU 0x22; CAR = 0x22STARTBCFSTATUS, RP1BSFSTATUS, RP0; Selecciona Banco 1 (para acesso ao registo TRIS)MOVLW0x00MOVWFTRISB; Configura todos os pinos de PORTB como saídas;-------------------DEFINE ENTRADASBSFTRISA, 1; DEFINE O BOTAO ON/OFF (RA1)BSFTRISA, 2; DEFINE SENSOR ENTRADA (RA2)BSFTRISA, 3; DEFINE SENSOR DE SAIDA (RA3);------------ DEFINE SAIDASBCFTRISA, 6; DEFINE LUZ DE OCUPADO (RA6)BCFTRISA, 7; DEFINE A LUZ LIVRE (RA7)BCFSTATUS, RP0BCFSTATUS, RP1; Selecciona o banco 0 (para acesso PORTB)MOVFCAR, 0x00;-------{ LUZ VERDE INTERMITENTECICLO:BSFPORTA, 7; LIGABCFPORTA, 7; DESLIGABTFSSPORTA, 1; SE O BOTAO ESTIVER ON[]GOTOCICLOBTFSCPORTA, 2; (RA2 Entrada) Salta se não ligadoINCFCAR, 1BTFSCPORTA, 3; (RA3 SaÃda) Salta se não ligadoDECFCAR, 1;-------{ PROCEDIMENTO CONVERTE; MOVFCAR, NUMCALL CONVERTEMOVWFPORTB; Envia o valor para o PORTBCALLLL; Reset PCLGOTOCICLO;RETLW B'00111111' ; Código para o '0'';RETLW B'00000110' ; Código para o '1';RETLW B'01011011' ; Código para o '2'

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->