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.

pic16f877a code and Proteus anyone can help

Status
Not open for further replies.
hi thank u all for helping me
i do every thing u told me to do but nothing is change there no error in the code but no output i see in the Proteus i don't know what to do i there any error in my schematic in Proteus
 

No need for resistor & Vcc at MCLR pin & also remove the 10K resistor attached to the LED & try by connecting resistance of 220ohms. You have used the correct oscillator value or have you gone wrong over there?
Regards,
Jerin.
 

O, right. Change the resistors from 10k to 220ohms as suggested. And C1 and C2. Those won't affect you in simulation, but in real life, it will. Change them from 40n to 20p or thereabouts.

Hope this helps.
Tahmid.
 

Yep. Those resistors, Capacitors,power suppl & crystal ocsr are needed while simulating in bread board or PCB. While in proteus you won't be requiring those components.
Regards,
Jerin. ;-)
 

great am doing what you told me and it's work but after i open the switch the led still ON like the schematics there
 

Attachments

  • working.pdf
    173.4 KB · Views: 83

It is so because when the switch is made off logic 0 is expected to be @ the PORT pin, But there seems to be no logic 0 @ your PORT B pins 0 & 1 when the switch is made OFF. Did you notice it? Try to make the supply to the switch via an external pull up resistor & then to the ground so that when switch is made OFF logic 0 will be @ the port pin.
Regards,
Jerin.
 

Hi,
For that add pull down resistors from RB0 and RB2 to ground. For that reason, you can't use internal resistors.
When switch is open, the pin is in a high impedance (hi-Z) state, which is neither 1 nor 0, that's why it happens.

Hope this helps.
Tahmid.
 

do you mean like this ??
 

Attachments

  • Full page fax print.pdf
    172.8 KB · Views: 83

Connect the pull up resisters as shown in the doc file & see.
Connect to both the pins of PORT B 0 & 1 & see.
Regards,
Jerin. ;-)
 

Attachments

  • Doc1.doc
    102 KB · Views: 50

Hi,

@ jerin,
Those are pull down resistors not pull up resistors.
And, the 7-segment connection, those are BCD 7-segments, those aren't very common, so I suggest he use the more common ones with A-G-DP lines connected directly to the ports, or use a BCD to 7-segment driver like 74LS47 or 74HC47.

@lina889,
Yes like that. Try it and let us know. Make the 20nF caps, 20pF.

Hope this helps.
Tahmid.
 

Hello.
@Tahmid:
That resistor connected to PORT E pin is PULL UP Resistor. As the port pin is driven to a high impedance state by using the power supply with a resistor,the resistor is called PULL UP resistor. If the resistor is connected to the ground from the port pin that resistor is called Pull down resistor. It creates a low impedance state @ the port pin to which it is connected.

@ lina889:
I posted the screen shot for you to just check the pull up resistance connected to the port pin & not the other circuitry. Just replace your resistor combination with mine (pull up resistor) & see whether it is working or not.
Regards,
Jerin. ;-)
 

hello
thank you both for being so helpful really thank you both a lot
here is it :
the same project when am using micro-basic version 3.20 i have this problem that the led don't be OFF but
am trying it in other laptop i but using micro-basic for microchip PIC MCUs 6.0 and it's work without any other resistants
am not sure why is that an now trying to buy the hardware to implement it so i think that i have to use microbasic for my chip 6.0 it doesn't make any difference between tow version right ???
@Tahmid
am tring every thing that you ask me to do and nothing work
@incomplete_jerin
am trying every thing but the same problem stay
-----------
thank you both for being so helpful really thank you both a lot
 

the same project when am using micro-basic version 3.20 i have this problem that the led don't be OFF but
am trying it in other laptop i but using micro-basic for microchip PIC MCUs 6.0 and it's work without any other resistants
am not sure why is that an now trying to buy the hardware to implement it so i think that i have to use microbasic for my chip 6.0 it doesn't make any difference between tow version right ???
Is there any difference in settings for both the compilers or are the procedures the same? i meant the crystal frequency settings & all.
Regards,
Jerin.
 

Try with this schematic in PROTEUS....
Regards,
Jerin.
 

Attachments

  • Screen shot.doc
    112 KB · Views: 56

Try with this schematic in PROTEUS....
Regards,
Jerin.
yaa i check them by adding the pulling up resistors
but the schematic u give to me will not do the job that i want the LEDs will always be ON mo matter the switch is ON or OFF
 

yaa i check them by adding the pulling up resistors
but the schematic u give to me will not do the job that i want the LEDs will always be ON mo matter the switch is ON or OFF

Sorry i couldn't make it out what you said.... :-(
You want the LEDs to get off when you off the switch or you want the LEDs to continue in ON state while the switch is off?
Regards,
Jerin.
 

Sorry i couldn't make it out what you said.... :-(
You want the LEDs to get off when you off the switch or you want the LEDs to continue in ON state while the switch is off?
Regards,
Jerin.
i want the LEDs to get off when i off the switch but the problem when i get off the switch the led stay on
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top