Strange timing problem
Sam Gutkind
Posts: 2
I just purchased the Propeller 40-pin DIP Education Kit, and have been following Lab #3 for setup and I/O pin testing.
All the pins I tested passed as outputs. Furthermore, pins 2 through 27 passed as inputs. But when I hooked my pushbutton circuit up to pin 1, the LED stopped flashing and stayed on. When I reloaded the program, it would stay off and never come on. Now I can't get it to flash again, on any of the pins.
The Fundamentals book suggested I try setting _clkmode to xtal1+pll8x. When I do this, the LED usually starts out staying solidly on. But when I press down on the crystal, it starts flashing extremely fast. I removed the crystal from the breadboard. Now, when I touch any piece of wire--sticking into the air, going absolutely nowhere--to the "XI" port, the oscillation rate slows down to about the intended speed. And it does slow down by a factor of 5 when I press the pushbutton. It slows down even more when my finger is pressed to the other end of this wire I attach to the "XI" port.
Any ideas about what's going on?
All the pins I tested passed as outputs. Furthermore, pins 2 through 27 passed as inputs. But when I hooked my pushbutton circuit up to pin 1, the LED stopped flashing and stayed on. When I reloaded the program, it would stay off and never come on. Now I can't get it to flash again, on any of the pins.
The Fundamentals book suggested I try setting _clkmode to xtal1+pll8x. When I do this, the LED usually starts out staying solidly on. But when I press down on the crystal, it starts flashing extremely fast. I removed the crystal from the breadboard. Now, when I touch any piece of wire--sticking into the air, going absolutely nowhere--to the "XI" port, the oscillation rate slows down to about the intended speed. And it does slow down by a factor of 5 when I press the pushbutton. It slows down even more when my finger is pressed to the other end of this wire I attach to the "XI" port.
Any ideas about what's going on?
Comments
I deleted the lines:
_clkmode = xtal1 + pll8x ' Feedback and PLL multiplier
_xinfreq = 5_000_000 ' External oscillator = 5 MHz
from the top of the program. Then everything ran as intended.
_clkfrq =·xinput + pll8x
_xinfreq = 10_000_00
Which is a big no no because of the xinput part. It should really have been xtal1 or xtal2.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,