vinculum_en

Back to Top
English | Japanese

About the connection between Top-URG and embedded device.

Top-URG has got only one interface that is USB device. Hence to establish a connection between Top-URG and built-in device, the later must have USB host interface.

This article explains the process to establish a connection between Top-URG and built-in device using USB host chip of FTDI company

Connection between USB host chip Vinculum and Top-URG.
Sample program used to connect Vinculum.

Connection between USB host chip Vinculum and Top-URG

Please refer Vinculum manual for more details about Vinculum.

This time, connection between Top-URG and built-in device is established using Vinculum.

Configuration example (Top-URG + built-in device (Vinculum on board))
CDC's(Communication Device Class) ACM(Abstract Control Model) is used as standard for USB in URG sensor.
Vinculum is also supporting the above standard. Information from the USB host can be convert to other interfaces like

Bus
UART
SPI
To evaluate the connection of Top-URG using Vinculum, you can use VDIP1.

URG cannot communicate to VDIP1 after ver.3.65, Please download firmware ver.3.64 from here.
http://www.ftdichip.com/Firmware/Precompiled/Archive/ftrfb_main_03_64VDAPF.ftd
(mirror https://sourceforge.net/p/urgnetwork/wiki/vinculum_jp/attachment/ftrfb_main_03_64VDAPF.ftd)
The procedure to establish connection using VDIP is available here vinculum_using_memo.txt.

Sample program used to connect Vinculum.

The following section consists of microcontroller program and the result obtained by microcontroller when data from Top-URG is converted to UART.

Program
Converting the data by changing the Vinculum to serial type.

#include <7040S.H>
#include "sci_ctrl.h"
#include "imask_ctrl.h"
enum {
  CONSOLE_PORT = SCI_1,
  VDIP1_PORT = SCI_0,
};
int main(void) {
  int i;
  // Initialization of serial communication
  for (i = 0; i < 2; ++i) {
    sci_init(i, 4);
  }
  imask_set(0);
  // Set the output of PE13 for _RESET.
  // Connect PE13 to RS# of VDIP1
  PFC.PEIOR.WORD |= 0x2000;
  PE.DR.WORD |= 0x2000;
  // Output PE14: Hi - Command Mode.
  //              Lo - Data Mode.
  // Connect PE14 to AD5 of VDIP1.
  PFC.PECR1.WORD &= ~0x3000;
  PFC.PEIOR.WORD |= 0x4000;
#if 0
  PE.DR.WORD |= 0x4000;         // Command Mode
#elese
  PE.DR.WORD &= ~0x4000;        // Data Mode
#endif
  while (1) {
    char ch = '\0';
    // Display the message recieved from VDIP1.
    if (sci_readable(VDIP1_PORT) != 0) {
      sci_read(VDIP1_PORT, &ch, 1);
      if ((ch == '\r') || (ch == '\n')) {
        // Expand with LF CR for the new line
        sci_write(CONSOLE_PORT, "\r\n", 2);
      } else {
        sci_write(CONSOLE_PORT, &ch, 1);
      }
    }
    // Send message to VDIP1.
    if (sci_readable(CONSOLE_PORT) != 0) {
      sci_read(CONSOLE_PORT, &ch, 1);
      // Change '\n' to '\r' before send.Otherwise VDIP1 will not recognize.
      // (Unrelated during [Data Mode])
      if (ch == '\n') {
        ch = '\r';
      }
      sci_write(VDIP1_PORT, &ch, 1);
    }
  }
}

Sample of the response
The following text file has the data recorded during transmission and reception process of the built-in device.
It is understood that the command is transmitted to Top-URG, and the response is returned from Top-URG.

% make && sloader vdip_terminal.mot
make: Nothing to be done for `all'.
100.0 % complete. 
Ver 03.64VDAPF On-Line:
Device Detected P2
VV
VV
00P
VEND:Hokuyo Automatic Co.,Ltd.;[
PROD:SOKUIKI Sensor TOP-URG UTM-30LX;P
FIRM:L.1.5z(13/May./2008);R
PROT:SCIP 2.0;N
SERI:00000000;]
MD0000000101001
MD0000000101001
00P
MD0000000101000
99b
09YTF
0<90<9:
MD0000076801001
MD0000076801001
00P
MD0000076801000
99b
0=3M]
0<40<40<40;P0:409N09N09D09D09=09509509509509509709709N09f0;[0<[00
<k0=90=90=90=70<_0<[0<70<10<10<10<10<L0<L0;:07A05@05@05@05G05G05?
G05?05>05>05?05?05@05B05K05K05K04a04404103c03V03I03I03I04504U04]M
04]04_04_04_04_04a04a04a04a04g04g04g04o05505805805<0580580570560[
4m04k04g04e04d04d04d04_04K04E03g03g03O03I03I03O03Q03T03_03b03c03R
c03d03d04604M04S04X04X04_04_04`04d04i04k04o05205605>05G05G05K05Ki
05Y05i06B06B06B06B06H06C06C06C06=05g05a05_05_05a05j0620620620620g
5o05o05j05o05k05k05j05a05`05`05a05g06:06S06V07907C07U07`07`07`073
X07T07T07X08809C0:I0:o0:o0:o0:70:700400401401405I07m07m09E09E09nd
0:O0:f0:f0:O09P09>09<09<08c09<0>70>70>90>90>70>207o07g07g07g07o0?
7g07_07_07T07T07J06i06i06i08b0:00:00:009]08c05k04U03o03V03V03R03<
V03V03S03W03Z03W03S03L03502d01m01000O00I00G00I00400400J0W\0W\0W\k
0WZ0WZ00c1F[1GE1GE1Fo1Fo1Fd1Fd00400401O01O1GO1GO1GR1Mm1N]1N]1Kk1^
Kj1Ig1IR1I>1I>1IA1Ig1Ig1Ig1IV1IV1IG1Hi07m07m07h07i07i07i07i07l07T
m07m07m07j07b07_07[07W07W07W07T07Q07Q07Q07R07]07d07k07k07k07j07jd
07j08808908908:08:08<08>08>08B08F08F08H08H08P08g08k09209409409A0F
9B1XV1XV1XK0cb0cQ0cI0<30;h0;h0;g0;g0;g0;j0;d0;d0;X0:m0:K0:@0:<0:i
:0:80:10:109i09i09b09a09W09U09L09K09K09G09G09H09H09H09H09H09G09GK
09G09I09I09I09I09H09F09B09?09;09809508n08l08i08h08_08^08F08A08A0F
8F08A08A08407n07j07j07j07d07d07d07^07^07^07`07`07`07`07`07`07d081
708808:08?08I08L08O08T08V08a08[08[08[08J08607c07Q07P07P07Q07Q07KZ
07J07I07I07C07A07606l06f06K05m05U04k04A03b03F03402m02m02m02m02o0A
2o02k02k02n02n02n02n02n02o02o03003002o02h02h02h02i02j02m02m02m02X
k02V02V02V02V02V02L02F02E02E02E02P02P02P02J02G02F02F02F02F02F02FY
02L02M02V03103]04h05m05m05m03^02301n01k01c01`01c01c0Le0O@0OL0OP0C
O]0Q=0Q=0OW0MF0LT0LQ0LQ0LQ0M50M50M50Lo0Lo0Lo0NV0OG0OH0O[0P10P50P`
90Pe0Pg0QS0Rn0SB0SS0UL0UL0TM0Si0Si0Sn0Y^0Y^0U\0Tf0TX0TM0TE0QH0OQ8
0NL0NH0NA0NA0NA0OY0Ob0Ob0NL0NL0NL0N20O00J40Hi0HN0H10H00Gm0G[0GS0j
GS0GP0GK0GH0GB0G10F^0F70E:0D80Cg0Cg0Cc0Cc0Cc0Cc0C_0Cc0C_0C_0C_0Cl
_0C_0Cg0Cg0Ci0Ci0Ci0Ci0Ci0Ci0Cj0Ci0Ck0Cl0Ck0Cj0Ck0Ck0Ck0Cn0Cn0Col
0Co0Cm0Cm0Co0Cm0D70D70D80D>0D>0D?0D?0D?0D>0D>0D>0DB0DN0DP0DP0DN0[
DN0DX0DX0KS0OM0Oa0Ob0Ol0P:0PM0PM0O]0OC0O;0O;0O=0OC0Q20Q20Pi0PL0P_
;0P80P20P20P;0Pl0RV0S70SE0SE0SD0QR0QG0Q10P`0P`0P`0PJ0Om0PJ1Ug1V4l
1VG1VZ1W31WD1WS1Wb1X61XL1Xi1YH1YP1Yf1Z51ZI1Z`1[71[=1[b1[o1\B1\W1e
]71]J1]b1^C1^R1_21_D1_`1`11`X1`f1aB1a`1b71b70f40dn0da0da0dK0dH0dF
?0cf0cR0cQ0bn0bh0bh0bh0bR0bC0ao0bC0b[0b^0bj0cE0cE0cE0cU0cU0`o0]^H
0]:7
Device Removed P2

Example of connection


Related

Wiki: top_en
Wiki: vinculum_jp