p18fxxx.inc 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. ;--------------------------------------------------------------------------
  2. ; p18fxxx.inc
  3. ;
  4. ; Copyright (C) 2005, Vangelis Rokas <vrokas AT otenet.gr>
  5. ;
  6. ; This library is free software; you can redistribute it and/or modify it
  7. ; under the terms of the GNU General Public License as published by the
  8. ; Free Software Foundation; either version 2, or (at your option) any
  9. ; later version.
  10. ;
  11. ; This library is distributed in the hope that it will be useful,
  12. ; but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ; GNU General Public License for more details.
  15. ;
  16. ; You should have received a copy of the GNU General Public License
  17. ; along with this library; see the file COPYING. If not, write to the
  18. ; Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
  19. ; MA 02110-1301, USA.
  20. ;
  21. ; As a special exception, if you link this library with other files,
  22. ; some of which are compiled with SDCC, to produce an executable,
  23. ; this library does not by itself cause the resulting executable to
  24. ; be covered by the GNU General Public License. This exception does
  25. ; not however invalidate any other reasons why the executable file
  26. ; might be covered by the GNU General Public License.
  27. ;--------------------------------------------------------------------------
  28. #ifndef __P18FXXX__
  29. #define __P18FXXX__ 1
  30. list r=dec, n=96, st=off, mm=off
  31. nolist
  32. ; This header file defines configurations, registers, and other useful bits of
  33. ; information common to all PIC18Fxxx microcontrollers.
  34. FSR0 equ 0
  35. FSR1 equ 1
  36. FSR2 equ 2
  37. FAST equ 1
  38. W equ 0
  39. A equ 0
  40. ACCESS equ 0
  41. BANKED equ 1
  42. ; Register Files
  43. TOSU equ 0x0FFF
  44. TOSH equ 0x0FFE
  45. TOSL equ 0x0FFD
  46. STKPTR equ 0x0FFC
  47. PCLATU equ 0x0FFB
  48. PCLATH equ 0x0FFA
  49. PCL equ 0x0FF9
  50. TBLPTRU equ 0x0FF8
  51. TBLPTRH equ 0x0FF7
  52. TBLPTRL equ 0x0FF6
  53. TABLAT equ 0x0FF5
  54. PRODH equ 0x0FF4
  55. PRODL equ 0x0FF3
  56. INDF0 equ 0x0FEF
  57. POSTINC0 equ 0x0FEE
  58. POSTDEC0 equ 0x0FED
  59. PREINC0 equ 0x0FEC
  60. PLUSW0 equ 0x0FEB
  61. FSR0H equ 0x0FEA
  62. FSR0L equ 0x0FE9
  63. WREG equ 0x0FE8
  64. INDF1 equ 0x0FE7
  65. POSTINC1 equ 0x0FE6
  66. POSTDEC1 equ 0x0FE5
  67. PREINC1 equ 0x0FE4
  68. PLUSW1 equ 0x0FE3
  69. FSR1H equ 0x0FE2
  70. FSR1L equ 0x0FE1
  71. BSR equ 0x0FE0
  72. INDF2 equ 0x0FDF
  73. POSTINC2 equ 0x0FDE
  74. POSTDEC2 equ 0x0FDD
  75. PREINC2 equ 0x0FDC
  76. PLUSW2 equ 0x0FDB
  77. FSR2H equ 0x0FDA
  78. FSR2L equ 0x0FD9
  79. STATUS equ 0x0FD8
  80. PORTC equ 0x0F82
  81. PORTB equ 0x0F81
  82. PORTA equ 0x0F80
  83. ; Status Register Bit Definitions
  84. C equ 0
  85. DC equ 1
  86. Z equ 2
  87. OV equ 3
  88. N equ 4
  89. list
  90. #endif