Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
km said:if I need 128 samples, how many RAM do i need? :roll:
Exo said:If a sample is 8 bit then you need 128 bytes of ram,
for 16 bit samples you would need 256 bytes, and so on
km said:Exo said:If a sample is 8 bit then you need 128 bytes of ram,
for 16 bit samples you would need 256 bytes, and so on
I a bit confused.:? Can you explain to me by how many samples? eg: 256 samples are suitable for how many byte of RAM?
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.
km said:What do you mean by "have to select between banks accordingly"? :?:
Exo said: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...
km said: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:
Nigel Goodwin said: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.
km said:Nigel Goodwin said: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:
Nigel Goodwin said: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!.
km said:Thanks for your reply Nigel :wink:
Nigel Goodwin said: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!.
Is it mean that I have to store the first 80 bytes of samples in bank 0 then for the next 48 bytes of samples I can store in either bank 1 or bank 2?
By the way, is there any differences between PIC 16F628-04/P & PIC 16F628-20/P :?:
Nigel Goodwin said:For an example, the 16F628A (whose datasheet happens to be in front of me) has 224 bytes of RAM (GPR's).
80 bytes in bank 0.
80 bytes in bank 1.
48 bytes in bank 2.
0 bytes in bank 3.
These only add up to 208 bytes, the other 16 bytes are common to all 4 banks, and are the top 16 bytes of the 127 byte space.
km said:Is it compulsory to include the 16 bytes when storing the samples into the RAM? :roll: