AnsweredAssumed Answered

[Help] Problem of comunication between ADF4113 and PIC12F683!

Question asked by congnt2506 on Oct 22, 2015
Latest reply on Oct 23, 2015 by rbrennan

Hi all, I have problem to comunicate between ADF4113 and PIC12F683. I use SPI comunication to transfer data. Because PIC12F683 don't have SPI hardware, i programme SPI software to comunicate by PIC C Compiler of CCS, Inc. I design the circuit likes into datasheet of ADF4113. But ADF4113 don't work. Can someone help me? Please!

These are detail figures:

Power : 5V
Icpmax : 5 mA
REFin : 10MHz
Output Frequency : 900MHz
PFD : 200kHz
Muxout : Digital lock detect
Rset : 4,7kOhm
Prescaler : 32
PD Polarity : positive
Current settings (1&2 ) : 5mA

These are schematic and sourcode:

adf4113.png

 

 

 

sourcode

#include <main.h>

#USE SPI (FORCE_SW,MASTER, DO=PIN_A4,  CLK=PIN_A2, BITS=24,STREAM=SPI_SOFT)

void main()

{

   output_low(PIN_A5);// LE pin set low

      delay_ms(5);

      spi_xfer(SPI_SOFT, 0x9F8093, 24);// send to Initialization reg

      output_high(PIN_A5);//LE pin set high

      delay_ms(5);

      output_low(PIN_A5);

      delay_ms(5);

      spi_xfer(SPI_SOFT, 0x9F8092, 24);// send to Funtion reg

      output_high(PIN_A5);

      delay_ms(5);

      output_low(PIN_A5);

      delay_ms(5);

      spi_xfer(SPI_SOFT, 0x008C51, 24);// send to N counter (or A-B) reg

      output_high(PIN_A5);

      delay_ms(5);

      output_low(PIN_A5);

      delay_ms(5);

      spi_xfer(SPI_SOFT, 0x0000C8, 24);// send to Reference reg

      output_high(PIN_A5);

      delay_ms(5);

   while(TRUE)

   {

   }

 

 

}

Outcomes