[moved] Bascom compiler
Wed Apr 02 2008, 08:20 pm
Download BASCOM 8051 Manual
you will get a lot of info inside.. to get you started..
here is small piece of code..
you will get a lot of info inside.. to get you started..
here is small piece of code..
$baud = 9600 $crystal = 11059200 ' 11.0592 MHz crystal Print "Rickey's World" End
[ Edited Wed Apr 02 2008, 09:38 pm ] Tags bascom 8051 serial communication
Sat Apr 05 2008, 03:24 pm
i have gone through the manual..but didnt get wat i was lookin for...can you please help me to send AT commands using 89c52 uc to a max 232 ic which is interfaced with GSM module...do i need to send data to the sbuf first and then transfer it on the tx pin...or will the "print" command do the same...
i tried using the same program given above and connected it to a hyperterminal...but cudnt read the data there...help plz..
i tried using the same program given above and connected it to a hyperterminal...but cudnt read the data there...help plz..
[ Edited Sat Apr 05 2008, 03:26 pm ]
Sat Apr 05 2008, 08:18 pm
You don't need to do anything with sbuf. 'Print' will handle all that.
Have you setup hyperterminal properly......baudrate 9600,8-N-1,flowcontrol-none ?
If you're not getting any output in hyperterminal,it could either be incorrectly configured hyptrmnl,some problem with the serial connection with MAX,or the microcontroller itself or it's associated circuitry.
Do check all connections carefully.
Have you setup hyperterminal properly......baudrate 9600,8-N-1,flowcontrol-none ?
If you're not getting any output in hyperterminal,it could either be incorrectly configured hyptrmnl,some problem with the serial connection with MAX,or the microcontroller itself or it's associated circuitry.
Do check all connections carefully.
Sat Apr 05 2008, 10:24 pm
print command will do..
thats why basic is so simple.. and it really spoils you
thats why basic is so simple.. and it really spoils you
Sun Apr 06 2008, 11:07 pm
thnks guys..i think there shld be sm thing wrong wid the hardware only..will check it again..thanks once again...
Mon Apr 07 2008, 07:13 pm
hi guys..
i wanted to know how to send special characters like "ctrl+z" through serial port using bascom...i know the decimal equivalent of "ctrl +z" is 26..but if i print 26 using bascom will it take it as the ctrl+z...a part of the program i have written is as follows
dim crz as integer
crz=26
print crz
tell me if this is the correct way to transmit a decimal equivalent...
i wanted to know how to send special characters like "ctrl+z" through serial port using bascom...i know the decimal equivalent of "ctrl +z" is 26..but if i print 26 using bascom will it take it as the ctrl+z...a part of the program i have written is as follows
dim crz as integer
crz=26
print crz
tell me if this is the correct way to transmit a decimal equivalent...
Mon Apr 07 2008, 07:34 pm
following is the codei have written to config the gsm modem..plz correct it and reply asap...thanks...
$regfile = "89s8252.dat"
$crystal = 11059200
$baud = 9600
Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = P1.4 , Db5 = P1.5 , Db6 = P1.6 , Db7 = P1.7 , E = P1.3 , Rs = P1.2
Dim Name As String * 12
Dim Crz As String * 5
Crz = "26"
Print "AT+CSCA=+919892051914 " 'mesg center no
Waitms 1000
Print "AT+CMGF=1" 'initializing modem
Waitms 1000
Print "AT+CSMP=17,168,0,0" 'using eng char
Waitms 1000
Print "AT+CMGS= " + 9198197xxxxxx "" 'number to send mesg to
Waitms 1000
Printhex Crz
End
$regfile = "89s8252.dat"
$crystal = 11059200
$baud = 9600
Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = P1.4 , Db5 = P1.5 , Db6 = P1.6 , Db7 = P1.7 , E = P1.3 , Rs = P1.2
Dim Name As String * 12
Dim Crz As String * 5
Crz = "26"
Print "AT+CSCA=+919892051914 " 'mesg center no
Waitms 1000
Print "AT+CMGF=1" 'initializing modem
Waitms 1000
Print "AT+CSMP=17,168,0,0" 'using eng char
Waitms 1000
Print "AT+CMGS= " + 9198197xxxxxx "" 'number to send mesg to
Waitms 1000
Printhex Crz
End
Tue Apr 08 2008, 11:29 am
Use print chr(26); or if you prefer print chr(Crz);
Please note that when you use the print statement always add a crlf at the end of the string;
so you have to suppress this crlf with the ";" and then send ONLY the cr.
Print "AT+CSCA=+919892051914 "; 'suppress cr lf
print chr(13); 'now send cr
Regards
Please note that when you use the print statement always add a crlf at the end of the string;
so you have to suppress this crlf with the ";" and then send ONLY the cr.
Print "AT+CSCA=+919892051914 "; 'suppress cr lf
print chr(13); 'now send cr
Regards
Powered by e107 Forum System