max baudrate

General discussion on mikroBasic for AVR.
Post Reply
Author
Message
zuran
Posts: 29
Joined: 19 Oct 2007 08:15
Location: Belgium

max baudrate

#1 Post by zuran » 07 Mar 2008 20:05

Has anyone tried a baud-rate higher then 19200
9600 works fine
19200 works also fine

38400 does not work
56000 does not work
57600 does also not work

anyone tried this ?

zuran
Posts: 29
Joined: 19 Oct 2007 08:15
Location: Belgium

#2 Post by zuran » 10 Mar 2008 10:48

I looked to put the registers manually and it works perfectly

so instead of

Code: Select all

'Usart1_Init(38400)

I use

Code: Select all

' Set baud rate to 38400
	UBRRH = 0
	UBRRL = 12
	UCSRA = 0
	'Enable receiver and transmitter
	UCSRB = ((1<<RXEN) OR (1<<TXEN))
	' Set frame format
	UCSRC = ((1<<UCSZ1) OR (1<<UCSZ0) OR (1<<URSEL) )

Post Reply

Return to “mikroBasic for AVR General”