Member #398751

Member Since: January 15, 2013

Country: United States

  • Product BOB-08736 | about a year ago

    hello. I’m trying to run the MCP4725 with PIC18F4553 but I have not had much luck, the settings applied to the MCP4725 from the pic is: …………………………………………………………………. ;Configuración I2C: SSPCON1, SSPCON2, SSPSTAT, SSPSR, SSPADD. ;Configuración:

    clrf TRISB      ;Puerto B (SDA, SCL) como salida.
    clrf SSPSTAT
    movlw b'00101000'   ;Modo Master
    movwf SSPCON1
    clrf SSPCON2
    movlw 0xff
    movwf SSPADD
    

    ;Envio de bytes (3):
    bsf SSPCON2,0 ;Condición de start iniciada. movlw b'11000000' movwf SSPBUF ;Envío 1mer byte. ACK_1 nop btfsc SSPCON2,6 ;Verificación de ACK recibido. goto ACK_1
    bsf SSPCON2,6 ;Establescon en NACK. movlw b'00001111' movwf SSPBUF ;Envío 2do byte. ACK_2 nop btfsc SSPCON2,6 goto ACK_2 bsf SSPCON2,6 movlw b'00001111' movwf SSPBUF ;Envío 3cer byte. ACK_3 nop btfsc SSPCON2,6 goto ACK_3 bsf SSPCON2,6 bsf SSPCON2,2 ;Condición Stop iniciada. bcf SSPCON1,5 ;Desabilito puerto MSSP.

    I applied this configuration but MCP4725 doesn’t works. Please anybody can help in this trouble.

No public wish lists :(