OK, this is really weird. I made a LED blink program but it takes like 5 seconds to turn on and then it doesn't blink, it just stays on. How do I turn off the 37khz oscillator? Thanks.
-Mike
OK, this is really weird. I made a LED blink program but it takes like 5 seconds to turn on and then it doesn't blink, it just stays on. How do I turn off the 37khz oscillator? Thanks.
-Mike
Alright, I got it working by changing adding "DEFINE OSC 4." So it works fine now. However, when I tried the original program there is still a pause. When I turn the pin off there is no pause, only when I turn it on is there a pause. Also, when I leave the pin on but reset the PIC it recognizes it immediately.
I am almost positive it has something to do with my input. I am using a serial port (with RTS as the input) and when the RTS is off it says that it is -10 volts. Should I put a diode there or something? I really have no idea how this works, so even a little help understanding this would be greatly appreciated.
-Mike
Questions:
1. Does it take 5 seconds for the LED to come on or does the LED stay on for 5 seconds.
2. Have you tried not using serial input to turn on the LED. Not just make it blink like Skimask had you do, but re-write so when PIN? is high LED on. (simple switch )
I am getting at, if the above #2 works fine you may want to look at the signal duty cycle coming in from the serial.
Dave
Always wear safety glasses while programming.
It takes five seconds for the LED to come on.
I tried to turn it on without using the RTS and it works fine.
Just now, I tried putting a diode on the pin and it actually seems to be working now. I put the diode in because I thought that the -10V when the RTS was off, was a problem (because it worked when not using RTS from the serial port) and therefore a diode might help. I guess I did something right for once. There is no longer a pause and it works just as programmed, finally![]()
Thanks for all the help everyone!
-Mike
Good deal...
Maybe that negative voltage was screwing with the guts of the PIC somewhere causing it to latch up somehow, WDT kicks in, resets the PIC, and the sequences starts over...
who cares why...it works now...that's all that matters...
Next time you might want to think about a MAX232 or equivalent circuit... Also helps keep you from blowing up pins on a PIC!![]()
Bookmarks