PIC16f84a simple counter problem ........ plzzzz NEED HELP !!!

Status
Not open for further replies.

hmahanna

New Member
hi everybody ....... Iam a New member in the Microcontroller realm ..... i tried to do my first simple project which is a simple counter ,but it did not work properly , please friends i need your help if u can ....... i uploaded my simple project to you to check it for me ....thanks
 

Attachments

  • real counter.GIF
    8.9 KB · Views: 187
  • real counter.asm
    775 bytes · Views: 137
  • real counter.HEX
    108 bytes · Views: 103
You don't have any capacitors on your crystal. Also, you'll need current limiting resistors for your Leds.
<edit> Having had another look at the schematic, you only have power on the MCLR pin.
 
Last edited:
You can't run an led off the xtal connection.... Are you running this in ISIS?
 
Thanks brother House0Fwax ......... i tried it right now and it works ....... but now i get conflicted about what the limiting current resistors do ... does it limit current reaching the LEDs only and controls the PIC outputs .......... OR something else ?????????!!!!!

Thanx agian
 
Dear Colin55 .......... i dragged a delay portion in my program >>>>>>>>>

MOVLW 0ff
MOVWF timer
down DECFSZ timer
GOTO down

GOTO start
 
The current limiting resistors limit the current to the Leds. Which protects the Pic pins from damage. A Pic pin can only supply about 25mA, an Led will take anything it can get.
 
My comments on your "schematic", some of my comments duplicate some of those which have been made already.

The standard of drawing is awfull with wires criss-crossing here and there for no good purpose, makes it very hard to read.
There is no power to the PIC power pins.
Why is the power shown connected to MCLR.
D9 serves no purpose, should not be connected to the crystal, and would probabbly stop the oscillator anyway.
There are no load capacitors for the crystal, the oscillator will not work correctly without them.
Why are RA0 and RA1 connected to 0v? If RA0 or RA1 are configured as outputs, you will short out the supply and probably damage the PIC. Or are these supposed to be inputs, it is not clear the way they are intertwined with the LEDs.
There are no current limiting resistors on the LEDs.

JimB
 




Dear JimB ....

First Thank you for helping me ....

I agree with u that the drawing is awful but it very simple .....any way i redrawn it .
-regard to the pic bias , i am using ISIS which programmed to have a built-in VCC and Vdd .
- for RA0 and RA1 >>>>>>>>> there are inputs not outputs , and i want to achieve the condition ( BTFSC ).
- I put the capacitors to the crystal .

hope u a good time my friend
 
For those of you who don't use ISIS...
The Xtal is not modeled so ANYTHING could be connected and it will still run.
There is no current detection on the led model so it doesn't need limiting resistors.
MCLR is digital so tying it to 5v with no resistor is valid.

Obviously not true in the real world, but for simple program testing its a good way of doing things.
There is a extra option for circuit analysis, but it costs more and slows simulation to a snails pace.

This however, is not an excuse for incorrect schematic representation.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…