circuitry problem for 16f877a

Status
Not open for further replies.
as what i search is using 3 - 4 voltage, and the resistor connected b4 Led is 180Ohms.
my Circuit do not run the function other than led program

If your code works fine in proteus, then try connecting normal LED with a 220 ohm or 330 ohm resistance in series with the outputs, so that you can rectify the circuit. If problem is with the circuit this will works fine, try it on a breadboard if possible. First of all burn the program to PIC once again, then use a breadboard if u have one, then your circuit works fine.

Please check the MCLR pin where did you connected it? its not clear in circuit. Connect it separately to VCC by a 10K res, dont use this resistor to pull up an input pin , if you do it so when low input is applied it will reset.
 

dear all,
i ald done my circuits, the LED light is light up, but i am trying to make the light running around, but unfortunately, the light is stationary on the same LED without moving, no idea what is happening, since the coding i posted before ald been programmed into it
 

Hi,

If you post, as a .rar or .zip file, your assembler code AND the .hex code you have programmed into the chip then we can try it out.

Which Port / LED is staying on ?

Are you still using the multi led circuit you showed earlier ?
 

hi WP100

below attachment are my file included the .hex file
and it only
PORT D, 5 with 2.50V
PORTB, 3 with 2.73 V
PORTB, 7 with 2.50V
PORTC, 0
other 0 volt

from main circuit all got around 2.72 voltage, while BC369 PNP transistor only collector for portC, 0 got voltage
 

Attachments

  • test.rar
    17.2 KB · Views: 61
  • led.JPG
    77 KB · Views: 71

Hi,

Have simulated your code as best as possible, cannot see the exact values from that diagram.

It is turning RC0-3 on in sequence, with PortB and D all ON.

As you can see from the screenshot it led will only illuminate in that circuit when the two connecting port pins are Low.

- - - Updated - - -

Hi,

Have simulated your code as best as possible, cannot see the exact values from that diagram.

It is turning RC0-3 on in sequence, with PortB and D all ON.

As you can see from the screenshot it led will only illuminate in that circuit when the two connecting port pins are Low.
 

Attachments

  • ScreenShot001.jpg
    21 KB · Views: 65

I've got to say "looking at it", I think the crystal is a long way from the PIC, and lots of wire connecting the ground (but I may be misinterpeting the bottom face of the board), and that'd worry me... From the size of the crystal it looks "fairly slow", but but bits of stray capacitance can affect the oscilator...

Can you connect to it using a debugger? If not the oscilator might not be running... I prefer the 16F887 just because it has the internal oscilator, one less step to think of... Of course the PIC18f fits the same pin-setup and I'm running mine at 64Mhz (a 16Mhz crystal x 4!) happily, but lets get what in front of you going 1st...

One "trick" I sometimes use.... Take out the delay so the ports are just flashing continuously, and "flick and tickle" the oscilator pins, so the 50/60hz from the air "runs" it and at least then there's a flicker.... It just helps show the chip's ok....

Cool mate, all fun I hope
NEAL
 

Hi,

Attached is a .hex file to do a basic test on your hardware.

Just program it in and this should happen, RC0 transistor is used to turn on in sequence, RB7 Led down to RB0 Led.
Only one led should light at any one time, it will then loop around the same sequence.

Let me know if you see anything happening.
 

Attachments

  • flash8.rar
    260 bytes · Views: 63

Code:
list p=16f877a
include p16f877a.inc
__CONFIG _CP_OFF & _WDT_OFF & _HS_OSC & _PWRTE_ON

Can you try this
Code:
list p=16f877a
include p16f877a.inc
__CONFIG _CP_OFF & _WDT_OFF & _XT_OSC & _PWRTE_ON

And i once had a problem like you mencioned also.
Do you use MPLAB ICD2 to download the program to the PIC?
If you do please try to run the PIC from there (Apply voltage and connect the MCLR pin as it should to the ICD2).
It solved my problem.

But i can't run that particular code from a usual power supply of 5V it must be the ICD2... i dunno why still, i guess i will found it out eventually ^^
 

i am using pickits to down the software, but only portc coding work for me, but portb and portd result is not i expected
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…