Searching \ for '[PIC:] Interface between PIC and PCF8583' 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/microchip/devices.htm?key=pic
Search entire site for: 'Interface between PIC and PCF8583'.

Exact match. Not showing close matches.
PICList Thread
'[PIC:] Interface between PIC and PCF8583'
2004\04\22@152721 by egnascimento

flavicon
face
Hi all,
   Can anybody recommend me a example or source code of a PIC communicating
with a I2C real time clock. This is the first time that I work with it and
don't know what to do.

Thanks in advance,
Edu


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.665 / Virus Database: 428 - Release Date: 21/04/04

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\04\23@064924 by Marcos Bomfim

picon face
part 1 1162 bytes content-type:text/plain; charset=iso-8859-1; format=flowedDesculpe, esqueci de anexar o arquivo...


{Quote hidden}

_________________________________________________________________
MSN Messenger: converse com os seus amigos online.
http://messenger.msn.com.br

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.




part 2 4392 bytes content-type:application/octet-stream; name="I2c.inc" (decode)

2004\04\23@065751 by Marcos Bomfim

picon face
part 1 1186 bytes content-type:text/plain; charset=iso-8859-1; format=flowedAcabei encontrando um arquivo e selecionei algumas rotinas que lhe serco
zteis



{Quote hidden}

_________________________________________________________________
MSN Hotmail, o maior webmail do Brasil.  http://www.hotmail.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.




part 2 4753 bytes content-type:text/plain; name="PCF8583.txt"; format=flowed
(unknown type 8bit not decoded)

;-------RxBytePCF ---------------------------------------------
;Rotina para receber um byte do barramento
;--------------------------------------------------------------
RxBytePCF
       bsf     STATUS,RP0
       bsf     TRISB,2
       bcf     STATUS,RP0

       clrf    DadoMemo

       movlw   0x08
       movwf   ContaPulso

       bsf     SCL
       NOP
       NOP
       btfsc   PORTB,2
       bsf     DadoMemo,7
       rlf     DadoMemo
       bcf     SCL

       decfsz  ContaPulso
       goto    $-8
       rlf     DadoMemo

       bsf     STATUS,RP0
       movlw   0xFB
       andwf   TRISB,1
       bcf     STATUS,RP0

       bsf     SDA             ;Ack
       call    Dlay5u          ;

       bsf     SCL             ;
       call    Dlay5u          ;
       bcf     SCL             ;

       return

;-------EscritaPCF-----------------------------------------------
;Rotina para escrever um byte alocado no Registro DadoMemo
;na Posigao de Memsria do PCF.  O enderego da Posigao de Memsria
;deve estar no Registro PosiMemo
;----------------------------------------------------------------
EscritaPCF
       bsf     SDA
       bsf     SCL

       call    Dlay5u

       bcf     SDA             ;Bit de start
       call    Dlay5u          ;
       bcf     SCL             ;

       movlw   0xA0            ;Enderego do Relsgio
       call    TxBytePCF       ;

       movf    PosiMemo,0      ;Enderego do Registro a ser escrito
       call    TxBytePCF       ;

       movf    DadoMemo,0      ;Dado a ser escrito no Registro
       call    TxBytePCF       ;

       bcf     SDA
       bsf     SCL             ;Bit de stop
       call    Dlay5u          ;
       bsf     SDA             ;

       return

;-------LeituraPCF -----------------------------------------------
;Rotina para Leitura de um byte da Posigao de Memsria do PCF(Registrado em
PosiMemo)
;e alocagco desse valor no Registro DadoMemo
;-----------------------------------------------------------------
LeituraPCF
       bsf     SDA
       bsf     SCL

       call    Dlay5u

       bcf     SDA             ;Bit de start
       call    Dlay5u          ;
       bcf     SCL             ;

       movlw   0xA0            ;Enderego do PCF
       call    TxBytePCF       ;

       movf    PosiMemo,0      ;Enderego do Registro do PCF a ser lido
       call    TxBytePCF       ;

       bsf     SDA
       bsf     SCL

       call    Dlay5u

       bcf     SDA             ;Bit de start
       call    Dlay5u          ;
       bcf     SCL             ;

       movlw   0xA1            ;Indica leitura do PCF
       call    TxBytePCF       ;

       call    RxBytePCF       ;O Dado lido estara disponmvel no registro DadoMemo

       bcf     SDA             ;
       bsf     SCL             ;Bit de stop
       call    Dlay5u          ;
       bsf     SDA             ;

       return



;------------------------LerDataHora-----------------------
;Rotina que Lj e escreve a Data e Hora no LCD
;---------------------------------------------------------
LerDataHora
       swapf   DadoMemo,0      ;
       andlw   0x0F            ;
       addlw   0x30            ;
       bsf     Controle,5      ;
       call    EnviaInstru     ;

       movf    DadoMemo,0      ;
       andlw   0xF             ;
       addlw   0x30            ;
       bsf     Controle,5      ;
       call    EnviaInstru     ;

       return

;------------------------EscreveData-----------------------
;Rotina que Lj e escreve a Data no LCD
;---------------------------------------------------------
EscreveData
       movlw   0x80            ;Para a contagem do PCF
       movwf   DadoMemo        ;
       clrf    PosiMemo        ;
       call    EscritaPCF      ;

       movlw   0x05            ;Lj o Registro 05 do PCF
       movwf   PosiMemo        ;
       call    LeituraPCF      ;

       bcf     DadoMemo,7      ;
       bcf     DadoMemo,6      ;

       call    LerDataHora     ;

       bsf     Controle,5      ;
       call    EnviaControle   ;
       movlw   0x2F            ;Escreve o "/"
       call    EnviaInstru     ;

       movlw   0x06            ;
       movwf   PosiMemo        ;
       call    LeituraPCF      ;

       bcf     DadoMemo,7      ;
       bcf     DadoMemo,6      ;
       bcf     DadoMemo,5      ;

       call    LerDataHora     ;

       clrf    DadoMemo        ;Reinicia a contagem do PCF
       clrf    PosiMemo        ;
       call    EscritaPCF      ;


       return


--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.



2004\04\23@080020 by egnascimento

flavicon
face
Anybody knows?

----- Original Message -----
From: <@spam@egnascimentoKILLspamspamYAHOO.COM.BR>
To: <KILLspamPICLISTKILLspamspamMITVMA.MIT.EDU>
Sent: Thursday, April 22, 2004 4:27 PM
Subject: [PIC:] Interface between PIC and PCF8583


> Hi all,
>     Can anybody recommend me a example or source code of a PIC
communicating
{Quote hidden}

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.665 / Virus Database: 428 - Release Date: 21/04/04

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\04\23@100853 by egnascimento

flavicon
face
I'll try insert it in my source code and compile.
Thanks!



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.665 / Virus Database: 428 - Release Date: 21/04/04

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

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