can someone help me check?


Results 1 to 18 of 18

Threaded View

  1. #7
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Hi Andrew

    You've probably missed your deadline... that's what happens when you do your project the night before. You gotta cut down on beer and girls...

    In answer to your email... (not in any particular order)...

    They wire Power Stations using thinner wire!

    Get some single-strand insulated solid conductor wire - kinda fits into breadboards easy!

    The way you got the Diode in your picture is correct. If things are heating up as you say in your email, then you have a major problem... you might have killed your PIC. If so, DON'T replace it with another F84... see my comment further down.

    Can't see too clearly as your pics aren't that focused, but I think you've MISSWIRED your crystal. It also should have SHORT leads to your PIC... as short as possible. In future use a three-pin Resonator (one with built-in Capacitors) as it's easier to play with and breadboard - or use a PIC with a built-in oscillator. Depending on your breadboard, you might even be able to dispense with the Capacitors.

    I HATE schematics out of books, they always omit things as the author assumes the reader has a basic knowledge... take a 100nF Capacitor between Vss (5) and Vdd (14) on your PIC... it'll kill any noise. Along with it connect a 10uF Capacitor (to smooth any supply irregularities) the same way.

    You don't need the RESET Switch to make things work. It should fly as soon as you apply power.

    The 16F84A is for all intents and purposes the same as the 16F84.

    In future, get yourself a 16F628 or 16F628A... cheaper than an F84 and more fun... (you can make those work without Xtals or Resonators)... as well as being fully compatible with the F84's (with just one line of code difference).

    See the Breadboard picture I've included. yes, I've used a F628, but you can pretend it's an F84. The salient points are keeping the xtal and capacitor paths SHORT... that's why I've got Vss running across the top rather than your Vdd. I've connecetd an LED between Vdd and RB0 (shorter lead of LED to RB0) via a 330R resistor (use anything in the range 220R-390R). I have a 100nF capacitor between the PICs Vss and Vdd, and a 10uF electrolytic similarly. Finally, the PIC doesn't draw a great deal of current, and consequentially the Diode may not drop 0.6/0.7v across it (another reason for hating schematics out of books). I've added a 1K resistor between Vss and Vdd to force a few mA through it. Either way, you're flying close to the 5.5v maximum limit of an F84A.

    Put that LED and Resistor per my example temporarily (in place of your Servo) and run the appended code. It should blink once per second (half second ON, half second OFF - this assumes you have a 4MHz Xtal). If it does, you are in business, it it doesn't you have a problem.

    Code:
        @ DEVICE pic16F84A, XT_OSC
        @ DEVICE pic16F84A, WDT_ON
        @ DEVICE pic16F84A, PWRT_ON
        LED var PortB.0
        TRISA=%00000000
        TRISB=%00000000
    Loop:
        High LED
        Pause 500
        Low LED
        Pause 500
        Goto Loop
        end
    Try to keep things on the forum in furture.

    Melanie
    Attached Images Attached Images  

Similar Threads

  1. TMR1 external LP xtal setup check
    By comwarrior in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 13th October 2009, 18:11
  2. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  3. PIC16F877A - Timer0 won't interrupt
    By WishMaster^ in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 25th April 2007, 08:25
  4. Code check -- button not working
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 2nd March 2006, 22:43
  5. Even Parity Check, How?
    By Mark Scotford in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 24th January 2005, 09:21

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts