Need low-cost

Hi,

Hoping I can benefit from the collective wisdom of the folks on thi newsgroup.

What I am looking for is a simple UART / serial / RS-232 interface (I kno those terms aren't interchangeable), with minimum cost being the goal.

The product sales will be in the 50k unit range annually, and the sellin price won't be very high at all a few 10s of dollars, if not cheaper. Th difference between a $1.50 chip and a $0.50 solution becomes prett significant.

Basically I need to add 2 more serial interfaces and the microcontrolle only has 1 on-chip (i.e. need to go from 1 serial interface to 3). The new serial interfaces (added to a legacy product) will run 19200 baud N-8-1.

I don't fancy hardware flow control, BREAK detection, etc... just RX, T and GND on the serial side. On the side interfacing to th microcontroller, almost anything is fine (8-bit parallel, SPI, I2C whatever......) -- preferably with an interrupt line running to the micr saying "I have a byte".

No FIFO/buffering is needed, the micro can respond quickly to a interrupt, but there isn't enough remaining CPU horsepower to implement software UARTs. Issues like framing errors, parity errors, etc... ca just discard the data and not bother the micro.

Ultimately, I'd like a piece of silicon that says "Got another byte fo you, come get it". On the transmit side, I just want to "write" a byte t the solution, whatever the interface, and know that the byte is going to b shifted out at 19200. Higher level protocols will handle dropped bytes i either direction.

From a silicon standpoint, I don't care if it's one chip with the 2 UARTs or 2 pieces of duplicate technology (actually 2 single-UART pieces would b ideal in the sense that another design might only need 1 additional "UART)

So, is the best solution a tiny micro with someone's firmware? A PLD? Something else?

I'm looking for something ready to go, i.e. I could implement this on an number of micros, as could most people here, but I need cheap an ready-to-go.

I hope I've provided enough information, I've tried to anticipat questions out of respect for those kind enough to help out.

All the best & thanks again.

Reply to
CBodd
Loading thread data ...

I'll jump into the discussion and add my comments down the lines:

selling

The

I think this basically rules out any UART chip. Go for a cheap $0.50 micro doing one or two software uarts and host communication through SPI.

Too expensive.

If you need $50.000 to develop a UART in VHDL, you should find a new occupation.:-) VHDL UARTS can be found free on the net....

Indeed. Or even an ATTiny. I have a product that does 4 UART (RX only, including 4 fifo's) at 4800 baud on an ATMega162 @8MHz. This takes up about

50% of the processing time max. I guess it should be possible to two TX/RX uarts at 19k2. You have to sample 4 times the bittime, so your timer interrupt would have to run at 76800 kHz. This gives you 13 us processing time for both uarts. Still tight. My soft-uart needs 26us max. for four channels receiving and one channel transmitting. The longest time is when a complete byte is received and it has to go into a fifo, which takes some time to calculate the pointers, fifo-full etc. I guess if you can stuff the byte out on the SPI immediately you can do it.

Meindert

Reply to
Meindert Sprang

On Monday, in article snipped-for-privacy@sneakemail.com "CBodd" wrote: .....

So what power rails, level conversion and connectors will have a big impact as well, probably a bigger impact.

Which microprocessor are you currently using? What sort of power is currently available? e.g. 3V or 5V or both?

My alternative would be either put a second cheap micro on, or use a different micro with at least 3 UARTs on already.

The problem is without knowing what your legacy micro is doing, could make hardware interfacing awkward as in the old Intel/Motorola parallel timing issues for parallel, what max SPI speed is achievable.

Do you only have 5V available as power (and how much spare)?

What micro family are you using already?

If cost is the issue then you need one piece of SMALL silicon to do TWO UARTs as two pieces of silicon will increase the cost of PCB area on such a tight budget. As well as how you interface to the legacy product as this mean some PCB area will be needed for connections to that. Where are the connectors for the UART I/O going to be and what size will effect PCB area as well.

Extra micro or PLD may well be outside your price budget, and does the budget include any necessary level converters and connectors?

My first port of call in this situation is the smallest cost increment is most likely to be using another micro in the same family with more UARTS built-in.

This also has the less hassle on interfacing at the hardware and software levels.

Recently looked at a design and the best fit was a mico with 5 UARTs in. If adding a micro I would consider adding a small H8 or H8S with lots of internal UARTs in (2 or 3 is common across the families). Alternatively some of the Rabbit or Z80 or other processors.

I have no idea on the 50K breaks on any of these.

My biggest worries on adding to legacy products are usually

a) how much power is available at what levels That can be supplied by the legacy system guaranteed Just hope that no extra filtering on power is required. b) how do the mechanics work (placement, volume constraints, other restrictions) c) hardware and software interfacing

I have seen some nightmares where something simple got screwed up, due to funny shape boards to fit in areas, or labour intensive to wire in, or the actual margin of extra power available was marginal at best.

Any solution offered has the problem of insufficient power will scupper it. All sorts of solutions have different power requirements that may or may not work in your situation or the application (e.g. drains battery too quick).

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk
    PC Services
              GNU H8 & mailing list info
             For those web sites you hate
Reply to
Paul Carpenter

With the simple addition of a clock line from master to slave, you can transfer data at up to 25Mbits/second---many times the rate that you can achieve with a UART in asynchronous mode.

Mark Borgerson

Reply to
Mark Borgerson

First of all, thanks to *everyone* who replied... lots of very on-poin and specific suggestions & thoughtful questions. Outstanding & muc appreciated.

In an attempt to detail my specific problem, I think I neglected to give "big picture" view of the project, so hopefully I can fill in some details Hopefully I addressed everyone's questions (if not -- I'm sorry, I didn' neglect anyone or any question intentionally).

This is a currently-shipping product, based on a Samsung ARM7 chip (th nomenclature of the silicon has changed 3x since we've been using it i '99 -- something like S3C341x or whatever.... my databook is in the la right now...)

The ARM is running at 20 MHz and is at 80-85% CPU utilization (usin uC/OS-II, the CPU pct loading is an optional feature that can be enabled i.e. I'm pulling the figure out of my you-know-what)

Anyway -- this part will be familiar to many of you -- cost, and secondl time to market are paramount here. There are many newer processors ou there that have several integrated UARTs, etc... but the hit we'd tak right now on re-doing this legacy board, drivers, etc... for a ne processor (not to mention the manufacturing steps) would most likely b too much.

We have the real estate & power budget to "glue on" the serial interfaces but to swap out the processor in the short term has been ruled out (I' often saying to the higher ups, "Do you want to pay know or pay later... but we've all been there in the trenches & know how that goes)

One of our primary customers has added functionality to the device w interface to, and requires us to supply two more RS232 ports on ou product (DB9 connector on our side, RS232 levels coming into the board ar

+/- 5V, we just use transistors between the DB9 and the processor instea of a true level shifter IC to get 0 and 3.3V at the Samsung).

We need full-duplex for this product.

It's been a while since I did programmable logic, but if necessary tha route is an option. I was thinking a small uC might be the best route and several of the posts here don't dissuade me.

We have a few unused GPIOs, a SPI bus that is not very heavily used, sam for the I2C bus, a couple of unused interrupt lines as well.

We have 1.8, 3.3, and 5V supplies, and no problems/issues with current o power levels.

When my boss (one foot in mgmt, one foot in tech) looked for UARTs, he wa shocked at the price per chip, and of course was upset that there wasn't "simple" or "basic" UART (we don't need DTR, CTS, RTS, buffers/FIFOs etc...)

The cost margins on this are pretty tight already, and as you can imagin at large volumes, a $2 difference is pretty significant (we're a smal company, and unfortunately the engineers' time [mine included] is ofte considered secondary to the BOM & manufacturing cost.)

I don't have hard #s but I suspect that a $3.50-$4 vs $1 solutio (assuming that's even possible) has a pretty signficant impact on th product's profitability.

The mythical $1 price that I keep alluding to is primarily BOM cost fo the silicon -- we don't need level shifters & we get the DB9s at somethin like 2 cents each and my time (NRE) is unfortunately not factored in.

Hopefully that gives more insight into the product & my situation.

Thanks again very much -- I'll keep checking back for more responses. An hopefully others will be able to benefit from this as well.

P.S. Original title of my post was "Need low-cost serial interface o "UART" " but it was truncated when posting.... thanks for reading into th post in spite of the non-specific title!

Reply to
CBodd

If you add an ATmega162 to the SPI bus you can let it bridge to the two UARTs. The GSM 07.10 protocol will let you multiplex two UART channels on the SPI bus.

--
Best Regards,
Ulf Samuelsson
Reply to
Ulf Samuelsson

Very interesting.

I was kind of wondering if 50K pcs was a real number.

Using a single chip cpu with an SPI port, one hardware uart and one high speed timer (for two software uarts) is very feasable.

If an engineer ( mine or yours ) can do this for $5K(nre), that would be $0.10 per chip.

So a $1.50 chip would add a dime to each.

The other side, (your side) would also need to be done. ( another $5k is another dime per chip @ 50K)

So.

What is the time frame ?

Two weeks, two months ??

donald

PS: I am _not_ bidding on this. I have enough to do.

Reply to
Donald

Given the 20MHz and 3.3V, that looks ideal for AT89LP2051. Full Buffered SPI, and 1 UART in HW so SW only has to do 1 or 2. This is a 1 cycle core, rated at 20MHz at 3.3V. Comes in TSSOP, ask Atmel for a price on 50K - should be under the nominal $1.

This might also fit in their smaller sized LP213/214/216...

-jg

Reply to
Jim Granville

When I designed a high-speed comms hub some years ago I used a number of AT90S2313 MCUs interfaced via SPI to a mid-range PIC. The 2313s had hardware UARTS and I used bit-banged SPI to communicate with the PIC. The system works very well.

Leon

Reply to
Leon

Do you perhaps have a link where I can get details on the GSM 07.20 protocol.

Since I used an ATMega162 for this exact application, I agree that it is a good solution. The ATMega162 has absolutely no problem in handling 2x full duplex channels at 115200 baud, and using the SPI channel to multiplex the data.

Regards Anton Erasmus

Reply to
Anton Erasmus

Can be downloaded for free after registering.

formatting link

--
Best Regards,
Ulf Samuelsson
ulf@a-t-m-e-l.com
This message is intended to be my own personal view and it
may or may not be shared by my employer Atmel Nordic AB
Reply to
Ulf Samuelsson

Thanks again guys, great suggestions. Looks like many of you have alread faced & conquered this problem (literally, or at least mentally) from th details in the posts above.

One thing that might bring a smile or two... when I came in this morning there was a printout from the Philips' site with the LP2101/2/3 circle (especially the '01) with the writing "What about this one?" I guess th

2101 is about $1.50 or so, ARM based, and has 2 UARTs and 2 SPI buses...

It's amazing what you can get these days for your $$$. I think w probably pay close to $5 for the Samsung, maybe it's a bit less, but th lead time for that part sucks (something like 16 weeks).

In my spare time I've been looking at the ARM7 chips from Atmel & Philip ito replace the S3C3410. Naturally they all have more speed, lower power more peripherals, lower cost.... I guess after doing this for about 1 years I shouldn't be surprised anymore, but I never cease to be amazed.

Oh before I forget -- someone here asked about the time frame -- nominall it's 2 months for something that's ready to be manufactured, but I'm no sure how solid that is.

Anyway, thanks again to all posters. Now I'll begin reading datasheet from all the suggestions....

Reply to
CBodd

If you need more than two additional UARTs, these chips are perfectly capable of running bit-banged serial ports - we recently shipped code that uses both on-chip UARTs at 115200 and has two bit-banged 9600 baud MDB ports (9 bit protocol). Not a line of assembler - a 60MHz single-chip ARM is a joy to use.

One thing to note is that the Philips Flash memory controller is really good. As far as I can tell, if you really need fast interrupt response, the Philips devices have the edge over the Atmel parts.

Stephen

--
Stephen Pelc, stephenXXX@mpeforth.com
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691
web: http://www.mpeforth.com - free VFX Forth downloads
Reply to
Stephen Pelc

I've just got some LPC2103s to play with. Digikey had them in stock and I also got a couple of samples out of Philips.

Leon

Reply to
Leon

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.