Have you checked the UART/USART section of the MCU datasheet? I just checked the ATmega88 datasheet, and it provides sample C code for all UART operations. I believe the ATmega8 datasheet provides this as well. As far as serial in general, there are many pages describing PC serial ports. While they tend to be PC specific, the intro sections generally describe serial communications, RS-232, shift registers and such. One of the (many) useful pages full of information is Beyond Logic, try: http://www.beyondlogic.org/serial/serial.htm#1 Jan Axelson also is a good source of links (and information if you buy the book.) http://www.lvr.com/serport.htm If I google: http://www.google.com/search?q=avr+uart+library&hl=en&lr= I get plenty of links to pages providing serial port libraries. ATMEL has written Application Note AVR244: UART as ANSI Terminal Interface - describing how to connect the AVR to the PC via HyperTerminal. http://www.atmel.com/dyn/resources/prod_documents/doc2547.pdf I hope this helps. Enjoy. John pjcxb wrote: > > I have so far only written basic logic using "C" for a Mega8 and would > like to extend this to use of the UART for RS232 comms to external > devices. Would someone kindly point me in the right direction to find > some introductory information and some "C" code to do this task? > > With thanks, > Peter > >
Message
Re: [AVR-Chat] Beginner wants to Program UART in C
2006-12-08 by John Clymer
Attachments
- No local attachments were found for this message.