Controller has the minimum recommended hardware configuration with 0.1uF on VDD and 4.7uF on VCAP, 100K to VPP from VDD
Current consumption is strange too big as 60mA
Code: Select all
main:
' Main program
' SET OSCILLATOR
PLLPRE_0_bit = 0 ' set 80 Mhz with PLL
PLLPRE_1_bit = 0
PLLPRE_2_bit = 0
PLLPRE_3_bit = 0
PLLPRE_4_bit = 0
PLLFBD = 30 ' M =32
PLLPOST_1_bit = 0 ' output / 2
PLLPOST_0_bit = 0
AD1PCFGL = %0000000000111111
ADON_bit = 0
CMCON = 0
CVREN_bit = 0
RTCEN_bit = 0
TRISB = 0x0000
ODCB = 0xFFFF
NOP
LATB = 0xFFFF
TRISA = 0
ODCA = 0xFFFF
NOP
LATA.0 = 1
LATA.1 = 1
LATA.4 = 1
while TRUE
LATB = 0xFFFF
delay_ms(1000)
LATB = 0xFFFF
delay_ms(1000)
wend
end.