Erratic Behavior on a 18F452


Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Feb 2006
    Location
    Ohio
    Posts
    29

    Default Erratic Behavior on a 18F452

    I am using an 18F452 micro, running at 20 MHz’s. I have four 22k resistors, one each connected in series with pins RA0 thru RA3 with a 5 volt Zener diode clamping the voltage at each of the pins to 5 volts. I am supplying 12 volts to these four 22k resistors from a Hall Effect sensor array under the turret on my lathe. Depending on what position the turret is in will give me 0 or 12 volts on these pins which I use to tell what tool is being used. The problem I’m having is, when I connect these four wires to my circuit board I get erratic behavior on the turret. It loses turret position plus most of the time of I cannot upload the program to the micro using the bootloader. If I unhook these four wires everything is happy again. The only thing I can think of that might be the problem is, maybe there is something else needed to deactivate the analog portion of the micro. I have the line ADCON1 = 7 at the top of my code already. Is there something else I’m missing?
    Thanks,
    Mark
    Last edited by markcadcam; - 18th October 2010 at 13:50.

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