Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] mikroc code works in proteus but not working in real hardware

Status
Not open for further replies.

Tareq Domi

Junior Member level 2
Joined
Nov 16, 2014
Messages
22
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
167
hello ,

i am working on pic 18f4520 , i am trying to make a simple code as a start up for my full project .
i wrote i code just to switch the led on at PORTB.F7 ( pin 40 ) , it works in proteus but it is not working in real hardware .
also i tried to wrote a simple code in c language using geany editor , and it works in both proteus and hardware .

anyone can give a help to solve the problem .
 

nagkiller

Full Member level 4
Joined
Jul 9, 2009
Messages
231
Helped
37
Reputation
74
Reaction score
37
Trophy points
1,308
Location
Brazil
Activity points
2,607
First you need to put ±10K resitor to MCLR pin in microcontroller to VCC!!! Its is called PULLUP Resistor!!! Many do not put this resistor and it does not work well in the real hardware!!!

Send source code and and real hardware schematic, and schematic proteus!!!
 
Last edited:

milan.rajik

Banned
Joined
Apr 1, 2013
Messages
2,528
Helped
540
Reputation
1,078
Reaction score
524
Trophy points
1,393
Activity points
0
Zip and post your complete mikroC project files and Proteus file. Is there debounce delay for button in the code ?
 

Tareq Domi

Junior Member level 2
Joined
Nov 16, 2014
Messages
22
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
167
the program works once i connect the external oscillator .
do you know how to deal with the internal oscillator of the pic 18f4520 using mikroC .
thanks
 

nagkiller

Full Member level 4
Joined
Jul 9, 2009
Messages
231
Helped
37
Reputation
74
Reaction score
37
Trophy points
1,308
Location
Brazil
Activity points
2,607
Use Control Shift E to see options for oscillator!!!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top