<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-2">
<META content="MSHTML 6.00.2900.3132" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Jak je definovana promenna PRIJMUTO?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Michal</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=splichal@pulp.cz href="mailto:splichal@pulp.cz">Jiri Splichal</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=hw-list@list.hw.cz
href="mailto:hw-list@list.hw.cz">HW-news</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, August 30, 2007 10:50
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> PIC -registr misto PORTB ?</DIV>
<DIV><FONT face=Arial size=2></FONT><BR></DIV>Ahoj<BR>mam takovy (
zacatecnicky) dotaz:<BR>zkousim zapojeni s PIC16F628 ,ktere zobrazuje na PORTB
stav pomoci LED <BR>,ale ted v BCD kodu.<BR>Chci ale zobrazovat vysledek jen
jednou LED a proto sem naspal toto :<BR> .<BR>
.<BR> .<BR> .<BR>
MOVF SLA_IND,W<BR> ADDWF
MAS_IND,W<BR> ADDWF
MAS_IND,W<BR> ADDWF
MAS_IND,W<BR> MOVWF
TEMP<BR> MOVLW 4*AVER_BASE +
D'3'<BR> SUBWF
TEMP,W<BR><BR> MOVWF PRIJMUTO ;bylo
PORTB ;tady by se zobrazil vysledek v BCD <BR>kodu na
PORTB<BR><BR> GOTO
MOV_BUFFERS<BR><BR>NO_TONE <BR> MOVLW
dtmf1
;nacte porovnavany kod<BR> MOVWF
STSW
;presune ho do <BR>pomocneho registru<BR>
MOVFW PRIJMUTO ;bylo PORTB ;nacte zobrazeny
udaj <BR>
SUBWF
STSW,W
;a oba je porovna<BR> BZ
UKOL1
;pokud souhlasi <BR>-provede ukol jinak jde na dalsi
mozne....<BR>;-------------------<BR> MOVLW
dtmf2<BR> MOVWF
STSW <BR>
MOVFW PRIJMUTO ;bylo
PORTB <BR>
SUBWF STSW,W
<BR> BZ
UKOL2<BR>;--------------------<BR> MOVLW
dtmf3<BR> MOVWF
STSW <BR>
MOVLW PRIJMUTO ;bylo
PORTB <BR>
SUBWF STSW,W
<BR> BZ
UKOL3<BR> GOTO
MOV_BUFFERS<BR>;-----------------------------------------------<BR>UKOL1<BR>
NOP<BR> CLRF PORTB<BR> BSF
PORTB,4<BR> NOP<BR> GOTO
MOV_BUFFERS<BR>.<BR>.<BR>.<BR>.<BR>(je to samozrejme jen cast) Nacte
pozadovany kod BCD a porovna ho se <BR>stavem na PORTB.<BR>A ted - pokud se
pracuje skutecne s PORTB ,tak vse funguje jak ma ,ale <BR>pokud nahradim PORTB
(radne definovanym) registrem PRIJMUTO ,tak uz to <BR>nedekoduje :-O Uz
na to koukam par dni a vubec to nechapu?<BR>Jak to patri spravne ,aby se
nemusely pokazde rozsvecovat i ty LED s BCD <BR>kodem?<BR>Dedkuji za kazdou
radu!<BR><BR>Jirka<BR>_______________________________________________<BR>HW-list
mailing list - sponsored by <A
href="http://www.HW.cz">www.HW.cz</A><BR><A
href="mailto:Hw-list@list.hw.cz">Hw-list@list.hw.cz</A><BR><A
href="http://list.hw.cz/mailman/listinfo/hw-list">http://list.hw.cz/mailman/listinfo/hw-list</A><BR></BLOCKQUOTE></BODY></HTML>