View previous topic :: View next topic |
Author |
Message |
Orcino
Joined: 07 Sep 2003 Posts: 56
|
Error BAUD RATE 30f2020 |
Posted: Thu May 07, 2009 7:02 am |
|
|
Hi im my code below, i config the baud rate for 9600, but in hiperterminal work 19200. Any help ?
Thanks in advance
Code: |
#include <30F2020.h>
#device ADC=10
#FUSES NOWDT //No Watch Dog Timer
#FUSES NOWRTB //Boot block not write protected
#FUSES NOCPB //No Boot Block code protection
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOWRT //Program memory not write protected
#FUSES FRC_PLL //Internal Fast RC oscillator with PLL
#FUSES NOCKSFSM //Clock Switching is disabled, fail Safe clock monitor is disabled
#FUSES FRANGE_HIGH
#FUSES NOOSCIO //OSC2 is clock output
#FUSES NOPR //Pimary oscillaotr disabled
#FUSES NOWINDIS //Watch Dog Timer in Window mode
#FUSES WPRES128 //Watch Dog Timer PreScalar 1:128
#FUSES WPOSTS16 //Watch Dog Timer PostScalar 1:32768
#FUSES PUT128 //Power On Reset Timer value 128ms
#FUSES NODEBUG //No Debug mode for ICD
//#FUSES ICSP1 //ICD uses PGC1/PGD1 pins
#use delay(clock=30Mhz)
#use rs232(UART1,baud=9600,parity=N,bits=8) //<------------------------
|
|
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Thu May 07, 2009 11:57 pm |
|
|
What makes you assume a clock frequency of 30 MHz? As far as I see, FRC_PLL + FRANGE_HIGH results in a clock frequency of 4*14.55 = 58.2 MHz. |
|
|
Orcino
Joined: 07 Sep 2003 Posts: 56
|
|
Posted: Fri May 08, 2009 10:32 am |
|
|
Is really, thanks.
Orcino |
|
|
|