Thank you everyone for your input to my earlier thread for my need of a one chip solution that directed my application to using a PIC.
As a new PIC learner can you give me a PIC choice & part # (kit) that has the flexibility I need for my application? Also a good webpage for PIC projects would also be helpful. I have several years of old experience, covered in cob webs, in the use of 8080 Assembly & Basic programming languages which hopefully will allow me to grasp the PIC language quickly.
Webpage link to my application need:
My need in the ideal PIC (AFC) application:
A PIC samples its Input every 10 minutes from a manually activated & conditioned Update Pulse. The Input is sampled for a 200 Hz frequency in a 1/2 sec timing window and compared to 100. It has a possible count value above or below a 100.
PIC INPUT = 1 Volt p-p AC @ 50 Hz - 300 Hz
PIC OUPUT = 5v to 6v DC @ 1 ma with a resolution of 100 increments.
PIC features: OP Amp F-V ADC Latch DAC
- * * Below is a first attempt not knowing any PIC language using some past terms for crude logic in my Automatic Frequency Control. I will refine the logic when I get a specific PIC for my application.
Dim vInput_count %, vOutput_V%
vOutput_V = 5.5v PIC_Output = vOutput_V ' set PIC Output to 5.5 volts
label1:
If Terminate_ Pressed then End
vInput_count = PIC_Input '1/2 second PIC frequency Input sample"
If vInput_count > 100 then vOutput_V = vOutput_V - .01 'minus .01 volts from PIC Output 'lowers the frequency at the PIC Input. PIC_Output = vOutput_V
Goto label1
Else
If vInput_count < 100 then vOutput_v = vOutput_V + .01 'adding .01 volts to Output raises 'the frequency at the PIC Input.
PIC_Output = vOutput_V
Goto label1
End if 'Program proceeds when Input_count = 100
Do until Update pressed 'Wait for 10 minute signal to Update 'sample at the PIC Input. Loop
Goto Label1
End
- * * *
Christopher
Temecula CA.USA