/
hardware.h
117 lines (92 loc) · 4.5 KB
/
hardware.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// Please read VController_v2.ino for information about the license and authors
#ifndef HARDWARE_H
#define HARDWARE_H
// This file contains all the hardware settings for the VController Production Model version 1.
// Make sure you include this file when updating to new firmware
// Allowable i2c rates:
// I2C_RATE_100, I2C_RATE_200, I2C_RATE_300, I2C_RATE_400, I2C_RATE_600, I2C_RATE_800, I2C_RATE_1000, I2C_RATE_1200,
// I2C_RATE_1500, I2C_RATE_1800, I2C_RATE_2000, I2C_RATE_2400, I2C_RATE_2800, I2C_RATE_3000
#define WIRE_SPEED I2C_RATE_1500 // Speed i2c port 1 (pin 17/18)
#define WIRE1_SPEED I2C_RATE_800 // Speed i2c port 2 (pin 29/30)
#define WireLQ Wire1 // Sets the i2c port for the main display to port 2 (Wire1)
// *** Pinout of the Teensy
#define POWER_PIN 4
#define POWER_SWITCH_PIN 5
#define POWER_SWITCH_NUMBER 13 // Power switch is same as switch 13: top left switch of VController.
#define INTA_PIN 2 // Digital Pin 2 of the Teensy is connected to INTA of the MCP23017 on the display boards
#define NEOPIXELLEDPIN 17 // The NeoPixel LEDs are connected to pin 17.
#define BACKLIGHTNEOPIXELPIN 3
#define NUMBER_OF_BACKLIGHTS 12
// Pin 15,16, 20, 21, 22, 23, 27 and 28 are used for switches. They are declared below
// *** Switches (internal)
#define NUMBER_OF_SWITCHES 16 // Number of internal switches
#define NUMBER_OF_EXTERNAL_SWITCHES 8
// If we have a switchpad, define it here
/*#define ROWS 4 //number of rows in switchpad
#define COLS 4 //number of columns in switchpad
#define ROWPINS 5, 4, 3, 2
#define COLUMNPINS 13, 12, 11, 6*/
// *** Switches and expression pedals (external)
#define NUMBER_OF_CTL_JACKS 4 // Number of jacks on the VController for connecting an expression pedal or two switches
// Pin numbers in the Teensy (digital tip, digital ring, analog tip, analog ring) - make sure you write the analog pin numbers as A0 and not just 0
#define JACK1_PINS 28, 14, A17, A0
#define JACK2_PINS 15, 16, A1, A2
#define JACK3_PINS 20, 21, A6, A7
#define JACK4_PINS 22, 23, A8, A9
#define JACK_PORT_PULLUP false // There are already pull-up resistors externally
// *** Neopixel LEDs
#define NUMBER_OF_LEDS 12 // Number of neopixel LEDs connected
#define LED_ORDER 0, 3, 6, 9, 1, 4, 7, 10, 2, 5, 8, 11 // The order in which the LEDs are connected
// *** Display settings of the main display - so far it is connected to a regular display board
#define DISPLAY_MAIN_ADDRESS 0x27
#define DISPLAY_MAIN_ADDRESS1 0x27
#define DISPLAY_MAIN_ADDRESS2 0x3F
// *** Individual displays above switches
#define NUMBER_OF_DISPLAY_BOARDS 4
#define NUMBER_OF_DISPLAYS 12
// Define the addresses and numbers of the displays using the VController display boards based on an MCP23017. Maximum 15 displays can be defined here.
// Make sure the number of displays here matches the NUMBER_OF_DIPLAYS variable.
// You cannot declare displays both here and in the next section.
#define DISPLAY_01_ADDRESS_AND_NUMBER 0x20, DISPLAY1
#define DISPLAY_02_ADDRESS_AND_NUMBER 0x21, DISPLAY1
#define DISPLAY_03_ADDRESS_AND_NUMBER 0x22, DISPLAY1
#define DISPLAY_04_ADDRESS_AND_NUMBER 0x23, DISPLAY1
#define DISPLAY_05_ADDRESS_AND_NUMBER 0x20, DISPLAY2
#define DISPLAY_06_ADDRESS_AND_NUMBER 0x21, DISPLAY2
#define DISPLAY_07_ADDRESS_AND_NUMBER 0x22, DISPLAY2
#define DISPLAY_08_ADDRESS_AND_NUMBER 0x23, DISPLAY2
#define DISPLAY_09_ADDRESS_AND_NUMBER 0x20, DISPLAY3
#define DISPLAY_10_ADDRESS_AND_NUMBER 0x21, DISPLAY3
#define DISPLAY_11_ADDRESS_AND_NUMBER 0x22, DISPLAY3
#define DISPLAY_12_ADDRESS_AND_NUMBER 0x23, DISPLAY3
// Define the addresses of the displays using regular i2C backpacks here. Maximum 15 displays can be defined here.
// Make sure the number of displays here matches the NUMBER_OF_DIPLAYS variable
/*
#define DISPLAY_01_ADDRESS 0x21
#define DISPLAY_02_ADDRESS 0x22
#define DISPLAY_03_ADDRESS 0x23
#define DISPLAY_04_ADDRESS 0x24
#define DISPLAY_05_ADDRESS 0x25
#define DISPLAY_06_ADDRESS 0x26
#define DISPLAY_07_ADDRESS 0x39
#define DISPLAY_08_ADDRESS 0x3A
#define DISPLAY_09_ADDRESS 0x3B
#define DISPLAY_10_ADDRESS 0x3D
#define DISPLAY_11_ADDRESS 0x20
#define DISPLAY_12_ADDRESS 0x3E
*/
#define BACKLIGHT_PIN 3
#define EN_PIN 2
#define RW_PIN 1
#define RS_PIN 0
#define D4_PIN 4
#define D5_PIN 5
#define D6_PIN 6
#define D7_PIN 7
// Expansion board Raspberry Pi running VCbridge
#define LINE_SELECT_CC_NUMBER 119
#define VCONTROLLER_MIDI_CHANNEL 16
// Set baudrate for MIDI3 - can be changed to allow for high speed connection to raspberry pi
//#define MIDI3_BAUD_RATE 115200
//#define MIDI3_BAUD_RATE 38400
#endif