One 8 bit sample will fit in one byte of RAM, filling it completely. So for 16 bit samples you need two bytes of RAM. If you use 10 bit samples, these also will not fit in one byte - so you would probably need to use two byes (or you can join them together, storing four 10 bit samples in five bytes).
Presumably you will probably be using an 8 bit sample?.
Also bear in mind that PIC RAM is in a number of different banks, if you are using large amounts of RAM you will have to select between banks accordingly.
:wink: Thanks Nigel, I get the idea now!! YES! I'm using 8-bit sample.
Nigel Goodwin said:
Also bear in mind that PIC RAM is in a number of different banks, if you are using large amounts of RAM you will have to select between banks accordingly.
Pic's of the 16F range can only access 127 bytes of RAM at once so their memory is divided into banks. You will have to switch between banks to access each block of 127 bytes...
Pic's of the 16F range can only access 127 bytes of RAM at once so their memory is divided into banks. You will have to switch between banks to access each block of 127 bytes...
Hi Nigel, just want to get some advice from you. :idea: For my project, I will need 128 samples (at least) to give a sufficiently accurate reading. As for the ADC resolution, 8-bit is OK. So, the PIC 16F628 and the A2D TLC 548 (8-bit resolution) will cause any problem? :roll:
Hi Nigel, just want to get some advice from you. :idea: For my project, I will need 128 samples (at least) to give a sufficiently accurate reading. As for the ADC resolution, 8-bit is OK. So, the PIC 16F628 and the A2D TLC 548 (8-bit resolution) will cause any problem? :roll:
Only the problems of memory paging, you will need to use at least two memory pages to get 128 bytes. If 80 bytes was enough, you could use a single memory page.
Only the problems of memory paging, you will need to use at least two memory pages to get 128 bytes. If 80 bytes was enough, you could use a single memory page.
What do you mean by memory paging? (is it the different of banks you mentioned earlier) :roll: - Do I need to change the use of another PIC? If YES, can you please recommend me one? (without a built-in A2D) Thank you :wink:
Only the problems of memory paging, you will need to use at least two memory pages to get 128 bytes. If 80 bytes was enough, you could use a single memory page.
What do you mean by memory paging? :roll: - Do I need to change the use of another PIC? If YES, can you please reccomend me one? (without a built-in A2D) Thank you :wink:
As I explained above, PIC memory is arranged in a number of banks, four in the case of the 16F628A - none has more than 80 bytes of memory (or 96 bytes, counting the 16 bytes common to all banks).
You need to select which bank you want to use, bank 0 being the default, for your purposes you will have to switch banks during reading and writing memory. It's all explained in the datasheets!.
AFAIK all mid-range PIC's work like this, I think high-range ones have more 'user friendly' memory.
You need to select which bank you want to use, bank 0 being the default, for your purposes you will have to switch banks during reading and writing memory. It's all explained in the datasheets!.
You need to select which bank you want to use, bank 0 being the default, for your purposes you will have to switch banks during reading and writing memory. It's all explained in the datasheets!.
You can include them or not, it's up to you, but as they are common to all banks it's probably better to use them for something else rather than waste them as plain storage - an obvious use for some of them would be as indexes into the ram buffer.
As I had mentioned, the suitable number of samples for my project is 128. How can I apply to my project (to make it use 128 samples) :?: Do I need to built extra circuit :idea:
Which type of active low-pass filter should I design at my input stage? (for the 2nd op-amp of the analogue circuitry) :idea: How many poles do I need? One more thing I want to ask about the analogue circuitry - for the 3 inputs, can I input let say -5 to 5V to the first input and the circuit will change it to 0-5V? What will happen if I input 0-10V? Also, what is the maximum AC voltage that the analogue circuitry can handle? :roll: