Searching \ for 'May look-up tables don't works' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/mems.htm?key=table
Search entire site for: 'May look-up tables don't works'.

Truncated match.
PICList Thread
'May look-up tables don't works'
1999\05\01@173154 by Anbar

flavicon
face
part 0 15018 bytes
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META content='"MSHTML 4.72.2106.6"' name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT color=#000000><FONT size=3></FONT></FONT><FONT color=#000000><FONT
size=3>Hi all !&nbsp; <BR>I am trying to do a phone dialing with the pic, and I
don't get that works.&nbsp; <BR>It just executes the first number of my look-up
tables( num. 2). as it proceeds&nbsp;&nbsp; <BR>telefone1:&nbsp; addwf
PCL,f&nbsp;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
dt 2,3,8,1,8,4,1,0ff&nbsp;&nbsp; ; number it to be dialing.&nbsp; <BR>I have
expense a long time with this, and it doesn't work.&nbsp; </FONT></FONT></DIV>
<DIV><FONT color=#000000><FONT size=3>How the remaining of the numbers is not
placed to proceed in the look-up tables?&nbsp; <BR>Can anybody help
me?&nbsp;&nbsp; <BR>I will be very thankful.&nbsp; <BR></FONT></FONT></DIV>
<DIV>look may codes</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000000><FONT size=3>;My first project with pic&nbsp;
<BR>;Phone Dialing for alarm system.</FONT></FONT><FONT size=3></FONT></DIV>
<DIV><FONT color=#000000><FONT size=3></FONT></FONT><FONT
size=3></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000><FONT size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
LIST P=16F84,c=90,n=0,f=inhx8m</FONT></FONT><FONT size=3></FONT></DIV>
<DIV><FONT color=#000000><FONT size=3></FONT></FONT><FONT
size=3></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000><FONT size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
INCLUDE &quot;C:\MPS16B\P16F84.INC&quot;</FONT></FONT><FONT size=3></FONT></DIV>
<DIV><FONT color=#000000><FONT size=3></FONT></FONT><FONT
size=3></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000><FONT size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
__CONFIG _CP_OFF &amp; _XT_OSC &amp; _PWRTE_ON&nbsp; &amp;
_WDT_OFF</FONT></FONT><FONT size=3></FONT></DIV>
<DIV><FONT color=#000000><FONT size=3></FONT></FONT><FONT
size=3></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000><FONT
size=3>PORT_A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EQU&nbsp;&nbsp;&nbsp;
05h<BR>PORT_B&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EQU&nbsp;&nbsp;&nbsp;
06h<BR>trisa&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
EQU&nbsp;&nbsp;&nbsp;
85h<BR>trisb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
EQU&nbsp;&nbsp;&nbsp; 86h<BR>discagem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
EQU&nbsp;&nbsp;&nbsp; 13h</FONT></FONT><FONT size=3></FONT></DIV>
<DIV><FONT color=#000000><FONT size=3></FONT></FONT><FONT
size=3></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000><FONT size=3>;---------------------Pgm bits I/O
----------------------------------</FONT></FONT><FONT size=3></FONT></DIV>
<DIV><FONT color=#000000><FONT size=3></FONT></FONT><FONT
size=3></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000><FONT size=3>#define rele1 PORT_B,0<BR>#define rele2
PORT_B,1<BR>#define led
PORT_B,3<BR>;--------------------------------------------------------------------<BR>start:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
movlw
B'00000000'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
movwf
INTCON<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
clrf
PORT_B<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
clrf
PORT_A<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
bsf
STATUS,rp0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
movlw&nbsp;&nbsp;
0x00<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
movwf
trisb<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
movlw&nbsp;&nbsp;
0xFF<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
movwf
trisa<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
bcf
STATUS,rp0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
goto wait_flash</FONT></FONT><FONT size=3></FONT></DIV>
<DIV><FONT color=#000000><FONT size=3></FONT></FONT><FONT
size=3></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000><FONT size=3>telefone1:&nbsp; addwf
PCL,f</FONT></FONT><FONT size=3></FONT></DIV>
<DIV><FONT color=#000000><FONT size=3></FONT></FONT><FONT
size=3></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000><FONT
size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
dt
2,3,8,1,8,4,1,0ffh&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
;the number will be dialing</FONT></FONT></DIV>
<DIV><FONT color=#000000><FONT size=3></FONT></FONT><FONT
size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
; just realize the first number of the table (number 2)</FONT></DIV>
<DIV><FONT color=#000000><FONT
size=3>;----------------------------------------------------------<BR>&nbsp;<BR>wait_flash:&nbsp;
btfsc PORT_A,0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;wait to
gate<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
goto wait_flash&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
bsf
led&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
;led
on<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
bsf
rele1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
;get the
phoneline<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
call
DLY_3SEG<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<BR>;--------- started to dialer
-------------------------------</FONT></FONT><FONT size=3></FONT></DIV>
<DIV><FONT color=#000000><FONT size=3></FONT></FONT><FONT
size=3></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000><FONT
size=3>main:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call
telefone1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
;call the table&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
movwf discagem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></FONT><FONT
size=3></FONT></DIV>
<DIV><FONT color=#000000><FONT size=3></FONT></FONT><FONT
size=3></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000><FONT
size=3>inic1:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb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nbsp;
call
MS_33<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
goto DISC_1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<BR>end_num:&nbsp;&nbsp; bcf
rele2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
;phoneline
off<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
call
MS_66<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
goto main&nbsp;&nbsp; </FONT></FONT><FONT size=3></FONT></DIV>
<DIV><FONT color=#000000><FONT size=3></FONT></FONT><FONT
size=3></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV></BODY></HTML>

</x-html>

1999\05\01@201315 by Peter van Hoof

flavicon
face
I hope i'm doing this right , being new to pic micro's myself
I think you forgot to keep a loop counter for the digits to index the table
i did not look for other errors so you are on your own till you ask again

I marked all corrections with **************************************
dont forget to set up an equ for counter

hope this helps

Peter


      LIST P=16F84,c=90,n=0,f=inhx8m

       #INCLUDE "P16F84.INC"

       __CONFIG _CP_OFF & _XT_OSC & _PWRTE_ON  & _WDT_OFF

PORT_A        EQU    05h
PORT_B        EQU    06h
trisa                EQU    85h
trisb                EQU    86h
discagem      EQU    13h

;---------------------Pgm bits I/O ----------------------------------

#define rele1 PORT_B,0
#define rele2 PORT_B,1
#define led PORT_B,3
;--------------------------------------------------------------------
start:            movlw B'00000000'
                   movwf INTCON
                   clrf PORT_B
                   clrf PORT_A
                   bsf STATUS,rp0
                   movlw   0x00
                   movwf trisb
                   movlw   0xFF
                   movwf trisa
                   bcf STATUS,rp0
                   goto wait_flash

telefone1:
 addwf PCL,f  ;***********have to use loop counter***********

                  dt 2,3,8,1,8,4,1,0ffh            ;the number will be
dialing
                                                               ; just
realize the first number of the table (number 2)
;----------------------------------------------------------

wait_flash:  btfsc PORT_A,0       ;wait to gate
                   goto wait_flash
                  movlw 0x00 ;************initialise counter***********
                  movwf counter ;************the digit
counter**************

                  bsf led                      ;led on
                  bsf rele1                   ;get the phoneline
                  call DLY_3SEG


;--------- started to dialer -------------------------------

main:  movfw counter  ;***********load counter into w ************
 call telefone1              ;call the table
                  movwf discagem
                  inc

inic1:           bsf rele2
DISC_1:     bcf rele1
                   bcf led
                   decfsz discagem,1
                   goto go_dialing
                   goto end_num
go_dialing: call MS_33
                   bsf rele1
                   bsf led
                   call MS_33
                   goto DISC_1

end_num:   bcf rele2                    ;phoneline off
                   call MS_66

                   goto main


   {Original Message removed}

1999\05\01@202558 by Peter van Hoof

flavicon
face
did this wrong i just found
let me try again

my line

main:  movfw counter  ;***********load counter into w ************

is garbage , no such instruction exists
i think it should be

main:  movf counter,0  ;***********load counter into w ************

1999\05\01@203834 by Peter van Hoof

flavicon
face
found another error i made the inc
should be
incf counter,1 ;*************increment digit counter*********************


result of my attempt to solve this:

      LIST P=16F84,c=90,n=0,f=inhx8m

       #INCLUDE "P16F84.INC"

       __CONFIG _CP_OFF & _XT_OSC & _PWRTE_ON  & _WDT_OFF

PORT_A        EQU    05h
PORT_B        EQU    06h
trisa                EQU    85h
trisb                EQU    86h
discagem      EQU    13h

;---------------------Pgm bits I/O ----------------------------------

#define rele1 PORT_B,0
#define rele2 PORT_B,1
#define led PORT_B,3
;--------------------------------------------------------------------
start:            movlw B'00000000'
                   movwf INTCON
                   clrf PORT_B
                   clrf PORT_A
                   bsf STATUS,rp0
                   movlw   0x00
                   movwf trisb
                   movlw   0xFF
                   movwf trisa
                   bcf STATUS,rp0
                   goto wait_flash

telefone1:
 addwf PCL,f  ;***********have to use loop counter***********

                  dt 2,3,8,1,8,4,1,0ffh            ;the number will be
dialing
                                                               ; just
realize the first number of the table (number 2)
;----------------------------------------------------------

wait_flash:  btfsc PORT_A,0       ;wait to gate
                   goto wait_flash
                  movlw 0x00 ;************initialise counter***********
                  movwf counter ;************the digitcounter**************

                  bsf led                      ;led on
                  bsf rele1                   ;get the phoneline
                  call DLY_3SEG


;--------- started to dialer -------------------------------

main:  movf counter,0  ;***********load counter into w ************
 call telefone1              ;call the table
                  movwf discagem
incf counter,1 ;*************increment digit counter*********************


inic1:           bsf rele2
DISC_1:     bcf rele1
                   bcf led
                   decfsz discagem,1
                   goto go_dialing
                   goto end_num
go_dialing: call MS_33
                   bsf rele1
                   bsf led
                   call MS_33
                   goto DISC_1

end_num:   bcf rele2                    ;phoneline off
                   call MS_66

                   goto main


   {Original Message removed}

1999\05\02@121512 by Anbar

flavicon
face
Thanks a lots Peter for your  attention, I will tray it.
Anbar
-----Mensagem original-----
De: Peter van Hoof <spam_OUTpvhTakeThisOuTspamVERTONET.COM>
Para: .....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU <PICLISTspamKILLspamMITVMA.MIT.EDU>
Data: Sabado, 1 de Maio de 1999 17:36
Assunto: Re: May look-up tables don't works


{Quote hidden}

digitcounter**************
{Quote hidden}

>    {Original Message removed}

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...