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:34

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

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

Post Reply

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