pic-config.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. File: pic-config.h
  3. Copyright (c) 2009,2013 Kustaa Nyholm / SpareTimeLabs
  4. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with this library; if not, write to the Free Software
  14. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  15. Version 1.1 Compatible with SDCC 3.x
  16. */
  17. __code char __at 0x300000 CONFIG1L = 0x20; // USBDIV=1, CPUDIV=00, PLLDIV = 000
  18. __code char __at 0x300001 CONFIG1H = 0x0E; // IESO=0, FCMEN=0, FOSC = 1110
  19. __code char __at 0x300002 CONFIG2L = 0x20; // Brown out off, PWRT On
  20. __code char __at 0x300003 CONFIG2H = 0x00; // WDT off
  21. __code char __at 0x300004 CONFIG3L = 0xff; // Unused configuration bits
  22. __code char __at 0x300005 CONFIG3H = 0x81; // Yes MCLR, PORTB digital, CCP2 - RC1
  23. __code char __at 0x300006 CONFIG4L = 0x80; // ICD off, ext off, LVP off, stk ovr off
  24. __code char __at 0x300007 CONFIG4H = 0xff; // Unused configuration bits
  25. __code char __at 0x300008 CONFIG5L = 0xff; // No __code read protection
  26. __code char __at 0x300009 CONFIG5H = 0xff; // No data/boot read protection
  27. __code char __at 0x30000A CONFIG6L = 0xff; // No __code write protection
  28. __code char __at 0x30000B CONFIG6H = 0xff; // No data/boot/table protection
  29. __code char __at 0x30000C CONFIG7L = 0xff; // No table read protection
  30. __code char __at 0x30000D CONFIG7H = 0xff; // No boot table protection