EmbeddedRelated.com
Forums

Small msp430 part w/ UART + SPI?

Started by Grant Edwards October 10, 2007
> _expensive_, and with AVRs interrupt handling and dealing with
> 16-bit timer values leaves a lot to be desired.

Fun, ain't it ? :-)
Reads and writes have opposite byte order on the timer.
I just wrote low level handlers for that and then forget about it.
That is, after you've tried to make sense of the Mega jungle :-)

Best Regards,
Kris

-----Original Message-----
From: m... [mailto:m...] On Behalf Of Grant Edwards
Sent: Thursday, 11 October 2007 7:33 AM
To: m...
Subject: [msp430] Re: Small msp430 part w/ UART + SPI?

On 2007-10-10, Microbit wrote:
> Hi Grant,
>
> AFAIK you have to turn to the bigger buggers because SPI is
> treated as a USART, unless I've missed some newer part.

Some of the smaller parts have a USI (which will do SPI or
I2C), but I also need a UART.

> But I guess you already knew that / were afraid of that :-) I
> guess that's where little buggers like the AVR are good, they
> always come with SPI HW regardless of other periphs.

Yea, I've been looking at the ATtiny48 family but they're
_expensive_, and with AVRs interrupt handling and dealing with
16-bit timer values leaves a lot to be desired.

--
Grant Edwards grante Yow! Is it 1974? What's
at for SUPPER? Can I spend
visi.com my COLLEGE FUND in one
wild afternoon??

Beginning Microcontrollers with the MSP430

On 2007-10-10, Aaron Greer wrote:

> AFAIK the USCI will handle one each of UART and SPI.

That's the way I read the datasheet. I had never realized that
it could do both at the same time (haven't used a part with a
USCI yet).

With a hardware UART, my foreground stuff only has to happen in
byte-time chunks instead of bit-time chunks. That makes life a
lot easier...

--
Grant Edwards grante Yow! What a COINCIDENCE!
at I'm an authorized "SNOOTS
visi.com OF THE STARS" dealer!!
not to be unpopular, but what about using Freescale MC9S08QG8?
It seems me to have everything: spi, uart, small size, low cost.
Also Renesas R8C14 is interesting, but it's a bit bigger in size.
I normally prefer MSP430, but sometime...
Andrea

--- In m..., Grant Edwards wrote:
>
> On 2007-10-10, Aaron Greer wrote:
>
> >> It's very easy to bit-bash SPI. Particularly if you are
> >> Master.
>
> I'm not. The SPI interface would be as a slave to a device
> that's runnnig a HW SPI interface at with a clock rate in the
> hundreds of KHz.
>
> >> Also TimerA is very good at a cycle-accurate UART.
>
> I need to dedicate one 16-bit timer to a particular function.
>
> In some projects I've used the WD/interval timer to bit-bang a
> UART, but when you do that, you've only got 1 bit time to
> handle a received a byte. On this project that's only going to
> be a few hundred instructions, and I don't think that's going
> to be enough.
>
> >> So you could use F2011, and have both SPI & UART with S/w
> >> trickery ~300bytes of code (NB This is NOT a CPU cycle timed
> >> S/w-UART), but the USI on F20x2 is probably an easier reach.
>
> > Let's keep this in the list if we can.
>
> Please.
>
> > I think the OP wants to have both SPI and UART at the same
> > time. Using the USI won't get him that. Maybe a combo of USI
> > and SW bit bash would though.
>
> I don't think bit-banging a UART is going to be feasible. It
> would have to be done on a polling basis (the function to which
> the 16-bit timer is dedicated can't tolerate any interrupt
> latency at all), so all foreground processing would have to be
> done in increments less than one-bit-time long (chunks on the
> order of 400 clock cycles). In theory, that might be possible,
> but it would be pretty difficult.
>
> --
> Grant Edwards grante Yow! Kids, don't
gross me
> at off ...
"Adventures with
> visi.com MENTAL HYGIENE"
can be
> carried too FAR!
>
I think this one will do what you want:
http://focus.ti.com/docs/prod/folders/print/msp430f2272.html
AFAIK the USCI will handle one each of UART and SPI.

----- Original Message -----
From: "Grant Edwards"
To: m...
Sent: Wednesday, October 10, 2007 2:28:06 PM (GMT-0700) America/Denver
Subject: [msp430] Small msp430 part w/ UART + SPI?

I'm trying to find a small MSP430 part that has both a UART and
SPI hardware (1 each). I need 2KB of flash and 256B of RAM and
about 5 I/O lines (in addition to the UART/SPI). Small size is
important.

I've been fighting with the the part selector web page for a
while and haven't been able to find such a part. But, it
doesn't seem possible to specify 1 SPI and 1 UART, so I may
have missed something.

Is anybody aware of a small part with both a UART and an SPI
interface?

--
Grant Edwards grante Yow! I'm encased in the
at lining of a pure pork
visi.com sausage!!

--
CONFIDENTIALITY NOTICE: This communication, and any files or previous e-mail messages attached to it, is confidential information and may contain information that is privileged. It is for use of the named recipient(s) only.
Do not read this e-mail if you are not the intended recipient. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, please do not copy or disclose its contents to any person or body.
If you have received this transmission in error, please immediately notify us by e-mail and destroy the original transmission and its attachments. Thank you.