samcheetah said:PIC assembler only has 35 commands (and many of those are rarely used), so it's not too hard to learn
is that for all the PIC microcontrollers?
and if i want to learn the assembly commands of PICs where should i start from (in addition to your tutorials)
PIC assembler only has 35 commands (and many of those are rarely used), so it's not too hard to learn
km said:PIC assembler only has 35 commands (and many of those are rarely used), so it's not too hard to learn
Are you mean these 35 commands from the figure below? :roll:
Just remembered something I forgot, you will need a low-pass filter on the input stage, it's vital that your sampling rate is higher then the maximum incoming frequency - at least double, preferably more!. Otherwise you get anti-aliasing distortion which will complete ruin any readings.
km said:This is the circuit that I found on the internet. Its purpose is to ensure the input voltage to the ADC falls between 0 to 5V. 8)
From the figure below, the first op-amp is designed to change the input voltage so that it does not go over zero volts, for example changes -2.5 to 2.5V, to -5 to 0V. The second op-amp is configured in negative amplifier mode with a gain of unity changing -5 to 0V to 0 to 5V. The third part with the two diodes is for protection, e.g. say a -1 to 6V signal makes it through the op-amps the diodes will cut off the peaks of the waveform making sure no damage is done to the A2D.
Can this circuit able to operate for the largest input voltage range -250V to 250V :?:
Is this circuit sufficient for my project at the input stage? (to step down the input voltage to 0-5V) :roll:
Should I used any variable resistors? :!:
Instead of 3 inputs, can I have only one? (i.e. to select different range of voltage) If can, HOW? :idea:
Just remembered something I forgot, you will need a low-pass filter on the input stage, it's vital that your sampling rate is higher then the maximum incoming frequency - at least double, preferably more!. Otherwise you get anti-aliasing distortion which will complete ruin any readings.
The low-pass filter that Nigel had mentioned, where do I need to put? Before this circuit OR between this circuit and the A2D?
km said:Sorry!! I think I have missed out some qustion. :shock: For the analogue circuitry diagram (as shown in previous post), is it necessary to include the capacitor C1 in the circuit (last part of the circuit)? If YES, is it acceptable for 100µF?
As for the low pass filter - RC circuits, is it acceptable for R=1000kΩ & C=1µF ? If it is not acceptable, can you please suggest suitable values for me? Is the resistor for the RC circuit has to be 1% resistor?
100uF would be far too big, you don't need a capacitor there at all, a PIC A2D already has a sample and hold capacitor.
km said:Thanks for your advice, Nigel!! :wink:
100uF would be far too big, you don't need a capacitor there at all, a PIC A2D already has a sample and hold capacitor.
I used PIC 16F628 (without a built-in A2D), so is it means that I don't need the capacitor as well? I'm using an external A2D (TLC 548).
km said:As for the low pass filter - RC circuits, is it acceptable for R=1000kΩ & C=1µF ? If it is not acceptable, can you please suggest suitable values for me? Is the resistor for the RC circuit has to be 1% resistor?
Nigel Goodwin said:It all depends on how fast you are going to read the incoming signal, a simple resistor capacitor filter is probably not good enough, you should make the 2nd opamp into an active filter at about 1/5th of your sampling rate.
Nigel Goodwin said:Should be fine, 8 bits is plenty.Using PIC 12F675 with a built in ADC is not allowed also.(since the condition clearly stated: No built-in ADC PIC allowed!!) I am planning to used TLC 548 A2D (8-bit resolution), is that good enough for my project
km said:In that case, do I need to use a variable resistor for my active low pass filter design? (for the 2nd opamp)
PART 2:
For my project, do I need to built an extra circuit before feeding the A2D output to the PIC 16F628? Because the data from the A2D is going to be very difficult to analyze and I might have difficulty in obtaining the results (i.e. frequency, average, peak-to-peak).
As for the external A2D I used (TLC 548), from what Nigel had said:"it should be fine to use that". (But from what I heard, the accuracy required for such applications is critical) Am I able to get accurate results with the external A2D (TLC 548)? Should I consider another A2D chip? (maybe an A2D 10-bit resolution):?:
Nigel Goodwin said:I would suggest you write a program on the PC to perform these calculations and feed it dummy data, that way you can confirm it works, and check what resolution will suffice.
km said::shock: A lot of prayer? LOL :lol: Thanks for your advice!!
Nigel Goodwin said:I would suggest you write a program on the PC to perform these calculations and feed it dummy data, that way you can confirm it works, and check what resolution will suffice.
How can I do that? What software do I need? :idea:
Nigel Goodwin said:You also have the problem of how many samples you need to give a sufficiently accurate reading - this is further compounded by the lack of RAM in mid-range PIC's. An obvious easy value (for an 8 bit processor) would be 256 samples, but you don't have anywhere to store them in a 16F84. Again, you can use the PC to test different numbers of samples, to see how few you can get away with - and again, this should all be documented.
km said:I had changed my decision to use PIC 16F628 (It's your opinion 8) ). Will it has the same problem as what you have said?
Exo said:Yes, 16f628 only has 224 byte of ram, still not enough (you're probabely need some of that for the rest of the software, not all ram can be used to store samples)
Exo said:Yes, 16f628 only has 224 byte of ram, still not enough (you're probabely need some of that for the rest of the software, not all ram can be used to store samples)
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?