jm_freqinDemo.spin
yarisboy
Posts: 245
I've loaded subject object on my Propeller and it does indeed output a square wave on pin zero. I haven't been able to get the serial terminal to display the frequency yet. The other serial exercises in the PE labs book work fine. Is there a communications parameter bug in this object set? Once I've fixed the serial terminal interface I need to count the frequency on pin zero I'm generating on a separate Propeller that is also xtal controlled. I'm looking at results on an oscilloscope. I'll have to comment out the signal generation code to do this but am not sure what I'll need to add to read pin 0. I have an opto isolation between my two Propeller boards and magnetic isolation between their respective DC sources.
Comments
The Output to PST.EXE is just ONE line and a repeated clearscreen
so you see just a single line.
The demo is tricky. A counter is set up to toggle PIN 0. While the freq-in-object is measuring this frequency.
For your other questions. Do your homework and make suggestions what YOU think you have to change in the code
best regards
Stefan
As Stefan points out, it's a tiny bit tricky; the period timer is launched into its own cog with a pin assignment and then we create pulses on that pin in our "foreground cog" (main method in the Spin application).
If you have an external pulse coming in the make sure you remove the lines between
term.tx(CLS)
and
repeat
... and, by all means, make sure that your foreground code is not setting the frequency input pin to output mode.