avr to support gps and usb?

Go To Last Post
12 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

can AVR support GPS and will it act as both host and device?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is a library (avr-usb) that supports low-speed USB device support in firmware (no hardware needed)

Atmel produces some devices with USB hardware. In conjunction with Dean's LUFA library (formerly MyUSB) it is a really easy to create a USB device.

Some devices can apparently act as a "USB OTG Reduced Host". (Personally I'm too ignorant to know what it means.) You need to find out yourself if this is enough for you.

Coming to the GPS part, please specify what you mean by GPS support.

If you understand "GPS" as reading NMEA strings and to parse them, then the answer is hell yes!

If you want to roll your own GPS, then I suggest that you are better off buying a ready made GPS module. It is darn hard to get the RF design right in a PCB. And the calculation power of an AVR is not enough to run a Kalman filter (let alone correlation).

Thomas

pycrc -- a free CRC calculator and C source code generator

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

To the best of my knowledge, NONE of the AVRs work as a host of any kind, OTG or otherwise. A host is needed to talk to a GPS. You CAN use FTDI "Vinculum" chip for this:

http://www.vinculum.com/

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:
To the best of my knowledge, NONE of the AVRs work as a host of any kind, OTG or otherwise.

Taking a quick glance at the Atmel AT90USB web-pages, i.e. http://www.atmel.com/dyn/product..., there seems to be support for USB as host?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK...

I see:

Quote:
AVR277: On-The-Go (OTG) add-on to USB Software Library (15 pages, revision A, updated 07/07)
This document describes the new features brought by the OTG working group and how they are integrated in the AT90USBxxx USB software library, illustrating how to develop customizable USB OTG applications.

Stand corrected,

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Correct - the AT90USB1287 and AT90USB647 can act as reduced hosts in Low and Full speed mode. LUFA contains a bunch of host-mode demos, such as Mass Storage, HID and Still Image hosts.

Quote:

Some devices can apparently act as a "USB OTG Reduced Host". (Personally I'm too ignorant to know what it means.) You need to find out yourself if this is enough for you.

OTG allows for two dual role (can act as host or device) devices to be linked directly together, without a computer. The devices then use some OTG extensions to the USB protocol to negotiate who needs to be a host or a device at any one point, so that data can flow bidirectionally. It's intended for things such as direct camera (normally device-only) to printer (normally device-only) connections.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello there
Is there Anybody have a project incorporating LUFA libraries USB host or OTG functions in their project?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:
To the best of my knowledge, NONE of the AVRs work as a host of any kind, OTG or otherwise. A host is needed to talk to a GPS. You CAN use FTDI "Vinculum" chip for this:

http://www.vinculum.com/

Jim

Or use a Serial (RS-232) based GPS instead of a USB based one. Most OEM modules have a standard serial interface that can be interfaced directly to the AVR's USART. This will simplify the design, leaving the AVR's hardware USB available for interfacing to the PC.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's not an AVR, but the AT91SAM9261 can do USB as a host.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Use a GPS with RS322/serial. USB host is very difficult on a microprocessor due to the complexity of the USB protocol stack.

FTDI has a chip that be a host.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

USB host is very difficult on a microprocessor due to the complexity of the USB protocol stack.

Not with LUFA - host implementations are actually not that bad to do, since you just implement the final stages (configuration and communications). When I get hub support into the library, you'll be able to control multiple devices, too.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

tpircher wrote:
And the calculation power of an AVR is not enough to run a Kalman filter (let alone correlation).

Thomas

Actually, I can't quote it at the moment, but I have seen a Kalman filter implemented in the AVR. It was an autonomous vehicle of some sort. I ran across it months ago, and I don't remember where.

But I agree, you are NOT going to implement a GPS receiver in an AVR. Sparkfun has plenty of nice modules that output NMEA strings at TTL levels that talk nicely with the AVRs USART.