Check out this pic18f458 schematic.

Discussion in 'Embedded Systems and Microcontrollers' started by johnnyinwa, Oct 6, 2013.

  1. johnnyinwa

    Thread Starter Member

    Jun 24, 2013
    Hey guys,
    Please check out the schematic of my pic18f458 random number generator and tell me if there is anything wrong with it. This is my first micro-controller project and any help you guys could give me would be much appreciated.
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    Looks reasonable, nothing terrible jumps out.

    A power on LED is a bit redundant if the display is always on.

    The push button debouncer should work... personally I'd drop one resistor and the cap and do the debounce in code.

    And of course, reference designations for the parts is an essential requirement to talk about them and track them with any sanity.
  3. ftsolutions

    Active Member

    Nov 21, 2009
    It can work, provided that you get your code working to handle the multiplexing of the LED displays. There are other ways to drive those LED segments that would give you more options and probably brighter displays, but at the cost of more parts.

    I always leave a power-on LED on the board - that way I can tell it is powered up even when the micro is halted/nothing else is active.

    With that 100K in series with your pushbutton on the lower right, you will have a long RC time constant.

    Ref designators need to be added - otherwise you'll quickly lose track of what is what when you build it, or if you have specific questions to talk about.
  4. Art

    Distinguished Member

    Sep 10, 2007
    If I was going to have an LED connected to power that tells nothing about the chip,
    I'd connect it to reset so it momentarily turned off while the reset button was held down.
    I'm with ErnieM on this one, but if it has to be there, and you drive it with an IO pin,
    you can also indicate error conditions by flashing it, etc.
    Last edited: Oct 8, 2013
  5. atferrari

    AAC Fanatic!

    Jan 6, 2004
    Hola Johnny,

    While I am not addressing your question exactly, attached is the basic circuit that I use most of the time. While I show the 18F4520 here, the concept applies to yours as well.

    Look at the RST: as per the datasheet, with an added button. Tired of breadboarding it every time, it is now a small board inserted in the breadboard.

    I think it is good to have LEDs (two in my case - kind of "right" / "wrong" flags) plus one output pin (scope), to debug things. Used like that for years. I lnow, you could go away without them, but a simple blink of each will tell you that there is power and the micro started to run.

    A friendly suggestion: make sure that you get a good grasp of the initialization for each new chip you use. (It used to be my personal stumbling block until I decided to face the problem so things are easier now).

    Good luck.
  6. johnnyinwa

    Thread Starter Member

    Jun 24, 2013
    Thank you for your comments guys. :)