fdr1-modbus-slave/includes/config.h
2026-03-09 15:08:40 +01:00

71 lines
1.4 KiB
C

/*
* File: config.h
* Author: JR
*
* Created on May 6, 2024, 2:50 PM
*
* All configurable parameters are defined here
*
*/
#ifndef CONFIG_H
#define CONFIG_H
// MCU frequency
#define FOSC 32000000 // 8MHz crystal *4 (PLL) = 32MHz
#define _XTAL_FREQ FOSC
#endif
#include "sysconfig.h"
/* Pin Mapping:
*
* Port #4 #2 Func Wire to
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* RA0 2 2 RLD Red LED (limits out of range)
* RA1 3 3 BLD Blue LED (activity)
* RA2 3 4 GLD Green LED (speed)
* RA3 5 5 QEA QEA
* RA4 6 6 QEB QEB
* RA5 7 XX Qenable (reserved/unused)
* RA6 14 10 O Rotation out
* RA7 13 XX
* RB0 33 21 Carriage Step
* RB1 34 22 O Motor Step
* RB2 35 23 Carriage Dir
* RB3 36 24 O Motor Dir
* RB4 37 25 O Motor Enable
* RB5 38 26 P PGM
* RB6 39 27 P PGC
* RB7 40 28 P PGD
* RC0 15 11 Carriage Enable
* RC1 16 12 O DialReq
* RC2 17 13 I DialData
* RC3 18 14 INT0 DialClk
* RC4 23 15 INT1 Btn_Reset_Dist
* RC5 24 16 INT2 Btn_Reset_Limits
* RC6 25 17 TX RS232 TX
* RC7 26 18 RX RS232 RX
* RD0 19 XX
* RD1 20 XX
* RD2 21 XX
* RD3 22 XX
* RD4 27 XX
* RD5 28 XX
* RD6 29 XX
* RD7 30 XX
* RE0 8 XX
* RE1 9 XX
* RE2 10 XX
* RE3 1 1 P VPP
*
*
* Peripherals:
* QEI: 16 bit Motion Feedback (IC+QEI)
* Timer0: 16 bit
* Timer1: 16 bit
* Timer2: 8 bit RTC ?
* Timer5: 16 bit Motor rotation control / Next: Reserved: Velocity measure
*/