Parque de estacionamento automatizado

Parque de estacionamento automatizado Parque de estacionamento automatizado

esalvieira.m.ccems.pt
from esalvieira.m.ccems.pt More from this publisher
20.01.2015 Views

Relatório da Prova de Aptidão Profissional – Bruno Barbosa Next Do forever Loop until PORTC.7 = 0 Wait 5 s For contador = 1 To 50 'Fecha a cancela de saída PulseOut PORTC.1, 235 10us Wait 20 ms Next LimpaLCDSaida Else SerSend 2, 254 SerSend 2, 192 SerPrint 2, " ***NEGADO*** " Wait 3 s LimpaSegundaSaida Wait 10 ms EscreveIntroduzirCodigo DataCount = 0 Goto Loop3 End If 'Limpa registos feitos For Contador = 1 To 8 PIN(Contador) = 0 Next Contador DataCount = 0 EsperaSaida = 0 SerSend 2, 254 SerSend 2, 192 SerPrint 2, " " LimpaSegundaEntrada End If 'Trata procedimentos da entrada If PORTA.5 = 1 and EsperaSaida = 0 Then If PORTC.7 = 1 Then EscreveAguardeSaida - 18 -

Relatório da Prova de Aptidão Profissional – Bruno Barbosa End If EscreveBemvindo Wait 1 s 'Escreve código de entrada SerSend 1, 254 SerSend 1, 192 SerPrint 1, "C" SerSend 1, 254 SerSend 1, 193 SerSend 1, 162 SerSend 1, 254 SerSend 1, 194 SerPrint 1, "digo: " SerPrint 1, "2345 " Wait 1 s For contador = 1 To 50 'Abre a cancela de entrada PulseOut PORTC.0, 150 10us Wait 20 ms Next LimpaSegundaEntrada Do forever Loop until PORTA.5 = 0 Wait 5 s For contador = 1 To 50 'Fecha a cancela de entrada PulseOut PORTC.0, 235 10us Wait 20 ms Next LimpaSegundaSaida End If 'Volta ao início da rotina principal do programa Goto Main '''Limpa o LCD da entrada - 19 -

Relatório da Prova <strong>de</strong> Aptidão Profissional – Bruno Barbosa<br />

End If<br />

EscreveBemvindo<br />

Wait 1 s<br />

'Escreve código <strong>de</strong> entrada<br />

SerSend 1, 254<br />

SerSend 1, 192<br />

SerPrint 1, "C"<br />

SerSend 1, 254<br />

SerSend 1, 193<br />

SerSend 1, 162<br />

SerSend 1, 254<br />

SerSend 1, 194<br />

SerPrint 1, "digo: "<br />

SerPrint 1, "2345 "<br />

Wait 1 s<br />

For contador = 1 To 50<br />

'Abre a cancela <strong>de</strong> entrada<br />

PulseOut PORTC.0, 150 10us<br />

Wait 20 ms<br />

Next<br />

LimpaSegundaEntrada<br />

Do forever<br />

Loop until PORTA.5 = 0<br />

Wait 5 s<br />

For contador = 1 To 50<br />

'Fecha a cancela <strong>de</strong> entrada<br />

PulseOut PORTC.0, 235 10us<br />

Wait 20 ms<br />

Next<br />

LimpaSegundaSaida<br />

End If<br />

'Volta ao início da rotina principal do programa<br />

Goto Main<br />

'''Limpa o LCD da entrada<br />

- 19 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!