Dear Bigmac,
Thank you for your interest,
As your request; please find below the initialization code :
{
/******************************************
PORT A initialization
---------------------
*******************************************/
PTAD = 0x00; // Data Reg. at '0'.
PTAPE = 0x00; // Pull-up disabled
PTADD = 0xFF; // IN-OUT direction
/******************************************
PORT B initialization
---------------------
*******************************************/
PTBD = 0x00; // Data Reg. at '0'.
PTBPE = 0x00; // Pull-up disabled
PTBDD = 0xFF; // IN-OUT direction
/******************************************
PORT C initialization
---------------------
*******************************************/
PTCD = 0x00; // Data Reg. at '0'.
PTCPE = 0x00; // Pull-up disabled
PTCDD = 0xFF; // IN-OUT direction
/******************************************
PORT D initialization
---------------------
*******************************************/
PTDD = 0x00; // Data Reg. at '0'.
PTDPE = 0x00; // Pull-up disabled
PTDDD = 0xFC; // IN-OUT direction
/******************************************
PORT E initialization
---------------------
*******************************************/
PTED = 0x00; // Data Reg. at '0'.
PTEPE = 0x00; // Pull-up disabled
PTEDD = 0xFF; // IN-OUT direction
/******************************************
CLOCK initialization
---------------------
*******************************************/
ICGC2 = 0x00;
ICGC1 = 0x70;
// ICGC1 = 0xF0;
while( ICGS1_ERCS == 0 );
}
I tried both Low and High gain, but I get same results.
What's strange : I get 3.3V in both configuration on both XTAL and EXTAL. Normaly I should get a lower voltage with HGO = 0. I checked for short circuit, but it's quite clean on the circuit and this is not the case.
Thank you,
Julien P.