mirror of
https://codeberg.org/mclemens/ubitxv6.git
synced 2025-02-21 06:57:27 -05:00
Clean up pin descriptions a bit
This commit is contained in:
parent
80494b62b9
commit
91776fdcc7
@ -1,52 +1,49 @@
|
||||
#pragma once
|
||||
|
||||
/* The ubitx is powered by an arduino nano. The pin assignment is as folows
|
||||
*
|
||||
/*
|
||||
* Pin configurations for uBiTXv6
|
||||
*
|
||||
* Attached devices are:
|
||||
* * A rotory encoder for tuning, which has a built-in push button for selection
|
||||
* * A Push-to-talk button input
|
||||
* * A morse keyer input, using analog voltage divider for paddle support
|
||||
* * A SI5351A 3-output frequency generator
|
||||
* * A model tjctm24028-spi touch screen LCD, which has:
|
||||
* * An ILI9341 display controller
|
||||
* * A XPT2046 touch controller
|
||||
* * A TX/RX output control pin
|
||||
* * A tone output pin to provide audio feedback to the operator when sending CW
|
||||
* * Three filter selection output control pins
|
||||
* * A CW keydown output
|
||||
* * Optionally, a serial CAT interface
|
||||
*/
|
||||
|
||||
static const uint8_t PIN_ENC_A = A0; // Tuning encoder interface
|
||||
static const uint8_t PIN_ENC_B = A1; // Tuning encoder interface
|
||||
static const uint8_t PIN_ENC_PUSH_BUTTON = A2; // Tuning encoder interface
|
||||
static const uint8_t PIN_PTT = A3; // Sense it for ssb and as a straight key for cw operation
|
||||
//A4 is I2C SDA
|
||||
//A5 is I2C SCK
|
||||
static const uint8_t PIN_ANALOG_KEYER = A6; // This is used as keyer. The analog port has 4.7K pull up resistor. Details are in the circuit description on www.hfsignals.com
|
||||
static const uint8_t PIN_ANALOG_SPARE = A7; // Not used yet
|
||||
|
||||
static const uint8_t PIN_TX_RXn = 7; // Pin from the Nano to the radio to switch to TX (HIGH) and RX(LOW)
|
||||
static const uint8_t PIN_CW_TONE = 6; // Generates a square wave sidetone while sending the CW.
|
||||
static const uint8_t PIN_TX_LPF_A = 5; // The 30 MHz LPF is permanently connected in the output of the PA...
|
||||
//13 is SPI CLK
|
||||
//12 is SPI MISO
|
||||
//11 is SPI MOSI
|
||||
static const uint8_t PIN_TFT_CS = 10; // Selects the LCD controller on SPI interface (active low)
|
||||
static const uint8_t PIN_TFT_DC = 9; // Tells the LCD controller if it's getting data (D, high) or commands (C, low)
|
||||
static const uint8_t PIN_TOUCH_CS = 8; // Selects the touch controller on SPI interface (active low)
|
||||
static const uint8_t PIN_TX_RXn = 7; // Pin from the Nano to the radio to switch to TX (HIGH) and RX(LOW)
|
||||
static const uint8_t PIN_CW_TONE = 6; // Generates a square wave sidetone while sending the CW
|
||||
static const uint8_t PIN_TX_LPF_A = 5; // The 30 MHz LPF is permanently connected in the output of the PA...
|
||||
static const uint8_t PIN_TX_LPF_B = 4; // ...Alternatively, either 3.5 MHz, 7 MHz or 14 Mhz LPFs are...
|
||||
static const uint8_t PIN_TX_LPF_C = 3; // ...switched inline depending upon the TX frequency
|
||||
static const uint8_t PIN_CW_KEY = 2; // Pin goes high during CW keydown to transmit the carrier.
|
||||
// ... The PIN_CW_KEY is needed in addition to the TX/RX key as the...
|
||||
// ...key can be up within a tx period
|
||||
|
||||
|
||||
/** pin assignments
|
||||
14 T_IRQ 2 std changed
|
||||
13 T_DOUT (parallel to SOD/MOSI, pin 9 of display)
|
||||
12 T_DIN (parallel to SDI/MISO, pin 6 of display)
|
||||
11 T_CS 9 (we need to specify this)
|
||||
10 T_CLK (parallel to SCK, pin 7 of display)
|
||||
9 SDO(MSIO) 12 12 (spi)
|
||||
8 LED A0 8 (not needed, permanently on +3.3v) (resistor from 5v,
|
||||
7 SCK 13 13 (spi)
|
||||
6 SDI 11 11 (spi)
|
||||
5 D/C A3 7 (changable)
|
||||
4 RESET A4 9 (not needed, permanently +5v)
|
||||
3 CS A5 10 (changable)
|
||||
2 GND GND
|
||||
1 VCC VCC
|
||||
|
||||
The model is called tjctm24028-spi
|
||||
it uses an ILI9341 display controller and an XPT2046 touch controller.
|
||||
*/
|
||||
|
||||
static const uint8_t PIN_TFT_DC = 9;
|
||||
static const uint8_t PIN_TFT_CS = 10;
|
||||
static const uint8_t PIN_TOUCH_CS = 8; //this is the pin to select the touch controller on spi interface
|
||||
static const uint8_t PIN_CW_KEY = 2; // Pin goes high during CW keydown to transmit the carrier.
|
||||
// ... The PIN_CW_KEY is needed in addition to the TX/RX key as the...
|
||||
// ...key can be up within a tx period
|
||||
//1 is UART RX
|
||||
//0 is UART TX
|
||||
|
||||
int enc_read(void); // returns the number of ticks in a short interval, +ve in clockwise, -ve in anti-clockwise
|
||||
void enc_setup(void); // Setups up initial values and interrupts.
|
||||
int btnDown(); //returns true if the encoder button is pressed
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user