AVR library for GCC

Jul 13, 2003 3 Replies

Is there any libraries somewhere that I can download that handle the following: uart, control of servos and a/d conversion.



I am testing Procyon AVRlib

formatting link
without good results and I need similar functions that work properly.


While not exactly in library form, you are welcome to look at some sample code I provide on my web site:

formatting link

The 'diag' program tests out various functionality of the boards that I sell and there you will find sample routines for the UART and ADC, among others. The 'servo' program sets up one of the ATmega128 timers to be used to generate the typical R/C servo pulse. You set the output compare register of the associated timer and the ATmega128 generates the corresponding pulse width, which the R/C servo responds to. In this particular program, I used a quadrature encoder connected to the ATmega128 to increase and decrease the pulse width sent to the servo.

Cheers,

-Brian

Brian Dean, bsd@bdmicro.com BDMICRO - Maker of the MAVRIC ATmega128 Dev Board http://www.bdmicro.com/

Sounds like you need to hire someone to write some software, except for the servo, uarts and a/d's should be real easy.

the

Yepp, just like you can hire someone to design a processor board for you. Sometimes, however, it's more cost effective to buy a processor card (or use some pre-built libraries). This is particularly so when a number of people have already used the code, discovered and reported the gotchas, and had the bugs fixed. While uarts and a/d's *should* be easy, it's also easy to blow a couple of days on subtle interactions between the background code and a uart interrupt response routine.

Cheers, Alf

-- Alf Katz

snipped-for-privacy@remove.the.obvious.ieee.org

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required