baud rate autodetection on AVR 8-bit?

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.
Reply to
Rob Gaddi
Loading thread data ...
[snip]

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?

Reply to
Frank Miles

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.

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
Reply to
Simon Clubley
[...]

Yes.

[...]

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.

... 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.)

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
Reply to
Ivan Shmakov

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

Reply to
Jon Kirwan

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.

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
Reply to
Simon Clubley

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
Reply to
Rich Webb

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

Reply to
Mark Borgerson

Try getting a Schmart Board then to mount it very easily.

Look here

formatting link

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk 
    PC Services 
 Timing Diagram Font 
  GNU H8 - compiler & Renesas H8/H8S/H8 Tiny 
 For those web sites you hate
Reply to
Paul
[...]

As it seems, ATmega8U2/TQFP is available at the same price. Any specific reason to prefer one over the other?

Well, Farnell may turn to be suitable, but I'm yet to check their shipping conditions.

--
FSF associate member #7257
Reply to
Ivan Shmakov

I think FTDI still does that for their interface chips. I once used IDs from a subset that they assigned to me. Now, I just use their default IDs. That gets a standard USB serial driver loaded under Windows and they have a config bit that will cause their direct driver to be loaded so that you can use their API for direct comms with their chips. Things got more complex under Win7x64 when it started requiring signed drivers. Just changing IDs in the configuration text files caused the driver to be rejected as unsigned.

I've used the FT245RL FIFO-to-USB chip in a number of designs. If you have about 12 free bits---ideally with 8 of them in a single port---you can add USB without having to worry about any of the USB details. With an MSP430 at 8MHZ and a pretty simple Windows host program I can transfer data at about

200KBytes/second.

If you need higher speed transfers, you can move up to the UM-232H. With that module connected to an STM32F2XX with a hardware SDIO port, I can upload data from the SD card at 4-6MB/second.

Mark Borgerson

Reply to
Mark Borgerson

Indeed, I've ordered some LQFP 48 to DIP break-out boards from

formatting link
(I guess I'd need to wait for quite some time for delivery, since they're on the other side of the Earth, literally), not to mention that I have a couple of home-made SO prototyping boards, each with a TQFP 32 landing space (the design that could certainly be improved.)

Yet, as I've said before, my intent is to eventually publish my designs for the others to use (and improve), and I'm still in doubt that mounting a 0.5 mm pitch IC would be an easy thing for a J. Random Amateur.

But well, perhaps I'm wrong on that.

--
FSF associate member #7257
Reply to
Ivan Shmakov

The point is that if I'd be able to get in touch with the fellow amateurs in my vicinity, then we'd probably "waste" a few dozens of chips together, in relatively short time. 1000 PCS of any given IC would most probably be beyond our demands.

Somehow, I was unable to find out what exactly comes with this board? But given the price, it indeed looks like a nice thing to have.

Does that mean CDC ACM? Or that the board includes an USB to Serial (UART) converter (which is TUSB3410, I guess)?

... But what surprises me is that while one can get this one for under $5, the TUSB3410 chip alone costs over $6.

--
FSF associate member #7257
Reply to
Ivan Shmakov

yeah, that's about where my mind was at after reading what you were saying. Rob is a sharp person, but I didn't think Rob had noticed your context -- or, if he had, had discounted it for other reasons when he wrote, "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." It's spoken from a professional perspective, but one that has long since fogotten their roots and/or hobbyist perspectives.

You get: ? Nice box ? Paperwork ? ½ m USB cable ? Microcrystal MS3V-T1R tuning fork 32.768kHz crystal ? MSP430G2231 cpu, DIP ? MSP430G2211 cpu, DIP ? LaunchPad board, which includes a USB to host section and a developer section with socket for cpu, two pushbuttons for user use (as well as reset), two leds, one green, one red, jumpers for enabling and disabling features, a special interface for using the board to program target boards as well (6-pin EZ430 connector), a power connector for your use to run the board, and of course a USB connector ? four headers for daughter card extensions, 2 male-female and 2 male-male

You can look for the documents, SLAU318 and the "Student guide and Lab manual" for the LaunchPad (I don't know the number for that one.)

There are two pins (dedicated if you want, or reusable for any reason you want by pulling two jumpers) used for RxD and TxD that talk with the USB section of the board. That section then communicates with the host by setting up a HID virtual COM port, automatically. Any serial port software can talk with it.

Not sure what CDC ACM means. I'm sorry. But yes, I think it uses the TUSB3410 chip plus another dedicated MSP430 as well to run it and communicate with your target processor.

Yeah. I know. And you can get completed AD9850 boards from ebay for way less than you can buy an AD9850 chip, too. Regardless, that's one reason this board is such a steal of a deal. I've used it as the base of several successful projects

-- the first of which was snap onto a parallel-port printer output of a device and to convert the output into a text file on the PC, via the USB interface. Used both cpus for that one, one to handle the parallel port interface comms and the other to handle the rs-232 section, and using a versatile protocol in between the two for synchronization and buffering.

Jon

Reply to
Jon Kirwan

Sorry, but I have no experience with the USB capable AVRs. I only know about them because I have seen them mentioned while working with other AVRs.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP 
Microsoft: Bringing you 1980s technology to a 21st century world
Reply to
Simon Clubley

CDC ACM is the standards based way to implement a serial port over USB.

Many vendors (ie: FTDI and Prolific [PL-2303]) implement serial ports over USB by using their own protocols which (a) require you to install a driver on the host PC and (b) for which the specifications are not freely available unless you sign a NDA.

However, the USB specifications include the Communications Device Class (CDC) which has implemented within it the Abstract Control Model (ACM) and which can be used to implement a serial port. It's main limitation (for me) is that there's no way to signal CTS changes from the device attached to the USB serial port back to the host PC.

The way Microchip (for example) appear to handle the problem in their MCP2200 USB serial port is to implement the RTS/CTS handling on the MCP2200 itself instead of passing the CTS signal back to the host PC. They appear to have a out-of-band mechanism by which a host PC configuration utility can turn on and off RTS/CTS flow control handling on the MCP2200.

I also have implemented a CDC ACM driver within my own USB device stack and when I add RTS/CTS flow control to it, I also plan to handle the flow control on the USB device itself, so in practice, I don't see this as been a major issue for at least some usage patterns.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP 
Microsoft: Bringing you 1980s technology to a 21st century world
Reply to
Simon Clubley

I think I may like to discuss this subject at more length, sometime soon. I'm actually interested in the details (data structures that must be used, what they are filled with, the order of communications, etc.)

I'm currently fairly ignorant, excect from glancing through the 1000 page USB 2.0 spec -- which to my reading does not do any tutorials on the actual data structures that a slave device must use, nor much detail on the Windows drivers (or Linux, freeBSD, etc) side. I know there is code out there to read, but I'd like to get an overview of subsets, one at a time, to consider and then master before moving on. Mostly, it seems an all-or-nothing approach in the USB 2.0 manual -- which makes taking the time quite daunting to start out. And I consider Jan Axelrod's book almost useless, as well.

If you would consider the idea, perhaps in a few month's time I may want to contact you. I'd be pretty dumb, to start, except that I have 35 years embedded programming practice -- so this would mostly be about me reading and testing and then asking questions when I get stuck on something. (Which, at first, I expect to be often. sadly.)

Or perhaps there is a great forum for someone focused on mastering various details but starting out largely ignorant of the terms and the domain space?

Jon

Reply to
Jon Kirwan

Assuming I have the time available when you want to discuss this, I don't have a problem with this. However, I think the discussion should be in comp.arch.embedded because it could benefit others as well. Another advantage would be that any opinions or comments I have would also be reviewable by others here.

Don't focus on the size of the USB 2.0 spec; you only have to read a few chapters of it in order to implement a USB device stack as the spec covers physical specifications as well as hub/host requirements. You don't need to read much of that in order to implement a device only stack.

I found I spent the vast majority of my time in Chapters 8 and 9 along with some dipping into Chapter 5. However, I already knew much of what is in Chapter 5 when I started, so you may spend more time there than I did.

I also very strongly recommend you start out with a full speed device instead of a high speed one. This means you can ignore the high speed specific parts of the protocol until later.

Your jumping on point for following the USB protocol at data structure level is the SETUP packet which your device will receive from the host as part of any operation on the control endpoint (endpoint 0). This is in table 9.2 of section 9.3. Look at this table while reading 8.5.3 (Control Transfers) which shows how this packet fits into the scheme of things.

Higher level protocols (such as the CDC layer) have their own data structures and are documented in their own specifications.

When you plug your USB device into the host, the USB device controller will be reset. When you have enabled endpoint 0 and have come out of reset, the next thing which will happen is that you will receive a SETUP packet from the host on endpoint 0.

Your control endpoint logic is geared around interpreting these requests and responding to them as required. One of these requests will be for the device descriptor which, along with the configuration/interface/endpoint descriptors, describes your device's capabilities.

I recommend you start out by making the device descriptor a vendor specific descriptor (table 9.8, bDeviceClass = 0xff) so that the host does not recognise it. In this way you don't have to worry about higher level protocols throwing requests at your device stack (at least on Linux, I don't know about Windows), but you will still go through the process of been asked for your descriptors, been assigned a address by the host and been told which configuration to use.

This will allow you to start out by developing and testing the lower levels of the USB stack without having to worry about the higher level function layers just yet.

Be warned however, that if you want to write a USB device stack, there will be a lot of work involved in understanding the details. Given the multiple layers to the protocol as well as it's scope, this cannot be avoided.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP 
Microsoft: Bringing you 1980s technology to a 21st century world
Reply to
Simon Clubley

[ ... ] Thanks for these tips. I know USB is not hard because the guy working next to me did it, based on the implementation for PIC32. Because he did it, I didn't have to. Now on another project I have to.

Mel.

Reply to
Mel Wilson

Yes, i prefer to buy the newer Atmega8U2, but still have to use the old At90usb162 stocks. Unless the older chips are much cheaper.

Reply to
me

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.