SSP & SIO serial protocol with Mega 2560

hi guys.

I'm trying to communicate an arduino mega 2560 with BV100 note validator. This note validator can support many interface protocol like sio, ssp, pulse, cctalk and many more.

i already read and follow this thread in the forum and use the sketch and schematic given, i also setup my BV100 to SIO mode but its not working.

https://forum.arduino.cc/index.php?topic=125119.0

output at serial monitor just 0 when i insert MYR1, MYR5 MYR10 like this:

0
0
0
0
0
0

i also try to print in dec, hec, bin.
when i change the baudrate in sketch and at monitor to 300, weird words showing on serial monitor.

i'm sure that i've follow the schematic correctly. Common ground connected.

Can someone explain me what different with this two protocol. and how to coding to receive and transmit the data to this note validator using this two protocol?

Which protocol should i use to when i connect TX pin from validator to RX pin on Arduino directly?
or any suggestion to use RS232 shield?

i'm not really good in communication :frowning:
hope someone can help me finish this project. sorry for my bad english

here the codes i use:

void setup()
{
 Serial.begin(9600);
}

void loop()
{
 if( Serial.available() > 0)
 {    
   Serial.println(Serial.read()); 
 }
}

The thread you linked to connects to a BV20, not a BV100.

Post an image of the schematics you use, I cannot find a schematic picture in that thread.

Can someone explain me what different with this two protocol. and how to coding to receive and transmit the data to this note validator using this two protocol?

Which two protocols? You mentioned only SIO.

or any suggestion to use RS232 shield?

No, the manual (which you forgot to link to!) explicitly states that the SIO interface has TTL levels.

As you have a Mega2560 why do you use the first serial interface to communicate with the BV100? That way trouble is guaranteed.

hi mr pylon, thanks for the reply.

here the link for BV100 manual:

page 8 --> protocol that available on BV100
page 10 --> connector pins detail
page 18 --> detail about SIO protocol on BV100

this my connection between mega and BV100:

as you mention SIO has TTL levels, so i dont need rs232 shield when im using SIO. am i right?
thanks again for your reply!

as you mention SIO has TTL levels, so i dont need rs232 shield when im using SIO. am i right?

Correct.

How did you setup the SIO mode on your BV100? Did you print the mentioned configuration cards and used it?

this my connection between mega and BV100:

If you have a Mega, please don't use pin0 (RX0) for the BV100 connection but for example RX1 (pin 19). You have to change the serial object for the reception to Serial1 in the code.

hi pylon, thanks again for your reply.

i setup bv100 to SIO using software ITL Validator Manager that i've download from official website.

this BV100 already programmed in MDB interface by another programmer before. i think using SIO is simpler like using HC06 bluetooth(i experienced using this module before).
so i want to change interface to SIO.

in the software, i open tab that named "Program"
here the picture:

then at bottom right i choose SIO interface and click "Set Interface" button.

then the software tell that machine already in SIO mode.
any step missing? or i also need use configuration card?

what should i do to make this machine working with arduino? anyone experienced with this machine?

i really appreciate your reply, mr pylon.

Did you read the last two sentences in my last answer?

Yes. I already change to use extra serial pin on mega. I also try on my uno and nano by use software serial library :frowning:

Thanks again for your reply, pylon

I also try on my uno and nano by use software serial library

That's a rather bad idea. SoftwareSerial is a crippled piece of software. You should use it only if you really have no chance to do your project an other way.

Yes. I already change to use extra serial pin on mega.

Then please post a new wiring diagram and the changed code.

the wiring same like before. i just change from 0(rx) to pin 19(rx) on mega. and the the code from
"Serial.begin" to "Serial1.begin"
"Serial.available" to "Serial1.available"

the wiring same like before. i just change from 0(rx) to pin 19(rx) on mega. and the the code from
"Serial.begin" to "Serial1.begin"
"Serial.available" to "Serial1.available"

In that case you missed the Serial.read() that should be a Serial1.read().

Is it so much work to copy the complete new code to the forum?

here my code

//#include <SoftwareSerial.h>

//since 8 and 9 don't work on the Mega
//SoftwareSerial BVpin(10, 11);  //rx, tx

void setup() {
  Serial.begin(9600); 
  Serial1.begin(9600);
  Serial.println("ready");
}

void loop() {

  if (Serial1.available()>0)
  {
    int fromBV = Serial1.read();
    Serial.print("raw: "); Serial.print(fromBV);
    Serial.print("  BIN: "); Serial.print(fromBV, BIN);
    Serial.print("  DEC: "); Serial.print(fromBV, DEC);
    Serial.print("  OCT: "); Serial.print(fromBV, OCT);
    Serial.print("  HEX: "); Serial.println(fromBV, HEX); 
  }
}

And what output do you get with this code?

also same like before. only get "0"

thanks pylon for your reply. i really appreciate that.

currently i using pulse protocol interface at pin 3 arduino. its working.
but i just want to know why its not working when i use SIO interface. thats why i still on this thread

also same like before. only get "0"

I cannot believe that, no with above code. I would at least expect some words "raw", "OCT", "BIN", etc.

Do you have the possibility to use a scope or logic analyzer?

pylon:
I cannot believe that, no with above code. I would at least expect some words "raw", "OCT", "BIN", etc.

i mean i get "raw 0"

"fromBV" is 0

That means you receive at least a start bit which has to be a falling edge on the signal line. I'd guess now that you either have the wrong baud rate or there's a connection problem.

Try to analyze the signal with a logic analyzer or a scope. If you don't own such a device there are solutions on the net that let an Arduino do the hardware side if only slow frequencies are used (that should be the case here).
If you ask Google for "Arduino Logic Analyzer" you get enough results, for example SUMP compatible output (GUI is on sump.org).