Personal tools
You are here: Home Forums R8C/Tiny R8C13 Uart1 Problem

R8C13 Uart1 Problem

Up to R8C/Tiny

R8C13 Uart1 Problem

Posted by Akif Akgül at August 27. 2008

 

         Hi all,

         I regulated uart register settings like down..

         #define _OUT 0xFF
         #define _IN  0x00

        init_uart1(void)

{

         pd0_0=1;            //tx    
         pd3_7=0;            //rx

         u1mr = 0x05;   
          
         u1c0 = 0x00;  
         u1c1 = 0x0F;  

         ucon = 0x27;

         u1brg = 0x6E;        ( I want 19200 bit rate) my clock frequency=16 Mhz
 
         s1tic = 5;
         s1ric = 6;

}

         but , I couldn't work.. what is problem ??

         I think , u1brg is error . How can I do u1brg register setting? Can you tell me exactly .

         Thanks..

Re: R8C13 Uart1 Problem

Posted by Icecap at August 27. 2008
In the datasheet I use (R8C/24-25 group, "REJ09B0244_R8C2425HM.pfd") it all stands in tabel 15.4 and in 15.2.1 (Fig. 15.12) it shows clearly the calculation and dependencies.
Powered by Ploneboard