BioMax2 / KBio2-Online
Installation and Programming Manual
Page
22 of 91
6. Comunicación con el Host
BioMax2
and
KBio2-Online
electronics allows for several communication channels with
the Host. Establishing this communication is the first step towards correctly configuring
the electronics.
BioMax2
/
KBio2-Online
electronics is permanently listening to these
channels and will return a response via the channel from which the command was
received.
Configuration parameters discussed in this chapter will be:
•
CFG_EventCH.
It allows configuring the communications channel
that routes the initial events, before the first frame is received from the Host (for
instance,
). Default value:
$FF
•
CFG_Serial_Port_Host.
Default value:
$91
•
CFG_Serial_Port_Aux.
Default value:
$F0
(disabled).
The detailed programming model may be found on
6.1. Communication with the Host via RS-232
The UART0 port corresponds to communications with the Host via RS-232 by default.
This communication is established at 19200 bps, with 8 bits, no parity and one stop bit
by default. The serial frames will consist of ASCII-Hex values according to the frame
format generated by the Bio-OCX controller (see
From the
CFG_Serial_Port_Host
parameter, however, there are other alternatives:
• Communication speed can be configured to 9600, 19200, 38400 or 57600 baud. To
do so, the
CFG_Serial_Port_Host
byte should take the
$90
,
$91
,
$92
or
$93
values respectively.
• Values other than those indicated above are used for many purposes, as will be seen
later. In these cases, the UART0 port stops interacting with the Host and the
UART2 automatically takes its place.
In cases where the use of adapter cards for other protocols is required (e.g. WiFi, TCP/IP
and Bluetooth, etc.), this will be done from this UART0 port. Whenever connecting to
the Host via UART0, it is advisable to suitably configure the
$10
parameter of the IP
configuration (see
).
The
CFG_EventCH
parameter should take the
$00
value for the
BioMax2 / KBio2-
Online
electronics to spontaneously transmit Online frames through this channel.
The UART2 is enabled to maintain connectivity with the Host in configurations in which
CFG_Serial_Port_Host
takes a value other than
$90
,
$91
,
$92
, etc. Then,
CFG_Serial_Port_Aux
automatically takes the
$91
value, which allows connection to
the Host in the event of emergencies (e.g. if you are unable to reconfigure IP
communications via the
). Given that the UART2 operates at
TTL levels, a USB adaptor cable supplied by Kimaldi is necessary.