por mastk » 14 Abr 2008 13:13
Tipo assim, o bus interno maximo é 10Mhz com o oscilador em 20Mhz, mas isso com um cristal externo ou mexendo um pouco no trim, coisa que ja tentei sem sucesso, agora com o oscilador interno, sem cristal externo ou oscilador externo, segura é os 8,3..Mhz
ICSTRM = *(unsigned char*far)0xFFAF; /* Initialize ICSTRM register from a non volatile memory */
ICSSC = *(unsigned char*far)0xFFAE; /* Initialize ICSSC register from a non volatile memory */
/* ICSC1: CLKS=0,RDIV=0,IREFS=1,IRCLKEN=0,IREFSTEN=0 */
ICSC1 = 0x04; /* Initialization of the ICS control register 1 */
/* ICSC2: BDIV=0,RANGE=1,HGO=1,LP=0,EREFS=1,ERCLKEN=1,EREFSTEN=0 */
ICSC2 = 0x36; /* Initialization of the ICS control register 2 */
while(!ICSSC_OSCINIT) { /* Wait until external reference is not stable */
}