fag.bhu
Newbie level 4
hi ,
I am trying to send few AT Commands from my PIC Controller to the modem ....... I observed that my Controller is sending the AT commands correctly at 9600 baud rate..... But it sends garbage values at 115200 baud rate....
According to the requirements mentioned in my Modem's Manual ..... I need to send the AT Commands at 115200 baud rate.
So, I am not able to find any solution for this issue .... Please suggest some fixes for the same ....
The baud rate count which i am loading in my controller i.e in my SPBRG register , and other related details are as under :
Count for 9600 baud rate using 16MHZ crystal : 25 (Exact value : 25.04) (Working with the Controller)
Count for 115200 baud rate using 16MHZ crystal : 1 (Exact value : 1.17) (Not Working i.e throws garbage value at the modem)
desired baud rate for my modem : 115200
formula used : ((Fosc/baud rate)/64)-1
please highlight the problem in my system ...... i want to send my AT commands at 115200 baud rate from my controller without garbage value ......
the initialization program goes like this :
#INCLUDE<P18F46J11.INC>0
CONFIG OSC=HS
R2 EQU 0X40
R3 EQU 0X44
R4 EQU 0X48
ORG 0
MOVLW 0x20 ;enable transmit and low baud rate
MOVWF TXSTA
MOVLW D'25' ;115200 BPS at 16MHZ
MOVWF SPBRG1
BSF RCSTA,SPEN; enable the serial port
revert asap .....
regards,
fag
I am trying to send few AT Commands from my PIC Controller to the modem ....... I observed that my Controller is sending the AT commands correctly at 9600 baud rate..... But it sends garbage values at 115200 baud rate....
According to the requirements mentioned in my Modem's Manual ..... I need to send the AT Commands at 115200 baud rate.
So, I am not able to find any solution for this issue .... Please suggest some fixes for the same ....
The baud rate count which i am loading in my controller i.e in my SPBRG register , and other related details are as under :
Count for 9600 baud rate using 16MHZ crystal : 25 (Exact value : 25.04) (Working with the Controller)
Count for 115200 baud rate using 16MHZ crystal : 1 (Exact value : 1.17) (Not Working i.e throws garbage value at the modem)
desired baud rate for my modem : 115200
formula used : ((Fosc/baud rate)/64)-1
please highlight the problem in my system ...... i want to send my AT commands at 115200 baud rate from my controller without garbage value ......
the initialization program goes like this :
#INCLUDE<P18F46J11.INC>0
CONFIG OSC=HS
R2 EQU 0X40
R3 EQU 0X44
R4 EQU 0X48
ORG 0
MOVLW 0x20 ;enable transmit and low baud rate
MOVWF TXSTA
MOVLW D'25' ;115200 BPS at 16MHZ
MOVWF SPBRG1
BSF RCSTA,SPEN; enable the serial port
revert asap .....
regards,
fag