Reply by Aaron Greer October 11, 20072007-10-11
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.

Beginning Microcontrollers with the MSP430

Reply by elruocch October 10, 20072007-10-10
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!
>
Reply by Grant Edwards October 10, 20072007-10-10
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!!
Reply by Microbit October 10, 20072007-10-10
> _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??
Reply by Grant Edwards October 10, 20072007-10-10
On 2007-10-10, elruocch wrote:

> not to be unpopular, but what about using Freescale MC9S08QG8?
> It seems me to have everything: spi, uart, small size, low
> cost.

Thanks, I'll take a look at it.

> Also Renesas R8C14 is interesting, but it's a bit bigger in
> size. I normally prefer MSP430, but sometime...

An MSP430 solution would be the easiest since I've got quite a
bit of the code already running, but other architectures are
always an option.

--
Grant Edwards grante Yow! Are the STEWED PRUNES
at still in the HAIR DRYER?
visi.com
Reply by Microbit October 10, 20072007-10-10
> Yow! Hey, wait
> a minute!! I want a
> divorce!! ... you're not
> Clint Eastwood!!

.. Marriage is a sentence, not a word :-)

Best Regards,
Kris

-----Original Message-----
From: m... [mailto:m...] On Behalf Of Grant Edwards
Sent: Thursday, 11 October 2007 7:50 AM
To: m...
Subject: [msp430] Re: Small msp430 part w/ UART + SPI?
Reply by Grant Edwards October 10, 20072007-10-10
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!
Reply by Grant Edwards October 10, 20072007-10-10
On 2007-10-10, Aaron Greer wrote:

> True, it is a bit larger than a 14 pin TSSOP. But it's only
> about 6mm on a side for the 40 pin QFN.

You're right. I was thinking of the 38-pin TSSOP.

> The 14-TSSOP is about 6.5 by 5.1mm, so not much smaller. The
> price is higher for the bigger part, but if you can tolerate
> that, I doubt the small increase in size would prevent you
> from using it.

The price is comparable to an ATtiny48, so that's not going to
knock it out of the running. I think the QFN part probably
would fit. Those are just so not-fun to work with. Could be
worse, could be BGA...

--
Grant Edwards grante Yow! Hey, wait
at a minute!! I want a
visi.com divorce!! ... you're not
Clint Eastwood!!
Reply by Aaron Greer October 10, 20072007-10-10
Let's keep this in the list if we can.

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.

----- "Colin Garlick" wrote:
> It's very easy to bit-bash SPI. Particularly if you are Master.
> Also TimerA is very good at a cycle-accurate UART. 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.
>
> Colin,
>
> -----Original Message-----
> From: m... [mailto:m...] On
> Behalf
> Of Microbit
> Sent: 10 October 2007 21:45
> To: m...
> Subject: RE: [msp430] Small msp430 part w/ UART + SPI?
>
> 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. 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.
>
> Best Regards,
> Kris
>
> -----Original Message-----
> From: m... [mailto:m...] On
> Behalf
> Of Grant Edwards
> Sent: Thursday, 11 October 2007 6:28 AM
> To: m...
> 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!!
>
>
>
Reply by Microbit October 10, 20072007-10-10
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. 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.

Best Regards,
Kris

-----Original Message-----
From: m... [mailto:m...] On Behalf Of Grant Edwards
Sent: Thursday, 11 October 2007 6:28 AM
To: m...
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!!