Discussion in "8051 Discussion Forum" started by    Alok Shah    Apr 2, 2008.
Wed Apr 02 2008, 02:06 PM
#1
i wanted to know how to program 89c52 using bascom compiler...
Wed Apr 02 2008, 02:50 PM
#2
Download BASCOM 8051 Manual
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, 04:08 PM ]
Tags bascom 8051 serial communication
Wed Apr 02 2008, 08:04 PM
#3

thank you.
very good.
:bye
Sat Apr 05 2008, 09:54 AM
#4
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..


[ Edited Sat Apr 05 2008, 09:56 AM ]
Sat Apr 05 2008, 02:48 PM
#5
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.
Sat Apr 05 2008, 04:54 PM
#6
print command will do..
thats why basic is so simple.. and it really spoils you
Sun Apr 06 2008, 05:37 PM
#7
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, 01:43 PM
#8
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...
Mon Apr 07 2008, 02:04 PM
#9
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
Tue Apr 08 2008, 05:59 AM
#10
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

Get Social

Information

Powered by e107 Forum System

Conversation

Sat Jul 20 2019, 05:38 AM
charmdatexvo
cooking
ExperimenterUK
Thu Jul 11 2019, 07:55 PM
@ramos https://www.theengineeringprojects.com/2017/09/l298-motor-driver-library-proteus.html
ExperimenterUK
Thu Jul 11 2019, 07:44 PM
@praveen123. Can you give a link to the project ?
Thu Jul 11 2019, 04:47 PM
ramos
buenos dias alguien podria ayudarme necesito saber como descargar la libreria del l298n para proteus
Thu Jul 11 2019, 11:11 AM
praveen123
anyone can help me
Thu Jul 11 2019, 11:11 AM
praveen123
i need source code for 8051 -smart trolley rfid
Thu Jul 11 2019, 11:10 AM
praveen123
hii
ExperimenterUK
Thu Jun 27 2019, 09:14 PM
Hi.. good to see you again
۞ TPS ۞
Thu Jun 27 2019, 07:31 AM
Hello
AdiGhazi
Tue Jun 18 2019, 11:21 AM
Hlo Dear , I've to program AT89C51AC3 RT-LUM using flip but I'm getting time out error for RS232. Will you please suggest me which programmer will be supportable to program this Chip.

Downloads

Comments

rpels7707
Fri Jul 19 2019, 11:31 AM
ameya123
Fri Jul 19 2019, 07:36 AM
anhsieuno
Thu Jul 18 2019, 11:39 AM
zxcvbnm1234
Sat Jul 13 2019, 07:09 AM
surajghayal
Wed Jul 10 2019, 01:17 PM
figureyang
Fri Jul 05 2019, 04:25 AM
mousompal
Sat Jun 29 2019, 05:02 PM
AdiGhazi
Tue Jun 18 2019, 11:15 AM

Online

Guests: 30, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38080
Newest member: rpels7707
Forum Activity
ameya123 Avatar
Posted By ameya123
Fri Jul 19 2019, 07:42 AM
Hello,Please share 8051 Assembly language code for...
figureyang Avatar
Posted By figureyang
Fri Jul 05 2019, 04:37 AM
here is the source code prepared for you download ...
figureyang Avatar
Posted By figureyang
Fri Jul 05 2019, 04:30 AM
Cheap_Flash_FS(Normal Version)--Embedded FAT16/32 ...
wimac Avatar
Posted By wimac
Sat Jun 22 2019, 01:26 PM
I’ve use the AT89C51ED2 which has a similar progra...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Jun 20 2019, 10:08 PM
baud rate is 9600 at stop bits of 2. AdiGhaziThe u...
AdiGhazi Avatar
Posted By AdiGhazi
Thu Jun 20 2019, 05:24 AM
Dear,I'm using RS232 serial port cable to use flip...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Jun 18 2019, 10:19 PM
Okay.. I have never programmed the AT89C51AC3 or ...
AdiGhazi Avatar
Posted By AdiGhazi
Tue Jun 18 2019, 11:20 AM
Hlo Dear ,I've to program AT89C51AC3 RT-LUM using ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu May 30 2019, 08:32 PM
It occurs to me that although the P89LPC921 and P8...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed May 29 2019, 09:05 PM
I would suggest a fresh approach.The Keil compile...