This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Programming PGA308

Other Parts Discussed in Thread: PGA308

Hi,

I'm trying to program a pga308 by 1W uart with a PIC32 without success. I checked with the oscilloscope that the digital signal input is correct and it is. I don't understand why it don't work.

This is the code that I use:

// Set Fine offset 0
U1TXREG = 0x55;
U1TXREG = 0x00;
U1TXREG = 0x00;
U1TXREG = 0x00;
while(!U1STAbits.TRMT);
Delay28ms();
// Set GDAC 1
U1TXREG = 0x55;
U1TXREG = 0x01;
U1TXREG = 0xFF;
U1TXREG = 0xFF;
while(!U1STAbits.TRMT);
Delay28ms();
// Set OG 2, PGA 100, COA 0
U1TXREG = 0x55;
U1TXREG = 0x02;
U1TXREG = 0x00;
U1TXREG = 0x14;
while(!U1STAbits.TRMT);
Delay28ms();
// Set CFG1
U1TXREG = 0x55;
U1TXREG = 0x03;
U1TXREG = 0x80;
U1TXREG = 0x01;
while(!U1STAbits.TRMT);
Delay28ms();
// Set CFG2
U1TXREG = 0x55;
U1TXREG = 0x04;
U1TXREG = 0x00;
U1TXREG = 0x40;
while(!U1STAbits.TRMT);
Delay28ms();
// Set CHKS
/*
ZDAC+GDAC=FFFF
FFFF+1=0001
0001+CGO=1401
1401+CG1=1581
1581+1=1582
1582+CG2=5582
5582+1=5583
!5583=AA7C
*/
U1TXREG = 0x55;
U1TXREG = 0x05;
U1TXREG = 0x7C;
U1TXREG = 0xAA;
while(!U1STAbits.TRMT);
Delay28ms();
//
U1TXREG = 0x55;
U1TXREG = 0x86;
TRISBbits.TRISB4 = 0b1;
PORTBbits.RB6 = 0b0; // LED OFF
return(1);

Please help me!