Re: PIC 18F device has odd fade-in delay?
- From: Spehro Pefhany <speffSNIP@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 19 Dec 2007 11:17:58 -0500
On Wed, 19 Dec 2007 10:37:35 -0500, "Peter S. May" <me@xxxxxxxxx>
wrote:
I've successfully programmed PIC 16F-series MCUs since the summer, but
just started messing with an 18F2450 and an 18F2550. I've put some
simplistic Hello World firmware on the chip, whereby PORTB is
incremented once after a delay loop, repeating ad infinitum. I have two
LEDs connected via 1K resistors to RB0 and RB1. (TRISB = 0, ADCON0 = 0,
MCLR disabled.)
When I apply power to the circuit, the LED on RB0 seems to take a few
seconds (longer than the program's delay loop) to fade in at first.
After that, the program runs normally.
I thought it might be the fact that I was using a 20MHz crystal on a
breadboard, so I removed the crystal and configured the device for
internal oscillator. I also thought it might have something to do with
the ATX power supply I was using, so I tried batteries instead. Neither
fixed the problem.
Also, the same problem occurred with both the '2450 and the '2550 I
used, so it seems as if it's not a problem with the chip itself.
Along the lines of firmware and/or application circuit, what else should
I try?
Thanks
PSM
You should increment LATB not PORTB, or use a shadow variable.
Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@xxxxxxxxxxxx Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
.
- References:
- PIC 18F device has odd fade-in delay?
- From: Peter S. May
- PIC 18F device has odd fade-in delay?
- Prev by Date: Re: PIC 18F device has odd fade-in delay?
- Next by Date: Re: Yet another new battery breakthrough
- Previous by thread: Re: PIC 18F device has odd fade-in delay?
- Next by thread: Re: Balance of Trade Improvement ??
- Index(es):
Relevant Pages
|