Jump to content
Sign in to follow this  
RogueGeek

Serial port and I/O Expander, I2C

Recommended Posts

I thought I would write a quick post on a booster pack that I am working on.

 

First a bit of background.

I am working on a High Altitude Amateur Radio Balloon.  I have some sensors and peripherals that use standard async serial for IO (GPS, speech module, radio modem), and I have run into a shortage of serial ports on the G2553.  I could bit bang the serial out over GPIO but that just seems a bit inelegant to me.  So I went looking for a better way.  What I found is the SC16IS7xx line from NXP.  

 

I chose the SC16IS752 since it offers dual serial ports with a single connection to the I2C bus, 64 byte FIFO, and 8 programmable GPIO lines.

From the datasheet it looks like the chip has 16 possible I2C slave addresses, so in theory you could stack 16 booster packs for a total of 32 additional serial ports and 128 additional I/O lines.

http://www.nxp.com/documents/data_sheet/SC16IS752_SC16IS762.pdf

 

So far I have designed the board and sent it out for production.  I'm hoping to receive the bare boards near the end of September.  After that I'll start doing some testing and working on driver code for the board.

 

I designed the board to use as few I/O pins as possible and to pass through all pins so other booster packs can stack on top if it.

J1-J4 and I2C address lines

J5/J6 are the serial ports and GPIO

J7-J9 are the boosterpack connections.

 

 

So as I'm writing this and just about to hit the POST button, I look at the rendering on the board and realize that I forgot something!

I noticed that I forgot to include the I2C pull-up resistors. DOH!!  I also noticed that I mislabeled the J2 & J4 address pin.  The pins closest to J7 should be labeled SDA not SCL. At least I only ordered 3 boards for prototyping.  I'll fix it on Rev 2.

 

Thoughts, comments and questions are welcome

 

thanks

Brian

post-30416-0-42869500-1411141285_thumb.png

post-30416-0-24334500-1411141288_thumb.png

Share this post


Link to post
Share on other sites

I chose the SC16IS752 since it offers dual serial ports with a single connection to the I2C bus, 64 byte FIFO, and 8 programmable GPIO lines.

From the datasheet it looks like the chip has 16 possible I2C slave addresses, so in theory you could stack 16 booster packs for a total of 32 additional serial ports and 128 additional I/O lines.

http://www.nxp.com/documents/data_sheet/SC16IS752_SC16IS762.pdf

 

@@RogueGeek, Welcome to 43oh!

Interesting chip for a serial expander. I have never used one like that. So you speak I2C on one end... and serial on the other? Neat!

Keep us posted about your projects.

Share this post


Link to post
Share on other sites

Wow that is neat, for when you need more serial ports and don't know where to find them.  There was an exhibit at the NY MakerFaire ( http://makerfaire.com/makers/the-grid-2/ ) where the folks were using a single Arduino Mega per "tile" because they needed the serial ports, and ended up still using SoftwareSerial to make up the balance.  Hideous waste of money IMO when UART expanders like this are available ;-)

Share this post


Link to post
Share on other sites

And there's SPI version of this chip, nice.

However, at that price, one could use MSP430F or Tiva series as a bridge.

Ah, hadn't looked at the price.  From mouser ..... for $6 and change, the TM4C1230C3PM has 8 UARTs, along with I2C/SPI/single CAN bus possibly sacrificing a UART in the process.  That's crazy to think about.

Share this post


Link to post
Share on other sites

The bare boards are due in today.  I hopefully will be able to get one or two assembled tonight if my neck and back don't decide to cramp up again and derail my evening plans.

 

SPI was mentioned above.  The same chip supports both SPI and I2C.  I decided on I2C and didn't make my boards to support both.  I might add that in Rev 2.

 

The price from Mouser is quite high but the chips can be found for around $2.40 each if you by five or more. So it basically works out to getting 5 chips for the price of buying two through Mouser.

Share this post


Link to post
Share on other sites

Quick update,

 

I finished assembling one of the prototype boards last night and wrote a bit of test code today.

The uart is very easy to work with using I2C on the G2553.  I was able to get it sending data at 230,400 baud after about 20 minutes of hacking/coding.

 

I have attached a pic of the completed board.  I'll upload some source code after I get it cleaned up a bit.  

 

 

post-30416-0-94798000-1412094354_thumb.jpg

Share this post


Link to post
Share on other sites

Congrats The FIFO on that part makes it invaluable to be honest.

 

I was looking at making a booster a while back using SPI with this. Most of the bigger launchpads have lots of uarts unfortunately sometimes you need a lot more (sad).

If you combine DMA with SPI you can run that thing pretty fast. The additional IO is handy too.

My plan was 4 ports with both cmos and level shifted output options I was looking at the F5529lp (40pin launchpad pinout) as the board to plug into.  Maybe when I have time I'll build i. If I had done it a when I was thinking about it I could use it for work (heh). :D

 

Note you could set it so you can swap between spi and i2c (just connect a pin to VDD or GND).

 

Quick update,

 

I finished assembling one of the prototype boards last night and wrote a bit of test code today.

The uart is very easy to work with using I2C on the G2553.  I was able to get it sending data at 230,400 baud after about 20 minutes of hacking/coding.

 

I have attached a pic of the completed board.  I'll upload some source code after I get it cleaned up a bit.  

Share this post


Link to post
Share on other sites

Thanks for the suggestions.

 

Since I have to update the board design to fix a few mistakes I was already thinking of adding some of the functionality you mentioned and making it support I2C or SPI.

 

If there is interest from the 430 community I would be happy to make the Booster either as a completed unit or just the boards.

 

As for the current status...I haven't had too much time this week to work on the code.  Hopefully this weekend will give me a few hours to work on the receive and interrupt functions.

 

 

 

-Brian

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...