Hi, I am trying to get as much as possible from my serial connection. I am using 10Mhz xtal in HS+PLL mode (total of 40MHz).
at the top of my program I define
#define BAUD d'57600'
#define XTAL d'10'
#define X ((XTAL*d'1000000')/(d'64'*BAUD))-1
and then in the program I clear the BRGH bit (making the speed slow - and what is the limit here?).
Instead of the desired chars, I am getting some garbage. If I reduce the speed to 38400 b/s (or lower), everything works just fine.
I also tried
#define X ((XTAL*d'1000000')/(d'16'*BAUD))-1
and then set BRGH bit high, so I started to get some new garbage. I also tried to change the XTAL to 40, but no success.
Two questions:
1. what is the bitrates for BRGH=1 and BRGH=0?
2. is this a limitation of a pic/max/pc?
PS: I am using COM2 on pc which is set to 115200 in devices, and then set to appropriate BAUD in terra term. Also, fifo buffers are off.
Thank You.
at the top of my program I define
#define BAUD d'57600'
#define XTAL d'10'
#define X ((XTAL*d'1000000')/(d'64'*BAUD))-1
and then in the program I clear the BRGH bit (making the speed slow - and what is the limit here?).
Instead of the desired chars, I am getting some garbage. If I reduce the speed to 38400 b/s (or lower), everything works just fine.
I also tried
#define X ((XTAL*d'1000000')/(d'16'*BAUD))-1
and then set BRGH bit high, so I started to get some new garbage. I also tried to change the XTAL to 40, but no success.
Two questions:
1. what is the bitrates for BRGH=1 and BRGH=0?
2. is this a limitation of a pic/max/pc?
PS: I am using COM2 on pc which is set to 115200 in devices, and then set to appropriate BAUD in terra term. Also, fifo buffers are off.
Thank You.