EmbeddedRelated.com
Forums

baud rate autodetection on AVR 8-bit?

Started by Ivan Shmakov December 7, 2012
On Fri, 14 Dec 2012 23:21:11 +0700
Ivan Shmakov <oneingray@gmail.com> wrote:

> >>>>> Robert Wessel <robertwessel2@yahoo.com> writes: > > [...] > > > And frankly the use of RS-232/async ports should not be a first > > choice these days. > > Given the intended application, I tend to agree -- the use of > USB would probably simplify the things there a lot. > > Unfortunately, I'm yet to find a really cheap MCU (8-, 32-, or > perhaps even 16-bit) with an on-chip USB. (V-USB doesn't seem > to fit well, for its CDC-ACM capability is necessarily a hack.) > The best I've found so far are some STM32's for under $4. I'd > like to see if there could be anything else at half that price. > > (Though USB identifiers may become an issue. They provide one > allowing for relatively unrestricted use with V-USB, but I don't > know what's the current practice for the MCU's with hardware USB > ports.) > > -- > FSF associate member #7257
Half that price is easy, buy them at kilounit quantities. Digikey's got the LPC1342, 250p at $2.57, and 1000p at $1.95. If you need fewer pieces than that, then at the end of the day you're just not talking about much money as compared to the other engineering costs. -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix.
On Thu, 13 Dec 2012 23:20:52 -0800, Mark Borgerson wrote:

[snip]

> Here's what one of our turbulence sensors looks like after about 6 > months to a year on a mooring at the equator: > > https://dl.dropbox.com/u/24841567/P3120108.JPG > > The copper probe at the lower left has the fast-response thermistor that > is the primary sensor.
Fun! It looks comparatively unslimed! In my work biocompatibility is often important. Seems like you need materials that are somewhat bio-incompatible to retard these growths. Do you try for that? Or is there too great a concern with adding toxic substances to the environment?
On 2012-12-14, Ivan Shmakov <oneingray@gmail.com> wrote:
>>>>>> Robert Wessel <robertwessel2@yahoo.com> writes: > > [...] > > > And frankly the use of RS-232/async ports should not be a first > > choice these days. > > Given the intended application, I tend to agree -- the use of > USB would probably simplify the things there a lot. > > Unfortunately, I'm yet to find a really cheap MCU (8-, 32-, or > perhaps even 16-bit) with an on-chip USB. (V-USB doesn't seem > to fit well, for its CDC-ACM capability is necessarily a hack.) > The best I've found so far are some STM32's for under $4. I'd > like to see if there could be anything else at half that price. >
I am assuming you want USB device only. If you want USB host as well, try looking at the PIC32MX range to see if it's something that would match your requirements. Your previous postings imply that you are doing hobbyist type work and you don't say what packaging you need the device in so as much as it pains me :-), I am going to point you to the PIC18F range if you want it in PDIP. Start by looking at the PIC18F14K50. It's quite a limited device so you may need to look at the other options in the PIC18F range to see which of them also support USB device.
> (Though USB identifiers may become an issue. They provide one > allowing for relatively unrestricted use with V-USB, but I don't > know what's the current practice for the MCU's with hardware USB > ports.) >
Since I only use them for my own projects, I just make them up. Since no one else uses my embedded code, I also don't know what the current practice is short of having to pay for formally assigned identifiers. In the past I have heard of some manufacturers allowing you to use identifiers within a subset of the range assigned to the manufacturer, but I don't know what the current policy is. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world
>>>>> Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> writes: >>>>> On 2012-12-14, Ivan Shmakov <oneingray@gmail.com> wrote:
[...] >> Unfortunately, I'm yet to find a really cheap MCU (8-, 32-, or >> perhaps even 16-bit) with an on-chip USB. (V-USB doesn't seem to >> fit well, for its CDC-ACM capability is necessarily a hack.) The >> best I've found so far are some STM32's for under $4. I'd like to >> see if there could be anything else at half that price. > I am assuming you want USB device only. Yes. [...] > Your previous postings imply that you are doing hobbyist type work > and you don't say what packaging you need the device in so as much as > it pains me :-), I am going to point you to the PIC18F range if you > want it in PDIP. My guess is that anything with 0.8 mm or larger spacing will be just fine. 0.5 mm pitch feels a bit too fine to tackle for an amateur, but I'm yet to try it myself. > Start by looking at the PIC18F14K50. It's quite a limited device so > you may need to look at the other options in the PIC18F range to see > which of them also support USB device. ... As for the PIC's, given the sheer number of university courses built around these I've seen, I've always assumed there're something wrong with them. (Some of their "weak points" were referenced in recent CAE postings, BTW.) Anyway, is there a reason I'd choose this particular MCU over, say, STM32F103C8 (other than the package, which is the troubling 0.5 mm LQFP 48 for the latter, that is)? As for the cost, it seems to be > $5 a piece for the former vs. < $3 for the latter (for the smaller orders, e. g., a dozen or so.) >> (Though USB identifiers may become an issue. They provide one >> allowing for relatively unrestricted use with V-USB, but I don't >> know what's the current practice for the MCU's with hardware USB >> ports.) > Since I only use them for my own projects, I just make them up. Unfortunately, my ultimate intent is to share the designs with the community, and using a "made-up" identifiers doesn't seem like a particularly good example to teach on. [...] -- FSF associate member #7257
On Fri, 14 Dec 2012 09:18:00 -0800, Rob Gaddi
<rgaddi@technologyhighland.invalid> wrote:

>On Fri, 14 Dec 2012 23:21:11 +0700 >Ivan Shmakov <oneingray@gmail.com> wrote: > >> >>>>> Robert Wessel <robertwessel2@yahoo.com> writes: >> >> [...] >> >> > And frankly the use of RS-232/async ports should not be a first >> > choice these days. >> >> Given the intended application, I tend to agree -- the use of >> USB would probably simplify the things there a lot. >> >> Unfortunately, I'm yet to find a really cheap MCU (8-, 32-, or >> perhaps even 16-bit) with an on-chip USB. (V-USB doesn't seem >> to fit well, for its CDC-ACM capability is necessarily a hack.) >> The best I've found so far are some STM32's for under $4. I'd >> like to see if there could be anything else at half that price. >> >> (Though USB identifiers may become an issue. They provide one >> allowing for relatively unrestricted use with V-USB, but I don't >> know what's the current practice for the MCU's with hardware USB >> ports.) >> >> -- >> FSF associate member #7257 > >Half that price is easy, buy them at kilounit quantities. Digikey's got >the LPC1342, 250p at $2.57, and 1000p at $1.95. If you need fewer >pieces than that, then at the end of the day you're just not talking >about much money as compared to the other engineering costs.
To Rob: The title of the thread includes the word "amateur," so probably not kilounit qty. More likely, it's more about posting up a web page on some completed project or another. To OP: For a cheap hobbyist one-off with USB connection I'll probably just grab an MSP430 LaunchPad off the shelf if the application idea fits. It's already got connectors for a daughterboard, the cpu is socketed, comes with two cpus, a 32kHz xtal, two different colored LEDs, two different pushbuttons, a USB cable, and uses RS232 between the target and the host via USB. It is $4.30, good tools are available, and most anyone can easily get one. You still write simple rs232 drivers that way, as well. Jon
On 2012-12-14, Ivan Shmakov <oneingray@gmail.com> wrote:
>>>>>> Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> writes: >>>>>> On 2012-12-14, Ivan Shmakov <oneingray@gmail.com> wrote: > > [...] > > > Your previous postings imply that you are doing hobbyist type work > > and you don't say what packaging you need the device in so as much as > > it pains me :-), I am going to point you to the PIC18F range if you > > want it in PDIP. > > My guess is that anything with 0.8 mm or larger spacing will be > just fine. 0.5 mm pitch feels a bit too fine to tackle for an > amateur, but I'm yet to try it myself. > > > Start by looking at the PIC18F14K50. It's quite a limited device so > > you may need to look at the other options in the PIC18F range to see > > which of them also support USB device. > > ... As for the PIC's, given the sheer number of university > courses built around these I've seen, I've always assumed > there're something wrong with them. (Some of their "weak > points" were referenced in recent CAE postings, BTW.) >
Yes, including by myself. :-) They do have a lousy architecture, but they are available in packages I am comfortable working with and they have USB device in those same packages which the other MCU architectures I prefer do not.
> Anyway, is there a reason I'd choose this particular MCU over, > say, STM32F103C8 (other than the package, which is the troubling > 0.5 mm LQFP 48 for the latter, that is)? As for the cost, it > seems to be > $5 a piece for the former vs. < $3 for the latter > (for the smaller orders, e. g., a dozen or so.) >
If you are comfortable working at something smaller than PDIP, then I cannot think of any reason to consider the 8-bit PICs in your case. BTW, at Farnell in the UK, they are charging just over 2 UKP per unit (well under 4 US$ at current exchange rates) for the PIC18F14K50 and I have always considered Farnell to be a bit more expensive than some others based on the prices I have paid for other products. The AT90USB162-16AU comes in a TQFP 0.8mm pitch package according to Atmel's summary PDF; the Farnell UK price seems reasonable at qty 10, but given what you have said above, I don't know what price your suppliers would charge for them however. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world
On Sat, 15 Dec 2012 01:26:44 +0700, Ivan Shmakov <oneingray@gmail.com>
wrote:

> My guess is that anything with 0.8 mm or larger spacing will be > just fine. 0.5 mm pitch feels a bit too fine to tackle for an > amateur, but I'm yet to try it myself.
0.5 mm pitch is actually pretty easy. Swipe and wipe then inspect and (if necessary) wick. Use lots of flux. For removal, if you don't have access to hot air then try ChipQuik. -- Rich Webb Norfolk, VA
In article <kafotg$2mn$1@dont-email.me>, fpm@u.washington.edu says...
> > On Thu, 13 Dec 2012 23:20:52 -0800, Mark Borgerson wrote: > > [snip] > > > Here's what one of our turbulence sensors looks like after about 6 > > months to a year on a mooring at the equator: > > > > https://dl.dropbox.com/u/24841567/P3120108.JPG > > > > The copper probe at the lower left has the fast-response thermistor that > > is the primary sensor. > > Fun! It looks comparatively unslimed! > > In my work biocompatibility is often important. Seems like you need > materials that are somewhat bio-incompatible to retard these growths. Do > you try for that? Or is there too great a concern with adding toxic > substances to the environment?
In the past, I've seen instrument housings painted with anti-fouling paint. The effectiveness of those paints on moorings diminished when tin disappeared from the formulas. Many of the new AF paints rely on occasional bursts of water velocity, which sheds surface growth as the paint ablades. That doesn't work so well on moorings. For the instrument shown, the growth away from the sensors isn't much of an issue. The Delrin is generally ok for redeployment after pressure washing. The copper around the thermistors seems to keep the thermistors working OK for up to a year. The folks who make optical instruments that need a clear window into the ocean have tried small wipers, copper covers, and a number of other approaches to handling biofouling. None are perfect, to my knowledge, and there is still a lot of experimentation going on. Mark Borgerson
In article <86vcc4o5gb.fsf@gray.siamics.net>, oneingray@gmail.com 
says...
> > >>>>> Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> writes: > >>>>> On 2012-12-14, Ivan Shmakov <oneingray@gmail.com> wrote: > > [...] > > > Your previous postings imply that you are doing hobbyist type work > > and you don't say what packaging you need the device in so as much as > > it pains me :-), I am going to point you to the PIC18F range if you > > want it in PDIP. > > My guess is that anything with 0.8 mm or larger spacing will be > just fine. 0.5 mm pitch feels a bit too fine to tackle for an > amateur, but I'm yet to try it myself.
Try getting a Schmart Board then to mount it very easily. Look here http://www.schmartboard.com/ -- Paul Carpenter | paul@pcserviceselectronics.co.uk <http://www.pcserviceselectronics.co.uk/> PC Services <http://www.pcserviceselectronics.co.uk/fonts/> Timing Diagram Font <http://www.gnuh8.org.uk/> GNU H8 - compiler & Renesas H8/H8S/H8 Tiny <http://www.badweb.org.uk/> For those web sites you hate
>>>>> Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> writes:
[...] > The AT90USB162-16AU comes in a TQFP 0.8mm pitch package according to > Atmel's summary PDF; the Farnell UK price seems reasonable at qty 10, As it seems, ATmega8U2/TQFP is available at the same price. Any specific reason to prefer one over the other? > but given what you have said above, I don't know what price your > suppliers would charge for them however. Well, Farnell may turn to be suitable, but I'm yet to check their shipping conditions. -- FSF associate member #7257