![]() | ![]() | ![]() |
| | |||||||
| Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Thanks Exo!! But how can I know whether my PIC enough RAM to store the samples? For example, if I need 128 samples, how many RAM do i need? :roll: | |
| |
| | (permalink) | |
| Quote:
for 16 bit samples you would need 256 bytes, and so on | ||
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | ||
| Quote:
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. | |||
| |
| | (permalink) | |
| :wink: Thanks Nigel, I get the idea now!! YES! I'm using 8-bit sample. Quote:
| ||
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | |
| Quote:
The special function registers are addressed in the same banks of memory, so you don't get 127 bytes of RAM in a single bank. 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. This is all explained in the datasheet. | ||
| |
| | (permalink) |
| 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: | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | |
| Quote:
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: | ||
| |
| | (permalink) | ||
| Quote:
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. | |||
| |
| | (permalink) | |
| Thanks for your reply Nigel :wink: Quote:
By the way, is there any differences between PIC 16F628-04/P & PIC 16F628-20/P :?: | ||
| |
| | (permalink) | |||
| Quote:
Quote:
| ||||
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | |
| Quote:
| ||
| |