Bug 060116001: UART_Init for xtal's different from 80Mhz

List of known bugs
Post Reply
Author
Message
User avatar
marko
mikroElektronika team
Posts: 916
Joined: 02 Feb 2005 16:09
Location: Europe
Contact:

Bug 060116001: UART_Init for xtal's different from 80Mhz

#1 Post by marko » 16 Jan 2006 13:40

Bug ID: #060116001
Submitted by: OT

Severity: Major
Status: Under Construction
Description:
UART_Init works only with 80 MHz clock frequency.

Workaround:
Use UART_Init with 80 MHz clock frequency. This bug will be
solved in next version of compiler. Meanwhile try using following code:

Code: Select all

sub procedure My_Uart1_Init(dim baud_rate as longint)
dim tmp as longint
  U1MODE = $0000
  U1STA   = $8400
  tmp     = Clock_kHz * 1000
  tmp     = tmp div baud_rate
  tmp     = tmp >> 6
  U1BRG   = tmp-1
  U1MODE.15 = 1
  U1STA.10 = 1
end sub
-
"Good ideas are not complicated, they are
complex, but we are making it easy !!!"

Post Reply

Return to “mikroBasic for dsPIC30/33 and PIC24 Bug List”