Problem with FrequencySynth
youngdave
Posts: 70
Dear All
I received my Propstick USB the other day, and have multiple LEDs flashing in all kinds of patterns under my command.
I’m having a problem with FrequencySynth. The only modification I’ve made is to change Frequency = 40_000 to Frequency = 4 to make things visible with an LED. FrequencySynth and Synth are in the same folder.
Nothing happens when I load FrequencySynth. What am I missing here?
I’m gonna top myself if I don’t get a solution within the next six months. Please help!
TIA David Young
Post Edited By Moderator (Bean (Hitt Consulting)) : 8/6/2009 11:20:58 AM GMT
I received my Propstick USB the other day, and have multiple LEDs flashing in all kinds of patterns under my command.
I’m having a problem with FrequencySynth. The only modification I’ve made is to change Frequency = 40_000 to Frequency = 4 to make things visible with an LED. FrequencySynth and Synth are in the same folder.
Nothing happens when I load FrequencySynth. What am I missing here?
I’m gonna top myself if I don’t get a solution within the next six months. Please help!
TIA David Young
Post Edited By Moderator (Bean (Hitt Consulting)) : 8/6/2009 11:20:58 AM GMT
Comments
did you try to reduce the frequency in several steps
best regards
Stefan
It seems that programs which don't call an external object run without problems.
This suggests that the Propeller Tool can't find the called object (ie. synth). Shouldn't called objects be in the same folder as the main program (ie. FrequencySynth)?
TIA David Young
You need to provide a schematic that shows how you actually have everything connected, then you need to attach your actual source program to a subsequent message using Post Reply and the Attachment Manager.
Thanks for your reply.
* I have uninstalled and reinstalled Propeller Tool.
* I have P0 > 160 ohm resistor > LED > GND. This setup works with LedsOnOff50Percent.spin without problems.
* Source program is FrequencySynth with Frequency set to values between 4 and 40_000. I get the ‘Compilation Successful’ message at the bottom of the screen every time upon pressing F11.
* No output on the LED connected to P0.
TIA David Young
Welcome to the forums.
Your description of the circuit is fine. Be sure you don't have VSS/VDD mixed up. Also be sure the LED anode/cathode are arranged properly.
Tt sounds like the object/firmware is working just fine. Therefore, I suspect the problem may be within the program. In your previous post you referenced two programs. LedsOnOff50Percent.spin and FrequencySynth. Can you attach the programs?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
Thanks for your reply.
* VSS and VDD are OK.
* I attach the files. FrequencySynth and Synth were downloaded from the object exchange. I’m using them unmodified.
* LedsOnOff50Percent_mod is my modification of LedsOnOff50Percent provided with the Propeller Tool. It works perfectly.
* When I hit F11 with FrequencySynth on the Propeller Tool screen, the ‘Compilation Successful’ message appears at the bottom of the screen whether Synth is in the same folder or not! Don’t both the referencing and referenced files have to be in the same folder?
* I have installed the Propeller Tool on my XP machine. The same behavior occurs as on the Vista machine.
TIA David Young
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
In the FrequencySynth object try changing the following and let us know how it works.
to
If you are trying to modulate LED brightness, then I would recommend a PWM object or similar. Beau, who wrote the Synth object, also has a PWM object in the exchange. You can use the DutyCycle in the PWM object to vary the brightness. The PWM method is under scrutiny from me and I think it might not be functioning yet, so Beau is looking into this.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
* No, the LED being on the wrong pin is not the problem. I’ve got LEDs on P0 and P1, and neither shows anything.
* I’m just fiddling with LedsOnOff50Percent_mod as a learning exercise. I need FrequencySynth to output a 3.6MHz signal.
* Am I correct in assuming that it’s OK to run top and subsidiary objects from anywhere in the system, provided they're in the same folder?
TIA David Young
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
I just put the same firmware file you have used into my setup and everything is OK. Of course at Frequency = 40_000 the LED is solid, and at Frequency = 4 the LED is blinking. I powered on my Prop setup which has an LED on Pin 16. I then downloaded the above FrequencySynth file to my desktop. I opened the file. I pressed F8 and the program compiles. I can see that there is a Synth object in the tree on the right. The synth object has a blue folder indicating it is a library object. I think changed the Pin = 1 to Pin = 16. I then pressed F10 to recompile and download to ram using a Prop Plug. And the LED behaves as expected.
When a program is compiled via F8, F10 or F11 the Propeller Tool first looks for the called objects in the editor tabs. The Program could have been opened from anywhere and if it is in the editor tabs it is used. If the program isn't found there, the Propeller Tool looks in the directory of the program being compiled. If nothing is there, then the Propeller Tool looking into the Library folder installed under the Propeller Tool directory.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
* The crystal is OK.
* I’m pretty sure that the propstick itself is OK, and the object files are good. It’s starting to get right up my nose, so I’ll sleep on it. If you come up with any hot tips, let me know ASAP.
* Your comment about the blue folder is interesting. I’ve never seen one on F8 (I’ve only seen it in the tutorial). I wonder if the directory structure within ‘Program Files/Propeller Tool V1.2.6’ is screwed up in some way? When I uninstalled and reinstalled the Propeller Tool, I didn’t clear out the files in ‘Program Files/Propeller Tool V1.2.6’. I wonder if it’s worthwhile to uninstall and reinstall again and clear out the directory structure at the same time?
TIA David Young
Sleep well.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
I tried your program as you posted it and it works just fine.....
I suggest you check your connections....also try a different pin
Also I noticed in a previous posting you said P0 > 160 ohm ....
The program is using P1 .....did you know this??
Sam
* I have LEDs on P0 – P3, so changing the value of the Pin variable within this range is not a problem.
The current situation is as follows.
* The program FrequencySynth – Synth (using the external clock) compiles but doesn’t run.
* The program Blinker1 – Output (not using the external clock) (from Spin Exercise 5-1 in the tutorial) compiles and runs.
* This seems to indicate that compilation and calling of objects is not a problem, but that if the program requires the external clock, it won't produce any operation.
* I wonder if the problem might be a dud crystal. Is this possible?
* Timothy, you mentioned that the crystal may have become unseated. Do you mean by this that the crystal may simply need to be jiggled about in the connectors to make a clean connection, or something else?
* Is the crystal just a standard 5MHz crystal available from any electronics supplier? If so I might buy one and try it.
TIA David Young
I suggest you try the program without the clock settings.....just comment the lines
·' _CLKMODE = XTAL1 + PLL16X
·' _XINFREQ = 5_000_000
and see if the program runs....if it does then your problem is definately to do with the
crystal....try to remove it and then putting it back in again.....
Sam
·
If you can download programs from the Propeller Tool and they work as long as they run using the internal clock (RCFAST or RCSLOW), then you may have the "dreaded" PLL failure. This is a failure mode of the Propeller chip due to overvoltage stress on the chip, sometimes transient. The PLL selection logic seems to be the "weakest link" and fails first. The symptom is as mentioned. The boot loader uses the internal RCFAST clock which is also the default clock for compilations, so downloading works and some programs. Unfortunately, anything that's timing sensitive like serial I/O or display output won't work because the internal clock varies from chip to chip and is temperature sensitive.
There is nothing special about the crystal. 5MHz, standard package of HC49/u (or something like that).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
I purchased an 8MHz crystal. FrequencySynth – Synth runs when _CLKMODE = XTAL1 + PLL16X and _XINFREQ = 8_000_000 are commented out, but not when they are included in the compile.
This "dreaded" PLL failure due to overvoltage stress on the chip is bad news! I’ve only ever supplied the chip with +5VDC from a power pack with a 0.47uF capacitor across +5VDC and GND just before P9 and P12.
A comment from Parallax on replacement would be nice.
TIA David Young
This changes the PLL to 8x. With an 8MHz crystal, you can't run at 16x on the PLL because that is out of range for operating (128MHz.)
Report back. If you suspect a problem, go ahead and call or e-mail Parallax Customer support and include the link to this thread.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
I tried the following but it doesn't work.
_CLKMODE = XTAL1 + PLL8X
_XINFREQ = 8_000_000
TIA David Young
is with the clock system.
If it is the PLL cicuitry then there is nothing you can do but·replace the chip.
If it is just the crystal then you can try to replace the crystal.....but from your other postings
that is not working then there is no other conclusion other than that the PLL circuitry is caput....
Sorry......that is a bummer....maybe parallax can do something .... they are GREAT people I am sure
they would help.....
Sam
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
Yes, I've just emailed Parallax support.
Thanks for all the help from everyone.
It's been a character-building experience.
TIA David Young
Let us know the results of your conversations with Parallax. They are reasonable and do the best customer support that I have experienced in electronics companies.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
I'll put the results of the conversation with Parallax on the forum.
Thanks David Young
Are you running the chip on +5V to it's supply pins? Couldn't tell from that comment if you are taking about stepping down from 5 to 3.3 or you are running 5 right up to the chip.