You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

46 lines
964 B

  1. #ifndef CONFIG_H
  2. #define CONFIG_H
  3. #define CONFIGWORD (WDTDIS & PWRTEN & MCLREN & BOREN & LVPEN & HS)
  4. #define FOSC 4000000
  5. /* Max standard baudrate with FOSC=4000000 is 19200 */
  6. /* Max standard baudrate with FOSC=18432000 is 230400 */
  7. /* Max standard baudrate with FOSC=20000000 is 115200 */
  8. #define BAUDRATE 9600L
  9. typedef unsigned char uint8_t;
  10. typedef signed char sint8_t;
  11. typedef unsigned int uint16_t;
  12. typedef signed int sint16_t;
  13. typedef unsigned long uint32_t;
  14. typedef signed long uint32_t;
  15. /* Serial */
  16. #define RX RB1
  17. #define TRISRX TRISB1
  18. #define TX RB2
  19. #define TRISTX TRISB2
  20. /* DAC */
  21. #define D15 RB7
  22. #define D14 RB6
  23. #define D13 RB5
  24. #define D12 RB3
  25. #define D11 RA3
  26. #define D10 RA2
  27. #define D9 RA1
  28. #define D8 RA0
  29. #define LDAC RB0
  30. #define TRIS_D15 TRISB7
  31. #define TRIS_D14 TRISB6
  32. #define TRIS_D13 TRISB5
  33. #define TRIS_D12 TRISB3
  34. #define TRIS_D11 TRISA3
  35. #define TRIS_D10 TRISA2
  36. #define TRIS_D9 TRISA1
  37. #define TRIS_D8 TRISA0
  38. #define TRIS_LDAC TRISB0
  39. #endif