using_pic18f4620
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
using_pic18f4620 [2006/09/18 09:43] – gertius | using_pic18f4620 [2011/11/18 12:14] (current) – removed spam lpdunwell | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Using the PIC18F4620 or PIC18F4520 ====== | ====== Using the PIC18F4620 or PIC18F4520 ====== | ||
+ | |||
+ | FIXME This is really outdated!!! | ||
Historically, | Historically, | ||
Line 9: | Line 11: | ||
====== OS Layers ====== | ====== OS Layers ====== | ||
- | MIOS v1.9b or above is required. You will need to download the MIOS source from | + | MIOS v1.9b or above is required. You will need to download the MIOS source from |
\\ | \\ | ||
The Bootloader and MIOS recompile steps which follow should not be necessary for most cases of '4620 use, as these components are now available precompiled and packaged in a zip file [[http:// | The Bootloader and MIOS recompile steps which follow should not be necessary for most cases of '4620 use, as these components are now available precompiled and packaged in a zip file [[http:// | ||
Line 162: | Line 164: | ||
goto MIOS_HLP_Dec2BCD | goto MIOS_HLP_Dec2BCD | ||
</ | </ | ||
+ | |||
==== Linker Script ==== | ==== Linker Script ==== | ||
+ | |||
Modifications should be made to the linker script in order to take advantage of the additional capabilities of the 4620/ | Modifications should be made to the linker script in order to take advantage of the additional capabilities of the 4620/ | ||
Line 251: | Line 255: | ||
\\ | \\ | ||
==Extended Bank Capacity== | ==Extended Bank Capacity== | ||
+ | |||
+ | __**Be Careful doing this!!**__ | ||
+ | This can do weird things like make variables always = 0 where the memory that variable is stored in, crosses boundaries of 256b blocks. Do not make banks any larger than required, and try to let them begin at round numbers (100, 200, 300,...). This still might not even work. - stryd_one | ||
+ | |||
The above change will enable SDCC to allocate the variables in your application to any of the specified banks above. The very observant among you may have noticed that these banks are 256 bits each.... So what happens if you want to use a variable which is greater than 256 bits in size, such as a large array, or string of characters? For this, you will need to create a bank of extended size, and you will need to direct your application to use that bank to store your large variable. | The above change will enable SDCC to allocate the variables in your application to any of the specified banks above. The very observant among you may have noticed that these banks are 256 bits each.... So what happens if you want to use a variable which is greater than 256 bits in size, such as a large array, or string of characters? For this, you will need to create a bank of extended size, and you will need to direct your application to use that bank to store your large variable. | ||
Line 296: | Line 304: | ||
\\ | \\ | ||
- | Or of course you could make the whole lot into one bank if you wanted to: | + | Or of course you could make the whole lot into one bank if you wanted to. This is NOT recommended though!: |
< | < | ||
DATABANK | DATABANK | ||
Line 329: | Line 337: | ||
You may create as many or as few sections as you require for your application. | You may create as many or as few sections as you require for your application. | ||
+ | |||
+ | |||
==== Application Code ==== | ==== Application Code ==== | ||
Line 340: | Line 350: | ||
< | < | ||
#pragma udata b512 MIDI_Table | #pragma udata b512 MIDI_Table | ||
- | unsigned | + | unsigned |
</ | </ | ||
+ | |||
+ | **It is recommended to avoid this wherever possible.** Allow the compiler to allocate the memory wherever possible! | ||
+ | |||
+ | Check [[http:// | ||
\\ | \\ |
using_pic18f4620.1158572600.txt.gz · Last modified: 2006/10/15 09:35 (external edit)