Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 22625

i2c Scl clock is not generated in ADuC7060?

$
0
0

Hi there, I'm using ADuC7060 microconverter for our product development.  Software needs to communicate with tmp432 (slave device) and ADuC7060 (master) board through i2c protocol.   I developed the code and flashed it.  But it seems not working straightway.  Initially I thought of checking scl line to confirm that generate 100.3KHz clock signal (please note that 4.7 Kohm - 10Kohm resistance tried as pull up resistor which connects to 3.3V).  Still the scl clock was not generated.  Please see the firmware configuration settings given below.  Am I missing any other configuration settings or need to do any other hardware changes.  (I'm using ADuC7060 eval board Rev1 for this purpose).

 

POWKEY1 = 0x1;
POWCON0 = 0x78;     // Set core to max CPU speed of 10.24Mhz
POWKEY2 = 0xF4;

// Configure P0.1 and P0.3 for I2C mode. Configure P1.0 and P1.1 for UART mode.
GP0CON0 = BIT4 + BIT12; // Select SPI/I2C alternative function for P0.1 & P0.3
GP0KEY1 = 0x7;     // Write to GP0KEY1
GP0CON1 = BIT1;     // Select I2C functionality for P0.1 & P0.3
GP0KEY2 = 0x13;     // Write to GP0KEY2

GP1CON = BIT0 + BIT4;  // Select UART functionality for P1.0/P1.1

// Enable I2C Master mode, baud rate and interrupt sources
I2CMCON = BIT0 + BIT4  // Enable I2C Master + Enable Rx interrupt
   + BIT5 + BIT7 + BIT8; // Enable Tx interrupt + Enable transmission complete interrupt
I2CDIV  = 0x3131;    // Select 100.3kHz clock rate
IRQEN = BIT15 + BIT11; // Enable I2C Master and UART interrupts

 

Thank you,

Karthick


Viewing all articles
Browse latest Browse all 22625

Trending Articles