Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
I've change and F_CPU,F_OSC from 16E6 to 8000000, also add CLKPR = 0x80 ;CLKPR = 0x00 ; to the first line of main().
So it works correct :)
May be problem solved.
But I want to ask you about setting Clock Frequency.
When I learnt to use ADC converter, My program only works with F_CPU is 16E6...
I connect Atmega168 to "FT232RL USB to Serial Adapter".
TxD -> RxD; RxD -> TxD;
This "FT232RL USB to Serial Adapter" connect to Computer via USB Port.
That is all my devices (Nothing else).
Is it not enough ?
Ok, I see. Thank for your help.
CLKPR = 0x80 ;
CLKPR = 0x00 ;
I've added two line about to the first line of main().
In Realterm screen, Received character is also special character (strange) in ascii mode.
So the problem isn't solved. Can you give me another solution?
__I also try to use...
Hello Everyone
I've read some tutorial about Atmega8 USART.
I tried to write a simple program, which send a character 'a' to serial port.
I used Realterm to connect to MicroController, but received character was not direct (wrong text).
(I also tried to use Hyper Terminal, but sometime text is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.