Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
movsesk
PostPosted: Jan 15, 2008 - 04:55 AM
Newbie


Joined: Sep 05, 2003
Posts: 7


Is there a standard (dare I say best?) Uart library out there for GCC? I'm guessing there are a few, but is there one that is more common/better/more 'standard' then the rest?

I'm updating an old project of mine, and need some RS232 comms. I have some old code that used Artur Lipowski uart library v2.0, but I'm having trouble integrating it into some new code. Does he have an updated version? I searched around, but couldn't find any.

Thanks for any help!

Regards,
-Moses
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
kmr
PostPosted: Jan 15, 2008 - 05:16 AM
Raving lunatic


Joined: Apr 01, 2004
Posts: 3812
Location: New Mexico

Probably the "best" UART library is the one that you write for your specific application. OTOH, if you want to save time writing and debugging code, Pascal's avrlib has a fairly wide-spectrum of AVR's supported by its UART library.

_________________
Kevin Rosenberg
http://b9.com
http://kevin.hypershots.com
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
pfleury
PostPosted: Jan 15, 2008 - 08:11 PM
Rookie


Joined: Oct 01, 2001
Posts: 38


You can use my UART library, a lot of people are using it:

http://homepage.hispeed.ch/peterfleury/
 
 View user's profile Send private message  
Reply with quote Back to top
kmr
PostPosted: Jan 15, 2008 - 08:54 PM
Raving lunatic


Joined: Apr 01, 2004
Posts: 3812
Location: New Mexico

Nice library (and web site), Peter!

_________________
Kevin Rosenberg
http://b9.com
http://kevin.hypershots.com
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
movsesk
PostPosted: Jan 20, 2008 - 10:09 PM
Newbie


Joined: Sep 05, 2003
Posts: 7


Thanks Peter!

I got your library working.

It initially wasn't working, I didn't find out why until I hooked up a scope to the TX line, it looked like the output was 10 times (or more) slower then the actual baud rate I wanted. I had the mcu go into sleep mode with the ASYNC counter on, and removing the sleep command made it work.

I think I have to check the ring buffers to make sure they are clear before sleeping. I will dig into the code and see what I can do.

Any comments on making it work with a sleeping uc?

Thank again!

Regards,
-Moses
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
rbackman
PostPosted: Jan 22, 2008 - 09:24 AM
Wannabe


Joined: Oct 08, 2007
Posts: 86
Location: Merced, California

pfleury wrote:
You can use my UART library, a lot of people are using it:

http://homepage.hispeed.ch/peterfleury/


Awesome I just got UART working for the first time with your library on my intel-Mac thank you very much for the excellent code. by the way do you have any good examples of sending strings to the AVR ? I see the uart_getc() but how could I use this to receive a string? do I just create a char Array and poll the getc() function for each entry? maybe a quick example?

thanks anyway

Rob
 
 View user's profile Send private message  
Reply with quote Back to top
agoessling
PostPosted: Jun 25, 2008 - 04:12 AM
Rookie


Joined: Apr 25, 2008
Posts: 44
Location: Dexter MO

i second rbackman's modest request
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits