I need to create a circuit to talk to a piece of equipment using the I2C bus. I'm on a PC that has an NI serial card with RS485 ports(I'm not sure of the model number off the top of my head). I found the NXP SC18IM700 IC that seems like it would be perfect for my application, but I can't seem to get it communicating properly. I started out using the PC's RS232 port as the UART connection to the SC18IM700, but the voltage levels on the RS232 are very high at around 12.5V, and the SC18IM700 seems to only accept inputs up to 5V.
I think I found a way around that problem for the moment using a USB FTDI cable, but I can't use USB in my final project. I'm also still having an issue with proper communication using the FTDI cable. What I found is that using the default baud rate of 9600 I would receive a framing error when trying to just read the "OK" message the SC18IM700 outputs when it is powered on/reset. I fixed that by lowering the baud rate of my serial port to something less than 9300, so now I'm getting the OK message with no problem.
However, now I'm unable to send/receive messages to the I2C bus. I'm using a circuit setup provided by NXP to test the operation of the SC18IM700 to control some LED's using the AN10397 document. I've set up the circuit exactly as described, and am using the commands as written, as well as sending the entire command in HEX values, but I can't seem to get any 2 way communication. I can see on my oscilloscope that when I send a message to the SC18IM700 that the I2C clock and I2C data line have some reaction, but I'm not sure what messages are being sent across the I2C line. I'm unsure how to proceed on this right now though. What I'm thinking right now is that I need to bring the logic levels down on the UART side to something less than 5V. I believe I can use the MAX3062 to convert RS485 to RS232, then use the MAX3232 to level shift the RS232 to <5V, which should provide the proper communications. My problem is that even with the proper logic levels on the UART, the SC18IM700 is still not providing that bi-directional communication with the I2C bus.

I know this is a long read, I've tried to be as descriptive as possible. Has anyone conquered this problem before? Anyone have any experience with the SC18IM700 IC? It's pretty frustrating as it seems from the data sheet of the SC18IM700 that it really should just be plug and play.

EDIT (SCHEMATIC CLARIFICATION): I believe the circuit schematic is shown in the AN10397 application note that I linked to. It's a simple circuit though. The Vdd on both chips are set to 3.6V on the same bus. Each has a 0.1uF cap between Vdd and Vss. Vss is tied directly to GND. WAKEUP! has a 1k resistor to Vdd. The SCL/SDA lines are connected to the same pin on each chip with a 4.7k resistor pulling each line to Vdd. the RESET! pins on each chip are connected together and have a 100k resistor pulling up to Vdd. Tx/Rx and GND from the FTDI cable are connected to Rx/Tx and Vss on the SC18IM700. All GPIO on the SC18IM700 are left floating. The Vdd on the FTDI cable is left unconnected. The 3 address pins on the LED Driver chip are tied to Vss/GND. The LED anodes are tied to Pins 5-12, with a 200ohm resistor to Vdd.

I have the communication working now. I don't know what the problem was, but it did start working, albeit still at 9300 baud (I also have several IC's on hand to use and abuse. I probably did ruin the first chip with the 12V RS232). I'd like to change the baud, or at least verify the register settings on the chip for baud rate, but I can't figure out the equation they give to set the values of the BGR0 and BGR1 registers. The equation used is: Baud Rate = 7,372,800 / [16 + (BRG1 , BRG0) The default values in the registers from the data sheet, and verified by my own reads of those registers, are BRG0 = 02 (02h) & BRG1 = 240 (or F0h). I can't for the life of me figure out how 240 and 02 equate to 9600 baud. If (BRG1,BRG0) = 752, then it works to set the baud to 9600, but how does (240,02) equat to 752?

  • \$\begingroup\$ You probably destroyed the device in the first paragraph using RS232 levels. \$\endgroup\$ – Andy aka Jul 1 '20 at 16:51
  • \$\begingroup\$ You have so many separate things that could be wrong. Like Andy said, using RS232 levels instead of TTL levels may have broken the chip. Or there is something else wrong, since you seem to be able to send something and get some response, and even make the I2C bus to wiggle. Would you post schematics which includes your setup, like power supplies and logic levels and any pull-up/pull-down resistors you have placed, and what is the I2C chip you are talking to? Also, it might be difficult to make the SC18IM700 chip to talk on RS485 bus, as it has no "driver enable" pin for half-duplex comms. \$\endgroup\$ – Justme Jul 1 '20 at 19:20
  • \$\begingroup\$ @Justme I edited my post to add some clarification. TL:DR is that I got it working, mostly, and am thoroughly confused with setting the baud rate... \$\endgroup\$ – saregister Jul 2 '20 at 14:40

The baud rate register value for 9600 baud is 752 which is 0x02F0 in hexadecimal, and the registers do contain those values.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.