Continue to Site

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.

How to know if PIC works correctly or NOT ?!

Status
Not open for further replies.

bas_90

Member level 1
Joined
Mar 21, 2013
Messages
35
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,503
i have PIC16F877A for my system

the CODE works fine in Proteus but when connected the circuit in BreadBoard .. it's don't work, leds don't work also and LCD is Illuminate only (don't show any words)

i don't know what's the problem ?! what can i do to solve this problem ?!!
 

How ?!

Note: i tested this PIC before with simple code show hello on LCD and it's working correctly with LCD ... but in the Circuit of System don't work.
 

i have PIC16F877A for my system

the CODE works fine in Proteus but when connected the circuit in BreadBoard .. it's don't work, leds don't work also and LCD is Illuminate only (don't show any words)

i don't know what's the problem ?! what can i do to solve this problem ?!!

Its standard situation in lots of situations with simulator programs. Better use development board and save time.

Post code and simulator files.
 

Always a step by step approach will help U to solve these type of issues...
Don't connect every thing at a time and test, instead connect a single led, try to blink it and make it sure the controller is working in ur current system.
Then confirm all the port bits connected to LCD are working, use some thing like while(1) {PORTX ^= 255; delay(1000);} and test all the PINs to be used for the LCD is working, just connect an LED and see if it is toggling. So if this things are working, then move to the LCD and now if the LCD is not working it means the initialization code is not proper or some connection issues with the LCD...
 

Its standard situation in lots of situations with simulator programs. Better use development board and save time.

Post code and simulator files.

i want to learn how it work, how detect the error and fix it not completion the work only :)) , thnx
 

i have PIC16F877A for my system

the CODE works fine in Proteus but when connected the circuit in BreadBoard .. it's don't work, leds don't work also and LCD is Illuminate only (don't show any words)

i don't know what's the problem ?! what can i do to solve this problem ?!!

If code works in Proteus and dont work in breadboard, I dont see what you can fix in Proteus to make this to work on breadboard or to learn something from this.

If problem exist in breadboard, check breadboard configurations, links, uC pins,...


i want to learn how it work, how detect the error and fix it not completion the work only :)) , thnx

Best place to learn is breadboard. Purposes of breadboards and development boards are to make design and to learn also.
 

Always a step by step approach will help U to solve these type of issues...
Don't connect every thing at a time and test, instead connect a single led, try to blink it and make it sure the controller is working in ur current system.
Then confirm all the port bits connected to LCD are working, use some thing like while(1) {PORTX ^= 255; delay(1000);} and test all the PINs to be used for the LCD is working, just connect an LED and see if it is toggling. So if this things are working, then move to the LCD and now if the LCD is not working it means the initialization code is not proper or some connection issues with the LCD...

Okay it's beautiful but i have a stupid question :D , before test every thing .. Do I write new code for led then new code for LCD ?! Or use the Main code for System ?

thnx alot :))

- - - Updated - - -

If code works in Proteus and dont work in breadboard, I dont see what you can fix in Proteus to make this to work on breadboard or to learn something from this.

If problem exist in breadboard, check breadboard configurations, links, uC pins,...




Best place to learn is breadboard. Purposes of breadboards and development boards are to make design and to learn also.

(*_^) thnx alot :)
 

Posting both the schematic and code of your design would greatly facilitate the troubleshooting of issue.

Also, specifying the make and version of your compiler would help.

What is the model of programmer you are using to program the breadboarded PIC16F877A circuit?

What is the clock source for the PIC, crystal, can oscillator, resonator, etc?

These and other specifics are usually required before advising you as to the issue at hand.

BigDog
 

The normal reasons for a PIC circuit to work in Proteus but not in the hardware are, configuration word not set correctly, ensure that the watch dog is turned off and the right oscillator type is selected. Ensure that your programmer is programming the correct file and the configuration bits are correct. Ensure the MCLR input is pulled high, ensure the oscillator is actually running. Proteus is very good at emulating a PIC and if it runs on Proteus you at least know the program is good.
 

Posting both the schematic and code of your design would greatly facilitate the troubleshooting of issue.

Also, specifying the make and version of your compiler would help.

What is the model of programmer you are using to program the breadboarded PIC16F877A circuit?

What is the clock source for the PIC, crystal, can oscillator, resonator, etc?

These and other specifics are usually required before advising you as to the issue at hand.

BigDog

Done, Check Inbox for files ... the Programmer is " DIY K150 PICmicro Programmer v150807 "

Clock Source : Crystal 4 MHz
 

Refer Data sheet for Config Register for Crystal setting then in main assign any pin say RD0 then for this refer following code to Check IC working.

void main(void)
{
Here Crystal setting code.......
TRISD = 0x00; // all Port D as output
PORTD = 00; // Initally all pin low

while(1)
{
RD0 = !RD0;
RD1 = !RD1;
delay(1000);
}
}
 

i have a question ...

Can i test everything in circuit without put other components ?! (the PIC contains the code of all components)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top