8051 GPS Nixie Clock

Discussion in 'The Projects Forum' started by spuzzdawg, Nov 2, 2009.

  1. spuzzdawg

    Thread Starter New Member

    Nov 2, 2009
    2
    0
    I'm designing a GPS nixie clock for my end of year project and I've run into some unexpected trouble with the micro-controller. It seems that no matter what code the micro controller is running, it outputs a high on all output pins. The same micro runs fine on an unrelated development board I have so I'm fairly sure that the micro is OK.

    I've checked all of the necessary basic requirements for the micro to run such as Vcc, GND, EA high, and reset is set low with a 47uF cap to Vcc (datasheet says that the rest pin has an internal resistor to ground). I've also disconnected and removed just about every chip or source of interference so that I can directly measure micro output but can't come up with anything. Can anyone think of things to look for that would cause the micro to output everything high? Esp considering that I think everything should go low at switch on by default. The micro is an Atmel T89C51AC2

    spuzzdawg
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    That makes me wonder if leakage through the cap isn't keeping the uC reset. What happens if you add a resistor of about 20K between the reset pin and ground?
     
  3. CDRIVE

    Senior Member

    Jul 1, 2008
    2,223
    99
    Are you certain that that cap should go to the Vdd? It would seem more likely that it should go to GND. Are you also sure that it's polarized properly?
     
  4. CDRIVE

    Senior Member

    Jul 1, 2008
    2,223
    99
  5. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Try a 4.7uF cap instead of 47uF.
     
  6. MaxSmoke

    Active Member

    Oct 29, 2009
    35
    0
    Is there a clock signal on XTAL2? This is the clock output drive signal and sometimes just using a crystal (if this is what you are doing) can be a problem, as the oscillator does not always start.

    For most MCU / CPU designs I normally use a separate crystal oscillator, and feed this in to the XTAL input (XTAL1 in your cct) and leave the output open circuit (XTAL2 in your cct).

    Either way just ensure the clock is running, if you have not already done so.
     
  7. spuzzdawg

    Thread Starter New Member

    Nov 2, 2009
    2
    0
    Thanks Max and others for your assistance. I guessed that there had to be something wrong with either the clock or the reset circuit as I couldn't find any wrong connections on the PCB and I had removed all other sources of interference.

    I ended up changing the reset cap to 4.7uF as suggested and adding in a 22kOhm resistor to ground (I had already tried a 1K but thought I'd try it anyway). I also changed the crystal and downgraded its frequency and added in a 33pF cap over the 8051's Vcc and ground.

    None of these things seemed to make a difference and I made each one of the changes individually so that I would know which change fixed the problem if any of the changes had fixed the problem. I was about to give up but decided I'd change the micro as well. The first micro did the same thing but the second micro works like a charm.

    I can't explain why it now works but it does so I'm happy. All three micros work on my development board but only one works on my actual board. If anyone wants to guess why go ahead.

    Thanks,
    spuzzdawg
     
Loading...