It is desired to design a module to achieve the square of a given 12 bit digital output from the adc
Since the output of an ADC is not a 12-bit bus but contained in two registers, you first need some mechanism to get that value into your component which is usually a job for DMA.
Several choices for squaring, easiest first:
The eoc-signal triggers your component (consisting of an interrupt and some software) to get that value and calculate the square. This will work only at lower sample-rates as some few kHz.
Here http://www.cypress.com/?app=forum&id=2492&rID=76712 you find some informations how to access a PSoC-internal component, a "multiply and accumulator" which could do the squaring within 18(!!!) clock cycles but is quite more complex to modify to your needs.
Last suggestion is to use VeriLog and program a datapath to do that job. This could do that task (shift and add) in 14 to 20 (guessed) clock cycles.
Get the examples, videos and appnotes for DMA
Get videos for component creation
When you decide to take "The Hard Way" using hardware (smile) look at "DataPath"
In the right-hand upper corner of this page is a keyword search which wil lead you to a bunch of documents and a large number of user-posts telling where you might run into troubles. (smile again)
So, what you've got to do first is to read a lot!
What is the reason to want to do this in hardware? What do you want to do with the square later on? The ADC in the PSoC3 isn't _that_ fast, why is software not sufficient?
My guess is that you want to send it out to a DAC. otherwise, you can use SW to perform the multiplication between the sampling time.
If the delay between the input and output is not a big issue, you can do the multpliation in SW and send it out to the DAC. Just an idea.
So everyone does not have to keep guessing, what are you trying
to compute, polynomial, RMS, speed you need, even application
to see if another approach more direct and efficient.
Yeah, crystal balls are cheap this year, but poor performance (Broad Smile)
A few months ago, some company sell crystal labeled as AUSTRALIAN CRYSTAL in Hongkong as heavyly discounted AUSTRIAN CRYSTAL. :-)
My friend has got a shirt with "There are no Kangaroos in Austria" on it. Seems to be the same shop.
Kernhof Zoo in Austria had some kangaroo., not sure if they still has that.
My crystal ball is still in repair :(