Sunday, June 13, 2010
Quotes For Loss Of Mother In Law
[PIC 16c57]
Project per
PIC16c57
Il parcheggio può contenere al massimo 200 macchine e i segnali d'ingresso non possono mai essere contemporaneamente attivi.
; 1 uscita da 8 bit ; l'incremento e il decremento devono essere mutuamente escludenti per un ciclo di ck
RADIX DEC
UP DOWN EQU EQU 0 1 2 CK
SHOW EQU EQU 0 ; on port C
ORG 0x7FF
GOTO
STA RT
STA RT
ORG 0x00 STA RT
CLRW TRIS PORTB; output
b'0111 MOVLW 'TRIS PORTA
; 3 inputs clrf Q MOVLW 1 TRIS
PORTC ; RC \u0026lt;0> = CK IN FOR
MOVF PORTC, W movwf CKP ; save CK Departure (bit 3)
mainloop btfsc PORTA, GOTO SHOW STA
MPA
; SHOW SHOW IF Q = 1
btfsc PORTA, UP
GOTO INC
; RAISE UP IF Q = 1 btfsc PORTA, DOWN DEC
GOTO GOTO WAIT WAIT
MOVF PORTC, W
; put the current cycle accumulator
SUBWF CKP, 0
; compares the two values clock
btfsc STA TUS, Z GOTO WAIT
, if equal MOVF PORTC wait , CKP
GOTO MainLoop
; se diversi torna a controllare
STA
MPA MOVF Q,PORTB ; mostra q al pubblico
GOTO WAIT
INC MOVF MAX,W SUBWF Q,0 BTFSC STA
TUS,Z
GOTO WAIT ; parcheggio pieno INC
F Q,1
GOTO WAIT DEC
BTFSS Q,0
GOTO WAIT
; parcheggio già vuoto
DEC F Q,1 GOTO WAIT END
Mplab
Altri assemblatori PIC
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment