Does anyone have a working example of using the usart?

General discussion on mikroBasic for AVR.
Post Reply
Author
Message
woodfold
Posts: 9
Joined: 25 Jul 2008 02:35
Location: Greenville, NC

Does anyone have a working example of using the usart?

#1 Post by woodfold » 05 Aug 2008 08:23

I've tried the examples and the highest speed I've gotten is 600bd. Do the examples work for anyone else? Other examples for other functions I've tried work fine on my atmega162.

Here's what I tried:

Code: Select all

program usart1_test
main:
  USart1_Init(9600)
  Delay_ms(10)         ' wait for module to set
  Usart1_Write_Text("mikroElektronika")
  while true
    while USart1_Data_Ready=0
    wend
    USart1_Write_Char(USart1_Read)
  wend
end.

Post Reply

Return to “mikroBasic for AVR General”