Moving PIC MCU to the breadboard

Discussion on projects that are created by users and posted on mikroElektronika website.
Post Reply
Author
Message
oleg7648
Posts: 11
Joined: 08 Aug 2014 12:10

Moving PIC MCU to the breadboard

#1 Post by oleg7648 » 17 Oct 2014 05:27

Hello, everybody! Sorry for my bad english.
I have a problem with moving my P18f2550 to the breadboard. I've wrote a simple program for led blinking in mikroC.

Code: Select all

void main()
{
TRISB = 0x00;
PORTB = 0x00;
while (1)
{
LATB = 0x01;
Delay_ms(200);
LATB = 0x00;
Delay_ms(200);
}
}
The board - EasyPic Connectivity v. 7, the compiler - MikroC for PIC, Crystal - 8MHz, oscillator settings - HS (default settings for P18F2550). Everything works fine when MCU is inserted in EasyPic.
The problem begins when I try to move MCU to the breadboard - the scheme doesn't works - the led just glows, not blinking (the scheme is in attachment). Of course, I connected +5V wire to VDD and 0V wire to both GNDs of MCU.
I don't understand, how to connect the crystal (or anything else) to MCU for correct working. I tried to move only the crystal to the breadboard (I added 22 pF capacitors and connected the crystal to A6 and A7 MCU pins directly) - everything works. Moved MCU to the breadboard too - doesn't works! :(
Please help me.
Attachments
sc.jpg
sc.jpg (26.72 KiB) Viewed 2735 times

Megahurts
Posts: 900
Joined: 01 Oct 2009 22:48
Location: Rocky Mountains, USA.

Re: Moving PIC MCU to the breadboard

#2 Post by Megahurts » 18 Oct 2014 03:13

Hi oleg7648,

You can try setting your PIC (in compiler program) configurations to run on internal oscillator (if equipped).

If the PIC was using your development boards supplied crystal oscillator when you programmed it, and there is
not an oscillator crystal on the breadboard, the PIC is not executing your program code. Hence the always-on LED.

Check the PICs Datasheet to see if it has internal oscillator function, most do.

Hope this helped, Robert.
HW: easyPIC5|PICFlash2|easyBT|smartGSM|easyGSM|PICPLC16|mmWorkStation|FT800 Eve|PIC Clicker/2|
MMBs:PIC18F,PIC33EP,PIC32|CLICKs:DAC,ADC,GPS L10,Thermo,8x8B LED,Stepper,W/B OLED,9DOF,GPS3,tRF,Hall I|

SW: mP for PIC|mB for PIC-dsPIC-PIC32|Visual-TFT|

oleg7648
Posts: 11
Joined: 08 Aug 2014 12:10

Re: Moving PIC MCU to the breadboard

#3 Post by oleg7648 » 18 Oct 2014 05:49

Hi Robert.
It works with internal oscilator, but I need a crystal. I moved the MCU with crystal connected to ra6 and ra7 pins directly. I don't understand, why the mcu with crystal works correctly on easypic and absolutely doesn't works on the breadboard.

oleg7648
Posts: 11
Joined: 08 Aug 2014 12:10

Re: Moving PIC MCU to the breadboard

#4 Post by oleg7648 » 18 Oct 2014 12:30

Hi, Robert!
Thanks you for your advices, I've solved the problem :D
I had disabled the MCLR pin and HOORAY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :D :D :D Everything works!!!

Megahurts
Posts: 900
Joined: 01 Oct 2009 22:48
Location: Rocky Mountains, USA.

Re: Moving PIC MCU to the breadboard

#5 Post by Megahurts » 20 Oct 2014 11:21

:D Cool 8)

Glad to hear it, and I think that one could be called a nice trip (stumble) recovery.

Considering how many things could have caused the same problem, it usually is a great relief when it ends up being something simple.

I do caution that you could see some erratic operations still with external crystal usage on a breadboard.
Prone to vibrations causing contact loss in any connections/wiring and breadboards have small
capacitive characteristics inherent that are different (more) from typical PCB conditions (less) and can affect high frequency signals.

Are you planning to use it in your own designed PCB? after prototyping circuit on the breadboard?
(etch your own PCB's?)

Glad again you got it working, again, Robert.
HW: easyPIC5|PICFlash2|easyBT|smartGSM|easyGSM|PICPLC16|mmWorkStation|FT800 Eve|PIC Clicker/2|
MMBs:PIC18F,PIC33EP,PIC32|CLICKs:DAC,ADC,GPS L10,Thermo,8x8B LED,Stepper,W/B OLED,9DOF,GPS3,tRF,Hall I|

SW: mP for PIC|mB for PIC-dsPIC-PIC32|Visual-TFT|

Post Reply

Return to “User Projects”