P33FJ128MC802 simple blink

General discussion on mikroBasic PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
Novakiss
Posts: 21
Joined: 24 Sep 2017 23:02

P33FJ128MC802 simple blink

#1 Post by Novakiss » 19 Sep 2019 12:03

I try P33FJ128MC802 with demo version of the IDE and it seems like I missing something. The result I have in hardware is that only RB0 change the logic status every 1000ms, but not all PORTB. All other pins are just read as 0V.
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.

User avatar
jovana.medakovic
mikroElektronika team
Posts: 986
Joined: 18 Dec 2018 10:36

Re: P33FJ128MC802 simple blink

#2 Post by jovana.medakovic » 20 Sep 2019 13:19

Hello,

In the attachment, you can find LED Blinking example for your MCU.
Unfortunately, I don't have your MCU, but I have P33FJ128MC802 MCU and both MCUs are from the same datasheet. I tested this example using crystal oscillator of 8MHz and it works fine.

Kind regards,
Jovana
Attachments
Led Blinking.zip
(33.03 KiB) Downloaded 88 times

Novakiss
Posts: 21
Joined: 24 Sep 2017 23:02

Re: P33FJ128MC802 simple blink

#3 Post by Novakiss » 24 Sep 2019 12:47

Thank you!

User avatar
jovana.medakovic
mikroElektronika team
Posts: 986
Joined: 18 Dec 2018 10:36

Re: P33FJ128MC802 simple blink

#4 Post by jovana.medakovic » 24 Sep 2019 13:05

Hi,

You're welcome.

Kind regards,
Jovana

Post Reply

Return to “mikroBasic PRO for dsPIC30/33 and PIC24 General”