Skip to content

Commit

Permalink
Added layouts for ESP32 boards
Browse files Browse the repository at this point in the history
  • Loading branch information
Twilight-Logic committed Feb 16, 2024
1 parent 3034bd4 commit 60018c0
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/AR488/AR488.ino
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "AR488_Eeprom.h"


/***** FWVER "AR488 GPIB controller, ver. 0.51.26, 24/12/2023" *****/
/***** FWVER "AR488 GPIB controller, ver. 0.51.28, 16/02/2024" *****/
/*
Arduino IEEE-488 implementation by John Chajecki
Expand Down
13 changes: 9 additions & 4 deletions src/AR488/AR488_Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


/***** Firmware version *****/
#define FWVER "AR488 GPIB controller, ver. 0.51.26, 24/12/2023"
#define FWVER "AR488 GPIB controller, ver. 0.51.28, 16/02/2024"



Expand Down Expand Up @@ -65,10 +65,15 @@
/* Board/layout selection */
#define AR488_MEGA644P_MCGRAW

/***** ESP 32 VROOM-32 *****/
/***** ESP32 boards *****/
#elif defined(ESP32)
#define NON_ARDUINO
#define ESP32_WROOM_32
#define NON_ARDUINO // MUST BE DEFINED!
#define ESP32_DEVKIT1_WROOM_32
// David Douard / Johann Wilhelm board layouts
//#define ESP32_TTGO_T8_161
//#define ESP32_ESP32DEV
//#define ESP32_LOLIN32_161 // ESP32_LOLIN32_161_V2 profile has the same pin assigments
//#define ESP32_S2_161

/***** RPI PIco and Pico W *****/
//#elif defined(ARDUINO_ARCH_RP2040)
Expand Down
2 changes: 1 addition & 1 deletion src/AR488/AR488_Layouts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "AR488_Config.h"
#include "AR488_Layouts.h"

/***** AR488_Hardware.cpp, ver. 0.51.26, 24/12/2023 *****/
/***** AR488_Hardware.cpp, ver. 0.51.28, 16/02/2024 *****/
/*
* Hardware layout function definitions
*/
Expand Down
137 changes: 131 additions & 6 deletions src/AR488/AR488_Layouts.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "AR488_Config.h"


/***** AR488_Hardware.h, ver. 0.51.26, 24/12/2023 *****/
/***** AR488_Hardware.h, ver. 0.51.28, 16/02/2024 *****/
/*
* Hardware pin layout definitions
*/
Expand Down Expand Up @@ -316,7 +316,7 @@ uint8_t getMcpIntAReg();
/***********************************/
/***** ESP32 LAYOUT DEFINITION *****/
/***** vvvvvvvvvvvvvvvvvvvvvvv *****/
#ifdef ESP32_WROOM_32
#ifdef ESP32_DEVKIT1_WROOM_32

#define DIO1_PIN 32 /* GPIB 1 */
#define DIO2_PIN 33 /* GPIB 2 */
Expand All @@ -327,23 +327,148 @@ uint8_t getMcpIntAReg();
#define DIO7_PIN 4 /* GPIB 15 */
#define DIO8_PIN 13 /* GPIB 16 */

#define IFC_PIN 23 /* GPIB 9 */
#define NDAC_PIN 22 /* GPIB 8 */
#define NRFD_PIN 21 /* GPIB 7 */
#define IFC_PIN 23 /* GPIB 9 */
#define NDAC_PIN 22 /* GPIB 8 */
#define NRFD_PIN 21 /* GPIB 7 */
#define DAV_PIN 19 /* GPIB 6 */
#define EOI_PIN 18 /* GPIB 5 */

#define SRQ_PIN 5 /* GPIB 10 */
#define REN_PIN 17 /* GPIB 17 */
#define ATN_PIN 16 /* GPIB 11 */

#endif // ESP32_WROOM_32
#endif // ESP32_DEVKIT1_WROOM_32
/***** ^^^^^^^^^^^^^^^^^^^^^^^ *****/
/***** ESP32 LAYOUT DEFINITION *****/
/***********************************/



/***********************************************/
/***** ESP32_TTGO_T8_161 LAYOUT DEFINITION *****/
/***** vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv *****/
#ifdef ESP32_TTGO_T8_161

#define DIO1_PIN 34 /* GPIB 1 */
#define DIO2_PIN 35 /* GPIB 2 */
#define DIO3_PIN 32 /* GPIB 3 */
#define DIO4_PIN 33 /* GPIB 4 */
#define DIO5_PIN 25 /* GPIB 13 */
#define DIO6_PIN 26 /* GPIB 14 */
#define DIO7_PIN 27 /* GPIB 15 */
#define DIO8_PIN 14 /* GPIB 16 */

#define IFC_PIN 15 /* GPIB 9 */
#define NDAC_PIN 22 /* GPIB 8 */
#define NRFD_PIN 19 /* GPIB 7 */
#define DAV_PIN 23 /* GPIB 6 */
#define EOI_PIN 18 /* GPIB 5 */

#define SRQ_PIN 2 /* GPIB 10 */
#define REN_PIN 13 /* GPIB 17 */
#define ATN_PIN 5 /* GPIB 11 */

#endif // ESP32_TTGO_T8_161
/***** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ *****/
/***** ESP32_TTGO_T8_161 LAYOUT DEFINITION *****/
/****************************************************/



/********************************************/
/***** ESP32_ESP32DEV LAYOUT DEFINITION *****/
/***** vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv *****/
#ifdef ESP32_ESP32DEV

#define DIO1_PIN 33 /* GPIB 1 */
#define DIO2_PIN 32 /* GPIB 2 */
#define DIO3_PIN 26 /* GPIB 3 */
#define DIO4_PIN 25 /* GPIB 4 */
#define DIO5_PIN 14 /* GPIB 13 */
#define DIO6_PIN 27 /* GPIB 14 */
#define DIO7_PIN 13 /* GPIB 15 */
#define DIO8_PIN 12 /* GPIB 16 */

#define IFC_PIN 22 /* GPIB 9 */
#define NDAC_PIN 21 /* GPIB 8 */
#define NRFD_PIN 19 /* GPIB 7 */
#define DAV_PIN 18 /* GPIB 6 */
#define EOI_PIN 17 /* GPIB 5 */

#define SRQ_PIN 16 /* GPIB 10 */
#define REN_PIN 23 /* GPIB 17 */
#define ATN_PIN 4 /* GPIB 11 */

#endif // ESP32_ESP32DEV
/***** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ *****/
/***** ESP32_ESP32DEV LAYOUT DEFINITION *****/
/********************************************/



/***********************************************/
/***** ESP32_LOLIN32_161 LAYOUT DEFINITION *****/
/***** vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv *****/
#ifdef ESP32_LOLIN32_161

#define DIO1_PIN 32 /* GPIB 1 */
#define DIO2_PIN 33 /* GPIB 2 */
#define DIO3_PIN 25 /* GPIB 3 */
#define DIO4_PIN 26 /* GPIB 4 */
#define DIO5_PIN 27 /* GPIB 13 */
#define DIO6_PIN 14 /* GPIB 14 */
#define DIO7_PIN 12 /* GPIB 15 */
#define DIO8_PIN 13 /* GPIB 16 */

#define IFC_PIN 21 /* GPIB 9 */
#define NDAC_PIN 19 /* GPIB 8 */
#define NRFD_PIN 23 /* GPIB 7 */
#define DAV_PIN 18 /* GPIB 6 */
#define EOI_PIN 17 /* GPIB 5 */

#define SRQ_PIN 4 /* GPIB 10 */
#define REN_PIN 22 /* GPIB 17 */
#define ATN_PIN 16 /* GPIB 11 */

#endif // ESP32_LOLIN32_161
/***** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ *****/
/***** ESP32_LOLIN32_161 LAYOUT DEFINITION *****/
/***********************************************/



/***********************************************/
/***** ESP32_S2_161 LAYOUT DEFINITION *****/
/***** vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv *****/
#ifdef ESP32_S2_161

#define DIO1_PIN 1 /* GPIB 1 */
#define DIO2_PIN 2 /* GPIB 2 */
#define DIO3_PIN 3 /* GPIB 3 */
#define DIO4_PIN 4 /* GPIB 4 */
#define DIO5_PIN 5 /* GPIB 13 */
#define DIO6_PIN 6 /* GPIB 14 */
#define DIO7_PIN 7 /* GPIB 15 */
#define DIO8_PIN 8 /* GPIB 16 */

#define IFC_PIN 10 /* GPIB 9 */
#define NDAC_PIN 11 /* GPIB 8 */
#define NRFD_PIN 12 /* GPIB 7 */
#define DAV_PIN 13 /* GPIB 6 */
#define EOI_PIN 14 /* GPIB 5 */

#define SRQ_PIN 16 /* GPIB 10 */
#define REN_PIN 9 /* GPIB 17 */
#define ATN_PIN 15 /* GPIB 11 */

#endif // ESP32_S2_161
/***** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ *****/
/***** ESP32_S2_161 LAYOUT DEFINITION *****/
/***********************************************/




/*************************************/
/***** PI PICO LAYOUT DEFINITION *****/
/***** vvvvvvvvvvvvvvvvvvvvvvvvv *****/
Expand Down

0 comments on commit 60018c0

Please sign in to comment.