welcome: please sign in
location: UsefulFunctions


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)