SparkFun Forums 

Where electronics enthusiasts find answers.

Your source for all things Atmel.
By Ameya
I had a doubt regarding serial communication of Atmega 162
Can any one help please??
I have initialized the USART by setting bits in UCSRB and UCSRC and passed a value in UDR register..but not able to see anything on Serial port of my PC
I am using 8 bit frame with 1 stop bit.
I have written a simple code shown below.
Please help

#include <avr/io.h>
#include <util/delay.h>

#define F_CPU 10000000
#define BAUD 9600
#define UBRR ((F_CPU/16UL/BAUD)-1)

int main(void)

UBRR0H = (UBRR >>8);
UCSR0B = (0<<UCSZ02) | (1<<TXEN0);
UCSR0C = (1<<UCSZ01) | (1<<UCSZ00) | (1<<URSEL0) | (0<<UMSEL0) | (0<<USBS0);
UDR0 = 0X55;
Last edited by Ameya on Thu Jan 29, 2015 6:04 am, edited 1 time in total.
User avatar
By Ross Robotics
First link on a Google search: ... on-problem

I just searched your title..

It's amazing how many people that don't know how to search..
User avatar
By Ross Robotics
I used amazing to be somewhat respectful.. But appalling would be a good one.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]