welcome:
location: Diff for "UsefulFunctions"
Differences between revisions 3 and 7 (spanning 4 versions)
 ← Revision 3 as of 2010-08-07 09:16:50 → Size: 671 Editor: guest Comment: ← Revision 7 as of 2010-08-21 01:44:55 → Size: 1175 Editor: guest Comment: Deletions are marked like this. Additions are marked like this. Line 1: Line 1: === MICrODEC === Line 3: Line 5: Although it can be fun to reinvent the wheel, its often a lopsided wheel you end up with. Hopefully some of these functions can save you time and headache. Its also good to copy and paste from a single source, to reduce bugs and typos. This listing will be added to as we do more useful things. Let us know if you have a better method for any of the functions below. A complete file of these functions is here: [[attachment:useful_functions.asm|useful_functions.asm]] ----

MICrODEC

Useful Functions

Although it can be fun to reinvent the wheel, its often a lopsided wheel you end up with. Hopefully some of these functions can save you time and headache. Its also good to copy and paste from a single source, to reduce bugs and typos. This listing will be added to as we do more useful things. Let us know if you have a better method for any of the functions below.

A complete file of these functions is here: useful_functions.asm

1. reading and writing to the codec.
2. reading from the sram - 16b
3. reading from the sram - 18b
4. writing to the sram - 16b
5. writing to the sram - 18b
6. sampling the switch to change functions - no initialization
7. sampling the switch to change functions - with initialization
8. initialization routine
9. 16b signed x 16b signed to (16b or 32b) signed number
10. 16b signed x 8b unsigned to (16b or 24b) signed number
11. 16b signed x 16b unsigned to (16b or 32b) signed number
12. two's complement of 16b number
13. two's complement of 24b number
14. adding signed numbers of different lengths

UsefulFunctions (last edited 2010-08-21 01:44:55 by guest)