How to get Arduino Mega 2560 and SSC-32U to talk?

Struggling here…

I have a Phoenix Hexapod with a SSC-32U control board linked to a Arduino Meg 2560 running Phoenix code (downloaded from LynxMotion)

I have a SSC-32U set to 115200 baud and I assume wired correctly.

i.imgur.com/uGBAM4z.jpg
i.imgur.com/LOMrp14.jpg

I did have to change one section in the Botboarduino code
DBGSerial.println("!!!"); changed to DBGSerial.println("***");

The !!! drops the mega into monitoring and hangs the upload.

I’ve tested the PS2 wiring seperatly and it works…

I’m using the TX0 serial ports on the mega.

They won’t talk…

SSC-32 has been tested with the control software… Everything works by USB to PC.

Hex_Config.h config section

[code] //comment if terminal monitor is not required
#define OPT_TERMINAL_MONITOR

//uncomment the board you want to use
#define BOTBOARDUINO //botboarduino board
//#define BOTBOARD_ARDUINOPROMINI //arduino pro mini on botboard (originally for BasicAtomPro)

//====================================================================
#ifdef OPT_TERMINAL_MONITOR // turning off terminal monitor will turn these off as well…
#define OPT_SSC_FORWARDER // only useful if terminal monitor is enabled
#define OPT_FIND_SERVO_OFFSETS // Only useful if terminal monitor is enabled
#endif

#define OPT_GPPLAYER

// Which type of control(s) do you want to compile in
#define DBGSerial Serial

#if defined(UBRR1H)
#define SSCSerial Serial1
#else
#endif

#define USEPS2

//===================================================================
//===================================================================
//===================================================================
// CHR-3
//===================================================================
#define USE_SSC32
//#define cSSC_BINARYMODE 1 // Define if your SSC-32 card supports binary mode.

//[SERIAL CONNECTIONS]

// Warning I will undefine some components as the non-megas don’t have enough memory…
//#undef OPT_FIND_SERVO_OFFSETS

#define cSSC_BAUD 115200 //SSC32 BAUD rate

//--------------------------------------------------------------------
//[Botboarduino Pin Numbers]
#ifdef BOTBOARDUINO
#define SOUND_PIN 13 // Botboarduino JR pin number
#define PS2_DAT 10
#define PS2_CMD 9
#define PS2_SEL 8 // On the PS2 receiver this pin may be called ATT (attention)
#define PS2_CLK 11
// If we are using a SSC-32 then:
// If were are running on an Arduino Mega we will use one of the hardware serial port, default to Serial1 above.
// If on Non mega, if the IO pins are set to 0, we will overload the hardware Serial port
// Else we will user SoftwareSerial to talk to the SSC-32
#define cSSC_OUT 1 //Output pin for Botboard - Input of SSC32 (Yellow)
#define cSSC_IN 0 //Input pin for Botboard - Output of SSC32 (Blue)
#endif

#ifdef BOTBOARD_ARDUINOPROMINI
#define SOUND_PIN 13 // Bot Board JR pin number (with Arduino Pro Mini plugged)
#define PS2_DAT 10
#define PS2_CMD 9
#define PS2_SEL 8
#define PS2_CLK 11
// If we are using a SSC-32 then:
// If were are running on an Arduino Mega we will use one of the hardware serial port, default to Serial1 above.
// If on Non mega, if the IO pins are set to 0, we will overload the hardware Serial port
// Else we will user SoftwareSerial to talk to the SSC-32
#define cSSC_OUT 1 //Output pin for Botboard - Input of SSC32 (Yellow)
#define cSSC_IN 0 //Input pin for Botboard - Output of SSC32 (Blue)
#endif[/code]

Hi,

Your wiring does seem good.

Since the Arduino Mega 2560 does not officially support the Phoenix code, we recommend that you first start testing it without making any changes.

First, obtain a new copy of the code and use it with no modifications to it (leave it in software serial mode at 38400 using the default pins).
Then, change the SSC-32U to 38400 baud rate (red on, green off). Finally, rewire the SSC-32U to the Arduino Mega 2560 to use the pins 13/12.

We cannot ensure that this will work properly and it will probably require more debugging from you.

If you can’t make it work after trying the above test, please try to program your Mega with a simpler test than the Phoenix code. Maybe a simple servo rotation program that loops sending movement commands to one servo channel.
You can find more information on the commands of the SSC-32U on pages 26-28 of the SSC-32U manual here.

Sincerely,

Well I noticed that my Uno has the same 328 cpu as the pro mini.

I set the define to pro mini, set the pins and uploaded. it works :slight_smile: