Propeller loads off the EEPROM, but won't run code
brendankm
Posts: 14
Hi,
First off, I'm semi-novice with the Prop. I've been putting in about 20 hours a week working with them over the past month, so I'm starting to get the hang of it.
Here is my problem: I wired up a brand new Prop on a previously-working breadboard (with another prop that I put into another project.) I had also replaced the EEPROM (again, the old one was put into another project). I plugged in my PropPlug, and Spin recognized it fine. I compiled and deployed my code onto the EEPROM, and it went with no problem, passed the verification too. However, upon reset it does nothing. I powered off and swapped the Prop with another new one I had just ordered, and it work fine. So I swapped back, this time I checked the EEPROM pins with a multimeter, and the Prop is definitely reading from the pins. The Prop is also still able to download code from Spin to RAM and the EEPROM via my PropPlug. It just seems like it can't run code.....Maybe there is something wrong with the Spin Interpreter?
Thanks,
~Brendankm
First off, I'm semi-novice with the Prop. I've been putting in about 20 hours a week working with them over the past month, so I'm starting to get the hang of it.
Here is my problem: I wired up a brand new Prop on a previously-working breadboard (with another prop that I put into another project.) I had also replaced the EEPROM (again, the old one was put into another project). I plugged in my PropPlug, and Spin recognized it fine. I compiled and deployed my code onto the EEPROM, and it went with no problem, passed the verification too. However, upon reset it does nothing. I powered off and swapped the Prop with another new one I had just ordered, and it work fine. So I swapped back, this time I checked the EEPROM pins with a multimeter, and the Prop is definitely reading from the pins. The Prop is also still able to download code from Spin to RAM and the EEPROM via my PropPlug. It just seems like it can't run code.....Maybe there is something wrong with the Spin Interpreter?
Thanks,
~Brendankm
Comments
If this doesn't work, I would check the chrystal (if you are using one)... although it is strange, that it works with another prop?!?
So tell us more about this breadboard of yours. How is it powered? Can you show us a photo? A schematic?
-Phil
WOW! It works!!!! I actually didn't have one of the Vdd Pins connected, thinking it wasn't necessary....I connected it and still nothing. So I checked the clock on another project and the clock worked fine. Then I took out the
and it worked. Then I added
And now it seems to be working well! Thanks!!
A Simple blinks about twice per second.....
-Phil
Sorry...
EDIT: Wrong one...fixed
WAITCNT(CLKFREQ + CNT).
This will add a 1 second delay so the LED should go on for 1 second, then go off for 1 second. Once you've verified that, you can reduce the delay by dividing the CLKFREQ by some constant. For example, CLKFREQ/4 would cause the LED to blink 2 times a second
No, its not supposed to be a slow blinking program....you missed the point...
That program is causing the LED to blink at about 2 times per second, it should be blinking significantly faster. When the pll is removed, it goes to that significant speed, but i can't rely on the internal clock because I am using it to send IR Pulses..
The program you posted uses an external crystal (5MHz) and uses the PLL to multiply that x8 which gives a system clock speed of 40MHz. At that speed, most Spin byte codes execute in a few microseconds and execution speed should be perfectly fine for IR communications. The built-in cog counters could be used to produce a high speed carrier with crystal accuracy.
If you were running off the internal default clock, that would be around 12MHz and you'd still have a blink time on the order of tens of microseconds.
Right, I am 100% fully aware of everything you said....I'm not that novice.....
Yes, the program I posted does infact blink at twice per second, and with using a pll16x, it does nothing at all.
I am fairly sure there is something wrong with the external clock part of my Propeller. And I know that the internal clock is 12MHz, but that also has an error of +-60% I don't want to risk that.....
As I said before, removing the PLL it works fine, but I do not want to rely on the inconsistant internal clock.
I'm not as novice as you might think.....
The PLL is often the first thing to fail...
-Phil
I unplugged the USB Connection-I thought that that may have been the problem-it wasn't. I checked the output with a multimeter, it is a steady 3.28 when its on, and not an average as if it were blinking (tested the average thing on another prop)
I think it is a pll problem....are there any other ways to get a fast accurate clock?
Verify that your crystal is not being grounded. I was inadvertently grounding my crystal on one of the ground pins connected to the propeller on the breadboard. In my case however, I was still running at the default RCSLOW of 12kHz.
It may be as referenced earlier - a constant reset occurring only in the case where (you do not have your usb clip connected and you are sending comms back the pc).
thank you
/michael
I desoldered/resoldered the crystal and bang, came right back to life.
So is there a work around? Or am I stuck using the (inaccurate?) internal clock?
Do try JonnyMac's suggestion. The PLL damage normally prevents the Propeller chip from doing anything when switched to PLL clock modes and that's not how your chip is behaving.
Attached are the two different programs. Both propellers have Identical clock, power schematics, EEPROMs ect. SendIRSignal is the one with the bad prop. The IR Emitter is driven off a transistor, with 100 Ohms in between the transistor and Prop.
EDIT:
ignore some comments in the code, it has been changed so many times, a lot of the comments don't mean anything anymore
I can put in another prop, but then I can only test one and of the IR Comm, because I only have two Props ATM (one for IR Sender, one for IR Receiver)
This is wrong. Please read the Propeller Manual for examples of what's allowed.
This would cause the system clock to default to RCFAST
If you're using an external clock source of 5MHz, you'd use
_clkmode = xinput ' direct input to XI from an external clock
_clkfreq = 5_000_000 ' for a 5MHz external clock
Thanks,
I added and took out the old incorrect definitions, however it produces no response from the Prop.....
So far, the only way I've been able to get anything semi-useful out of the prop is by using the internal clock......
This only works when you connect an external clock signal to XIN. It doesn't provide an oscillator for just an external crystal. You could use an I/O pin of one Propeller to provide the clock for another for test purposes. There's an object in the object exchange to provide a pulse stream over a wide range of frequencies and you could use that to provide your external clock.
If you only have two props and you suspect one is damaged, the easiest thing to do would be to test another, even if it means you can't test out your complete system. This problem with the chip takes priority, because if you can't get one chip functioning correctly in experimental programs, then it surely will not work in the larger system. We are doing our best to help..
Having designed many propeller boards, I thought I was going mad when I had a propeller that would download but not run! It was exactly the same fault as post #1 - can download to ram and even eeprom but won't run. Not even a flashing led. Tried swapping all the chips over and it is not the chips - it is the board.
Thanks to all the clever posts on this thread, there really could be only one component that is the problem and that is the xtal. Checked the PCB and no Vias under the xtal. Unsoldered it and replaced with a new one. Same problem. Unsoldered again and replaced with a new one. Same problem. Unsoldered an xtal off a working board and put it on the new board and it all works.
Seems I have a bad batch of xtals.
But it is really the forum that saved the day (and google, which found this thread).
Thanks again!