Carlos Candido

New baud rate ?

Discussion created by Carlos Candido on Jul 11, 2010
Latest reply on Jul 19, 2010 by David Payne

hcs08,

how to put new baud rate?

 

running 115200

 

int_sci1( 115200 );

run.....

now new baud rate ?

 

 

my code: init and close

void init_sci1( byte cfg,byte bh,byte bl ){     
   if( cfg ){
       
   SCI1C1= 0x00;             init
   SCI1C3= 0x00;
   SCI1S2= 0x00;               
   SCI1C2= 0x00;
               
   SCI1BDH = bh; // 0x000D =115200                     
   SCI1BDL = bl;                
     
   SCI1C3 |= 0x0F;                    
   SCI1C2 |= ( SCI1C2_TE_MASK | SCI1C2_RE_MASK | SCI1C2_RIE_MASK);
  
   } else {
       close
    SCI1C3 &= ~0x0F;                 
    SCI1C2 &= ( (~ SCI1C2_RE_MASK) & (~SCI1C2_TE_MASK) & (~SCI1C2_TIE_MASK) & (~SCI1C2_RIE_MASK));
    SCI1BDH = bh;            
    SCI1BDL = bl;

    }
     (void)SCI1D;
}

 

thanks,

Carlos,


//-------------------------------------------------------------------------

Outcomes