I2C on EHS6T:USB Terminal | Telit Cinterion IoT Developer Community
July 12, 2015 - 12:08pm, 8086 views
I am having problems using the I2C bus to communicate to a 3V I2C LCD display (Address: 7C). This is what I have done:-
Set: AT^SCFG="Gpio/mode/SPI","std"
Response: ^SCFG: "Gpio/mode/SPI","std"
Set: at^sspi=
Response: CONNECT
Set: <a7C>
Response: {a+}
Set: <a7C0038>
Response: {a-0002}
I am using 4k7ohm resistors fitted between the bus lines and a regulated 3.3V supply.
I have the I2C display working with a freescale FRDM-KL25Z using Mbed compiler and standard library functions/programs so I know the LCD works.
Even if I disconnect everything from the terminals connector and type <a7C> i get {a+} even if I type any random two Hex numbers like <a22> it returns {a+}. This seems a little strange.
Any help/advice most welcome.
Hello,
Have you connected 3.3V to the VCCref and ground on the Weidmueller connector?
If you send just <a7C> only syntax is checked and you always get {a+}.
Regards,
Bartłomiej
Hello,
Yes I connected 3.3V and GND to the Weidmueller connector from the regulated 3.3V supply.
Thank you for explaining that only the syntax is checked if sending only <a7C>.
Any further ideas/suggestions are greatly appreciated.
Kind regards,
Steve.
Hello,
You open the connection with AT^SSPI= without specifying parameters -this implies the default data transfer rate 400 kbps. You can also set 100 kbps. Have you tried that?
Are the lines of equal length and not too long?
Have you tried to use oscilloscope to see what's on the lines?
Regards,
Bartłomiej
Hello,
The I2C lines are equal lengths and are approx 10cm long.
I can get the I2C LCD display working if I disconnect the VCCref! ?
I tried connecting the VCCref to several voltage references (including the same voltage reference as the LCD) but fails every time. Soon as I disconnect the VCCref it works. BUT if I dont connect the VCCref then I loose the functionality of the GPIO, which I need !!!
Are there any other settings I need to change (AT Commands)?
Any help would be greatly apprecoated.
Regards,
Steve.
Hello,
After further testing... the I2C LCD display works with 3.3V and 5V only if the VCCref input is disconnected.
The VCCref without any input sits at 2.4V?
The GPIO only works if I connect a 5V reference to VCCref. (This then stops the I2C from working!).
The GPIO does not work with a 3.3V input to VCCref.
All reference voltage are regulated and very smooth.
Is this the way the EHS6T:USB Termial is designed to work? or is it a faulty terminal?
Please help.
Regards,
Steve.
I have attached 4 images, which detail the I2C bus when entering <a7C00391474546F0F01>. Without 5V input into VCCref all works fine. With 5V into VCCref it stopps at 39? Why?
With 5V Input to VCCref - Terminal:-
Without 5V Input to VCCref - Terminal:-
Any help advise is greatly appriciated.
Regards,
Steve.
Hello,
The signals look a little strange. The clock signal should be rectangular - but it's not that bad, it should be working with that. The data signal also doesn't look quite well - there are different levels.
Generally it should be possible to have both GPIO and i2c.
My first advice is still valid - there should be some voltage connected to the VCCref - I think that 3.3V was OK.
Another thing is that the terminal has built in level-shifters for external lines.
There's some configuration needed for GPIO direction and clock line.
If you haven't configured the lines this might be a reason of a strange behaviour.
Please see these chapters of Terminal hardware description document:
8.3.1.10 Set GPIO Direction
8.3.1.11 Configure ADC1_IN/DSR0/SPI_CLK Line
To do the configuration please connect with the terminal to ASC0 interface with baudrate 1200. There are no replies for the commands, only the diode is flashing. You can check the details in this chapter: 8.3 Complete Watchdog Configuration.
Please disconnect the hardware while you are doing the configuration.
Best regards,
Bartłomiej
Hi all,
Anyone knows how to implement I2C via Java?
I have found the following example in Cinterion's doc:
However, I can't find the i2cConnection class. Maybe I have some different library version.
Best regards,
Hello,
I2cBusConnection interface exists in the EHS module API with quite a wide description and example.
Pleas write more about what module type you are using (ATI1 response) and the documents versions, install CD version that you have.
Regards,
Bartłomiej
Hello,
Thank you for the quick reply.
ati1
Cinterion
EHS6
REVISION 03.001
A-REVISION 00.000.14
AT^SCFG?
^SCFG: "Audio/Loop","0"
^SCFG: "Call/ECC","0"
^SCFG: "Call/Ecall/AckTimeout","5000"
^SCFG: "Call/Ecall/Callback","0"
^SCFG: "Call/Ecall/CallbackTimeout","43200000"
^SCFG: "Call/Ecall/Msd","0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
^SCFG: "Call/Ecall/Pullmode","0"
^SCFG: "Call/Ecall/SessionTimeout","20000"
^SCFG: "Call/Ecall/StartTimeout","5000"
^SCFG: "Call/Speech/Codec","0"
^SCFG: "GPRS/AutoAttach","enabled"
^SCFG: "Gpio/mode/ASC1","std"
^SCFG: "Gpio/mode/DAI","gpio"
^SCFG: "Gpio/mode/DCD0","gpio"
^SCFG: "Gpio/mode/DSR0","gpio"
^SCFG: "Gpio/mode/DTR0","gpio"
^SCFG: "Gpio/mode/FSR","gpio"
^SCFG: "Gpio/mode/HSIC","rsv"
^SCFG: "Gpio/mode/PULSE","gpio"
^SCFG: "Gpio/mode/PWM","gpio"
^SCFG: "Gpio/mode/RING0","gpio"
^SCFG: "Gpio/mode/SPI","rsv"
^SCFG: "Gpio/mode/SYNC","gpio"
^SCFG: "Ident/Manufacturer","Cinterion"
^SCFG: "Ident/Product","EHS6"
^SCFG: "MEShutdown/Fso","0"
^SCFG: "MEShutdown/sVsup/threshold","0","0"
^SCFG: "MEopMode/CFUN","0","1"
^SCFG: "MEopMode/Dormancy","0","0"
^SCFG: "MEopMode/SoR","off"
^SCFG: "Radio/Band","511"
^SCFG: "Radio/Mtpl","0"
^SCFG: "Radio/OutputPowerReduction","4"
^SCFG: "Serial/Interface/Allocation","1","1"
^SCFG: "Serial/USB/DDD","0","0","0409","1E2D","0058","Cinterion Wireless Modules","EHx",""
^SCFG: "Tcp/IRT","3"
^SCFG: "Tcp/MR","10"
^SCFG: "Tcp/OT","6000"
^SCFG: "Tcp/WithURCs","on"
^SCFG: "Trace/Syslog/OTAP","0"
^SCFG: "URC/Ringline","local"
^SCFG: "URC/Ringline/ActiveTime","2"
^SCFG: "Userware/Autostart","1"
^SCFG: "Userware/Autostart/Delay","0"
^SCFG: "Userware/DebugInterface","0.0.0.0","0.0.0.0","0"
^SCFG: "Userware/DebugMode","on"
^SCFG: "Userware/Passwd",
^SCFG: "Userware/Stdout","null",,,,"off"
^SCFG: "Userware/Watchdog","0"
Version of the documentation:
Product name: WMJAVA
WTK Version : "REVISION 03.001"
Date of WTK generation: 9.1.2015
Best regards,
Pages