Arduino(via UART)-SC18IM700(via I2C)-LCD 16×2

Thread Starter

Yashaswini Y Mandalamane

Joined May 10, 2016
6
Our project is to interface UART and I2C for which we are using the bridge IC SC18IM700 by NXP.(The data sheet and related info have been attached).We are using Arduino as the host UART and programming the bridge to control a 16×2LCD slave.The idea is to code Arduino to output hex values to the IC according to the programming format specified in the data sheet of the IC and load it to the i2c data bus.
Arduino and the IC have been connected through TX and RX pins and 16×2 LCD is connected to SDA and SCL pins of the IC through the lcd backpack PCF8574.
We do not have much idea in programming the above IC.Please help!!
 

Attachments

spinnaker

Joined Oct 29, 2009
7,830
Our project is to interface UART and I2C for which we are using the bridge IC SC18IM700 by NXP.(The data sheet and related info have been attached).We are using Arduino as the host UART and programming the bridge to control a 16×2LCD slave.The idea is to code Arduino to output hex values to the IC according to the programming format specified in the data sheet of the IC and load it to the i2c data bus.
Arduino and the IC have been connected through TX and RX pins and 16×2 LCD is connected to SDA and SCL pins of the IC through the lcd backpack PCF8574.
We do not have much idea in programming the above IC.Please help!!
You need to start with a question. What is your question?
 

djsfantasi

Joined Apr 11, 2010
9,160
I was struck by the lack of s question formulated by a project description.

So I have a question. Why are you using the SC18IM700 and a backpack for the LCD?

The Arduino will natively communicate serially and over I2C. So, silly me, I wonder what you need all that other glue for.
 

Thread Starter

Yashaswini Y Mandalamane

Joined May 10, 2016
6
Well,sorry for not being clear with the question.Yes, Arduino supports I2C communication directly.But the point is not that.The idea is to establish a UART to I2C conversion using a microcontroller which supports only UART and not I2C.We chose Arduino as we are comfortable with coding it.We are making use of only the UART pins of Arduino.
 

Thread Starter

Yashaswini Y Mandalamane

Joined May 10, 2016
6
We have worked with coding LCD by connecting it to I2C pins of Arduino.But in our project, it is essential to use the above IC.We are using the backpack,so that the LCD can be directly connected to the SDA and SCL pins of the IC.
The problem here is coding the IC through Arduino and sticking to the ASCII commands format required for the IC.
 

Thread Starter

Yashaswini Y Mandalamane

Joined May 10, 2016
6
Also,in Arduino,libraries for LCD and I2C(Wire.h) can be included.So coding is easy.But here the data to the LCD has to be sent via the IC.
The command format for the IC goes something like this- 53 CE(address of I2C slave) 06 00 A3 56 B7 D4 AB 50 as mentioned in the datasheet of the IC.
Our idea is to output this sequence of ASCII/hex values from Arduino to the IC through UART.And we are not able to workout this ASCII/hex logic to make the LCD work.(There is an option of using the ports on the IC but we have absolutely no idea how to program it like other microcontrollers)
 

JohnInTX

Joined Jun 26, 2012
4,787
So here is the datasheet for the missing link - the PCF8574 I2C I/O expander.

What you are proposing, as I see it, is to send async from the Arduino to the Async-to-I2C chip (the SC18IM700) then take that I2C to not-really-an-LCD backpack I2C to 8bit I/O expander (PCF8574) and use the resulting 8 bit port to operate the Hitachi-compatible LCD display in the 4bit mode.

You can do it, see Rube Goldberg, but you'll have to step back a bit and understand each of the chips in the data flow, including the Hitachi 44780 LCD controller. Your UART is going to be busy.

For openers, the UART->I2C chip works in ASCII only so to send a Start condition followed by A5h, for example, you send 'S' 'A' '5'

But why not? At the very least, you'll gain a good understanding of lots of comms protocols and the LCD controller itself - as well as an appreciation of how not to do something like this.
Have at it.
 

Attachments

shteii01

Joined Feb 19, 2010
4,644
What you are proposing, as I see it, is to send async from the Arduino to the Async-to-I2C chip (the SC18IM700) then take that I2C to not-really-an-LCD backpack I2C to 8bit I/O expander (PCF8574) and use the resulting 8 bit port to operate the Hitachi-compatible LCD display in the 4bit mode.
Holly Macro!
 

ErnieM

Joined Apr 24, 2011
8,377
The question is-HOW TO CODE THE IC???
There is only one IC here and it is SC18IM700
GREAT NEWS !!!
The SC18IM700 is not a programmable device so your task is complete!!!

Or... try to be clearer in your posts and you just might get some helpful, useful advice.

Without an existing library to do the heavy lifting most people start to use an LCD display they run into several problems getting things to work correctly with timings and such. You have no such library due to your extraordinary lash up of connection elements.

I would do the job in several sections so the software and the hardware is always being checked before advancing to the next level.

1. Connect the LCD directly to the Arduino and learn how to get it to work it in 4 bit mode.

2. Connect the lcd backpack directly to the I2C lines of the Arduino and again get the code down tight.

3. Finally insert the bridge and control that thru the serial connections.

Always keep in mind the way the data will transfer will shortly change so keep the transfers tucked away in a routine you can call so you are ready to change the method of transfer. Think application-device-driver layers except you will have 2 or 3 device layers till you hit the driver level.
 

spinnaker

Joined Oct 29, 2009
7,830
the

The question is-HOW TO CODE THE IC???

You are going to need to figure that out. The Arduino is very well supported. There are a number of libraries to interface to the various peripherals but you are going to have to put it all together. Check your documentation on the Arduino. If you search around you might get lucky and and find a library for SC18IM700 too. People here will help get over a few rough spots but they are not going to do the work for you. You will need to write most of the code.

The first step is to create a schematic so that others can more easily understand exactly what you are trying to accomplish.
 

ErnieM

Joined Apr 24, 2011
8,377
And that is well supported by the Arduino community. Libraries already exist.
These libraries are quite useless in this case, unless they come with source code that can be modified to solve this specific problem.

WHY? They are written assuming they are talking to an LCD sitting directly on the I/O pins. So the libraries will hit these pins, but the TS needs to talk thru other hardware.

I mentioned all this above.
 

shteii01

Joined Feb 19, 2010
4,644
Erni and spinacker, it seems you are talking past each other.
spinacker, it has been my observation in this thread that Erni's information is much more useful...
 
Top