sub-20 tool manual/guide

All about Sub-20 Multi Interface USB Adapter USB to I2C, SPI, GPIO, RS232, RS485, Ir, LCD

Moderator: serg

Post Reply
technerd
Posts: 3
Joined: Wed Dec 09, 2009 3:20 pm

sub-20 tool manual/guide

Post by technerd »

Hi

I was wondering if there is a guide or something for the sub-20 tool... the manual doesn't give me much clue how to configure the I2C...

//
Technerd
//
Technerd

xol
Site Admin
Posts: 241
Joined: Sat Aug 29, 2009 8:04 am

Re: sub-20 tool manual/guide

Post by xol »

Tell me what configuration do you need and I will show you how to do it.

SUB-20 Tool is a reference application provided with source code. It's main purpose is SUB-20 API C++ programming example.

technerd
Posts: 3
Joined: Wed Dec 09, 2009 3:20 pm

Re: sub-20 tool manual/guide

Post by technerd »

I need to test some communication between an PCA9538 I2C expander by turning on and off the I/O ports of the expander

expander adresse: 70 & 71
bit 0-4
//
Technerd

xol
Site Admin
Posts: 241
Joined: Sat Aug 29, 2009 8:04 am

Re: sub-20 tool manual/guide

Post by xol »

Hi,
This is what you need to do with SUB-20 Tool.
Press "Write" button to send 0x01 to PCA9538 at slave address 0x70.
clip0001.gif
clip0001.gif (13.33 KiB) Viewed 16554 times

dan
Posts: 1
Joined: Thu Jan 07, 2010 1:29 am

Re: sub-20 tool manual/guide

Post by dan »

How can I use the sub-20 tool to program a DS1307 serial I2C real-time clock? The Data Write sequence is as follows:

Start <slave address> RW ack <word address> ack <data(n)> ack <data(n+1)> ack ... <data(n+x) ack stop
S 1101000 O A XXXXXXXX A XXXXXXXX A XXXXXXXX A XXXXXXXX A P

Specifically, how do I add the multiple data when using the sub-20? Each data entry will represent the seconds, minutes, hours, day, date, month, year and finally control (0001 0011) mapped in the timekeeper registers from OOH, O1H, 02H, 03H, 04H, 05H, 06H, 07H repectively.

Also, what function is the GCE box?

xol
Site Admin
Posts: 241
Joined: Sat Aug 29, 2009 8:04 am

Re: sub-20 tool manual/guide

Post by xol »

dan wrote:How can I use the sub-20 tool to program a DS1307 serial I2C real-time clock? The Data Write sequence is as follows:

Start <slave address> RW ack <word address> ack <data(n)> ack <data(n+1)> ack ... <data(n+x) ack stop
S 1101000 O A XXXXXXXX A XXXXXXXX A XXXXXXXX A XXXXXXXX A P

Specifically, how do I add the multiple data when using the sub-20? Each data entry will represent the seconds, minutes, hours, day, date, month, year and finally control (0001 0011) mapped in the timekeeper registers from OOH, O1H, 02H, 03H, 04H, 05H, 06H, 07H repectively.

Also, what function is the GCE box?
The GCE mean General Call Enable. It is used for configuring SUB-20 in Slave mode. (Not your case).

You need to fill in following:
Slave Address = 0x68 (1101000)
Memory Address = <word address>
Memory Address Size = 1

To read enter Read Byte Count - a number of registers to read. And press Read button
To write enter Data and press Write button

fox123
Posts: 2
Joined: Tue Apr 27, 2010 8:43 am

Re: sub-20 tool manual/guide

Post by fox123 »

Hi,
I have the same problem for using I2C function by sub-20 tool.
I followed the setting description previously, but it seems not work.
How can I set the sub-20 tool to scan I2C device (or read I2C device register (address: 0x68h)).
Please provide some example step-by-step (include hardware configuration and operation), thanks.

xol
Site Admin
Posts: 241
Joined: Sat Aug 29, 2009 8:04 am

Re: sub-20 tool manual/guide

Post by xol »

fox123 wrote:
How can I set the sub-20 tool to scan I2C device
Press "Scan" button in I2C tab
fox123 wrote:
(or read I2C device register (address: 0x68h)).
Fill in
Slave Address - depends on your slave device
Read Byte Count =1
Memory Address =0x68
Memory Address Size - depends on your slave device
Press Read
fox123 wrote:
Please provide some example step-by-step (include hardware configuration and operation), thanks.
What you mean by hardware configuration? Connect I2C SDA,SDO

fox123
Posts: 2
Joined: Tue Apr 27, 2010 8:43 am

Re: sub-20 tool manual/guide

Post by fox123 »

That's right. I want to know how to connect I2C bus between sub-20 (GPIO header pin 1 and 2?) and the I2C header of my test platform,
or what kinds of problems should be take care (for example, the frequency)?
An another question, what does the "Issue I2C" buttons (start and stop) mean?
Thanks for your help,

Best regards.

serg
Posts: 143
Joined: Mon Aug 31, 2009 9:17 pm

Re: sub-20 tool manual/guide

Post by serg »

>>GPIO header pin 1 and 2?
Connect pins 1(SCL),2(SDA),34(GND) to corresponding pins on your test platform.
what kinds of problems should be take care
Any problems of interfacing two boards, i.e wires length, voltage levels, ground etc.
what does the "Issue I2C" buttons (start and stop) mean?
Issue I2C Start and Stop are are for low level I2C bus access. Normally you don't need this because start and stop conditions are generated automatically as part of any I2C transaction (read or write)
"Issue I2C Start" means "Generale I2C start condition on the bus"
"Issue I2C Stop" means "Generale I2C stop condition on the bus"

Post Reply