Question about TAQOZ and smart pins
samuell
Posts: 554
in Propeller 2
Hi,
When I run commands such as "58 PIN 1 HZ", or "56 BLINK", does the Propeller use any processing, or do the smart pins all the work?
Also, is it possible to output analog signals (triangle waves, etc) via TAQOZ?
Kind regards, Samuel Lourenço
When I run commands such as "58 PIN 1 HZ", or "56 BLINK", does the Propeller use any processing, or do the smart pins all the work?
Also, is it possible to output analog signals (triangle waves, etc) via TAQOZ?
Kind regards, Samuel Lourenço
Comments
It's both
The Smart Pin is what finally runs and controls the pin, but the P2 needs to first use processing to parse the command and load the pin config.
I would like to see ALL smart pin modes made easily accessible from TAQOZ
So the smart pins change state on their own, and the cogs only "instructs" the smart pins, if I understood correctly. That is very neat and a quite powerful feature. That means I don't have to make a routine on my program and use a cog if I want a LED blinking.
And what about analog functions? I know Chip tested this a while ago, but it would be cool to implement this just with a TAQOZ command, or some program.
Kind regards, Samuel Lourenço
This post https://forums.parallax.com/discussion/comment/1462271/#Comment_1462271 has the program that uses pin 22 as a Smart Pin started in cog 1 and printing the results from cog 0. A couple of posts later I expanded it to read the voltages from 2 pots using Smart Pins 22 and 23, again in cog 1.
In the case of these programs cog 1 is doing some processing using RDPIN to read the result of the ADC conversion.
Tom
I didn't specified what I meant by analog functions. Basically, outputting sine, triangle, sawtooth and other waveforms.
Although, testing an ADC would be fun.
Kind regards, Samuel Lourenço
The streamer can feed the DACs, and the DOCs suggest you can re-loop the streamer memory, and FBLOCK looks like it supports a seamless table switch.
That means you could define wave tables, of one full cycle of N samples of sine, triangle, sawtooth and other waveforms and have the Smart Pin call + Steamer.
Single tone is set and forget, and Frequency Modulation looks to need minimal software.
Whilst you could have > 60 pins generating different digital smart pin modes, there is 1 streamer per cog, so only 8 wave-table -> DAC generators could be created.
Kind regards, Samuel Lourenço
its capable of direct RF or baseband signal generation. Not sure dithered 8-bit is enough for this.
Kind regards, Samuel Lourenço
You can get close to DDS by using a larger table, which lowers the granularity.
eg a Streamer table of ~64k Bytes would offer steps of 15ppm in frequency generation. For many apps, that would be good enough.
Higher frequencies have multiple cycles in the table, but those cycles are not quite exact cut/paste copies, but are equation generated.
Table size adjusts as required to always contain whole numbers of cycles.
On the other hand, the P2 is good enough for audio signal generation and some more, and you can have more than one channel for the same cost. I'm just exploring the possibilities, if the AD9102 implementation fails. Also, it is easy to control via the serial port, and requires no additional software on the host side, except for programming.
I'm comparing apples to oranges, but in the end, the P2 can act as a DDS with the right programming.
Kind regards, Samuel Lourenço
You want about as many bits of sinetable address as DAC bits to balance out the magnitude of errors from
each, the waveform step granularity is constrained by both limits and sets the noise floor.
The same could be done with the P2, by uploading your waveform to the streamer.
Kind regards, Samuel Lourenço