Perhaps you should put an invertor stage between the Tx of the Arduino and the Max232 adapter.
I connected the K8056 without the Max232 adapter but with the invertor
Using the SoftwareSerial I got it to work
#include <SoftwareSerial.h>
#define rxPin 2
#define txPin 3SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin);
byte pinState = 0;void setup()
{
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);// pinMode(ledPin, OUTPUT);
// set the data rate for the SoftwareSerial port
mySerial.begin(2400);
// Serial.begin(2400);}
int relayon[] = {13, 01, 84, 49, 109, 13, 01, 84, 49, 109, 13, 01, 84, 49,
109, 13, 01, 84, 49, 109};
void loop(){for (int i = 0; i < 5; i++) {
mySerial.print(relayon*,BYTE);*
}
delay (3000);
}
[/quote]
What I did is connected the Tx port of the arduino to pin 1 of an ULN2003 invertor
Pin 18 with a 330 Ohm resitor to +5V
Pin 18 to the serial Rx port of the K8056.
I modified the program to use the toggle function.
Jarimacfed