Have you considered using the NE/SA 572 chip? I think to propr do such a job with controller you need a fast one like dsPIC or better a DSP processor.
PIC'c do not have many resources for analog processing.
Ioannis
Have you considered using the NE/SA 572 chip? I think to propr do such a job with controller you need a fast one like dsPIC or better a DSP processor.
PIC'c do not have many resources for analog processing.
Ioannis
That's a nice little chip, but alas the minimum VCC is 6V. (I'm tied to 5V)
As it goes, in my config, I'm not placing that much in the way of demands on the PIC - it's simply sampling a rectifed/smooth guitar signal to get a handle on the signal strength. The PIC then either pulses up/down a digital pot accordingly - as simple as simple can be.
If you use the proposed chip, then why still use 5V as power? Do you have need for a controller?
Anyway, is it working now or you have other problem with the PIC?
Ioannis
I'm tied to using 5V as I will be placing this board inside a guiutar that already has 5V inside it - I want to tap into that supply for my circuit.
The circuit itself works, but I need to refine the Automatic Gain Control 'decisions' made by the PIC - & I'm still very much finding my feet wrt PIC Programming!
For example I need to modify the the code to make a decision something along these lines...
"If the present incoming AtoD sample if 40% bigger than the last AtoD sample then do nothing - just keep looping until the sample falls in level to equal a user determined level"
(In the situation above, it means a new note on the guitar has just been plucked - however, at the minute, my circuit's Automatic gain control sees the incoming larger signal of the plucked string & cranks the gain down - but it then struggles to get the gain up in time after the initial high pluck signal strength has dropped out!)
Last edited by HankMcSpank; - 30th October 2009 at 10:01.
thanks Ioannis
I'll not get a chance to try that until tomorrow evening now (Saturday evening) - but to my very untrained eye, it looks like that setup is saying ...
if the present incoming signal (ie sample) is greater than 60% of the previous signal (sample), then blah blah
??
If so, then what I actually need is this type of condition ....
"if the present signal (ie sample) is 40% greater than the previous signal (sample), then blah blah?
By the way - what's the best way to do percentages in PICBASIC? (if it helps, I can dispense with the floating point - which I'm presuming the PIC just does away with ...eg 40.4% becomes 40%)
PBP does not do floating of course. you have to multiply the variable by 10 or 100 or even 1000 to get the "floating" digits in the integer part of the number.
Ioannis
Bookmarks