Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

problem to convert some files

Status
Not open for further replies.

hamma!ess

Newbie level 3
Joined
Nov 7, 2010
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
tunisia
Activity points
1,343
hello my friends,
How do i convert files .BAS(QBASIC) to C because I have PIc model 16F and I need file type C.Please I need this converter and thanks for help
 

if you can compile that BASIC files to hex..it doesnt matter anymore..what software you use to write your BASIC program?
 

i don't write these basic files.i found them written in basic language but i need them in language c .if it is possible to compile them to hex,it is better also.can you explain more this method??
 

can you attach that basic file?

i have sofware that can write pic program in basic and i can compile through it.. if the programmer of that file use the same software with me, i can compile it for you ..
 

' ****************************************************
' * MONTAGES ELECTRONIQUES POUR TELEPHONES PORTABLES *
' ****************************************************
' - Emetteur SMS - (Mode PDU)

' Le 31/03/03 par D.REY (Redirect by ulimit.com)
'
' Un SMS est envoyé (en mode PDU) quotidiennement à une heure programmée
' La date et l'heure ainsi que le nombre de SMS envoyés sont affichés sur l'écran LCD du montage


' DECLARATION DES CONSTANTES
' ----------------------------------------------------------------------------------------------------------------------
Const BDS = 103 'Vitesse de transmission (9600bds)
Const RXD = 17 'Broche utilisée pour réception série
Const TXD = 16 'Broche utilisée pour émission série


' DECLARATION DES VARIABLES
' ----------------------------------------------------------------------------------------------------------------------
DIM CLK(20) AS BYTE 'Contient la date et l'heure
DIM old AS BYTE 'Mémorisation ancienne unité du jour
DIM nbSMS AS BYTE 'Contient le nombre de SMS envoyés
DIM i AS BYTE 'Divers


' INITIALISATION DE L'ECRAN LCD
' ----------------------------------------------------------------------------------------------------------------------
SET PICBUS HIGH 'Initialisation du PIICBUS
LCDINIT 'Initialisation écran LCD


' TEST LIAISON SERIE
' ----------------------------------------------------------------------------------------------------------------------
i=0 'Initialisation de i
TEST0:SEROUT TXD,BDS,0,1,["AT",13] 'Envoi de la commande AT
SERIN RXD,BDS,0,2000,TEST1,[WAIT("OK"),i] 'Attends réponse "OK" du ME
TEST1:IF i<>0 then 'Si i différent de zéro
LOCATE 0,0 'Sur 1ere ligne LCD
PRINT "Liaison OK" 'Affiche "Liaison OK"
ELSE 'Si i n'est pas différent de zéro
LOCATE 0,0 'Sur 1ere ligne LCD
PRINT "PB liaison !" 'Affiche "PB liaison !"
DELAY 5000 'Temporisation de 5s
END IF 'Fin de l'instruction IF
IF i=0 THEN GOTO TEST0 'Si i=0 branche sur TEST0
DELAY 5000 'Temporisation de 5s


' SELECTION DE L'ALPHABET GSM
' ----------------------------------------------------------------------------------------------------------------------
SEROUT TXD,BDS,0,1,["AT+CSCS=",34,"GSM",13] '
DELAY 500 '


' CODE PIN
' ----------------------------------------------------------------------------------------------------------------------
SEROUT TXD,BDS,0,1,["AT+CPIN=",34,"7208",34,13] 'Entre le code PIN, 7208 par défaut
DELAY 500 'Temporisation de 500ms


' INITIALISATION ME en mode PDU
' ----------------------------------------------------------------------------------------------------------------------
CLS 'Efface l'ecran LCD
i=0 'Initialisation de i
SEROUT TXD,BDS,0,1,["AT+CMGF=0",13] 'Mode PDU
DELAY 1000 'Temporisation de 1000ms (1s)


' ATTENTE / AFFICHAGE DATE et HEURE SUR ECRAN LCD
' ----------------------------------------------------------------------------------------------------------------------
old=0 'Initilaisation de old
ATT: SEROUT TXD,BDS,0,1,["AT+CCLK?"] 'Demande la date et l'heure au ME
DELAY 500 'Temporisation 0,5s
SEROUT TXD,BDS,0,1,[13] 'Retour chariot <CR>
SERIN RXD,BDS,0,2000,ATT,[WAIT("LK"),CLK(0)~20] 'Attend les caractères "LK" les 20 caractères suivants sont placés dans CLK
LOCATE 0,0 'Affichage sur 1ere ligne LCD
PRINT CLK(9),CLK(10),"/",CLK(6),CLK(7)," " 'Recomposition et affichage de la date JJ/MM
FOR i=12 TO 19 '
PRINT CLK(i) 'Affichage de l'heure HH:MM:SS
NEXT i '

IF CLK(10)<>old THEN 'Si unité jour différente de la précédente
IF CLK(12)="0" AND CLK(13)="9" THEN 'Definit l'heure d'envoi ici 09
IF CLK(15)="5" AND CLK(16)="5" THEN GOSUB EMET 'Définit les minutes ici 55
END IF '
END IF '

GOTO ATT 'Branche sur ATT


' EMISSION SMS
' ----------------------------------------------------------------------------------------------------------------------
EMET: nbSMS=nbSMS+1 'Incrémente le compteur de SMS
IF nbSMS>99 THEN nbSMS=0 'Remise à zéro du compteur si > à 99
LOCATE 0,1 'Affichage commentaire sur 2eme ligne LCD
PRINT DEC(nbSMS,2,0)," SMS envoye(s)" 'Affichage du nombre de SMS envoyés
SEROUT TXD,BDS,0,1,["AT+CMGS=46",13] 'Prépare l'envoi d'un SMS
DELAY 1000 'Temporisation 1s

'MESSAGE AU FORMAT PDU
'Destinataire : 0675321959, Message : Ceci est un message de test programme

SEROUT TXD,BDS,0,1,["0011000A8160572391950000AA25C3F2380D2ACFE9A0BA1BD42ECFE7E17319442E83E8E5391D0497BFCFF270BB5D06"]

SEROUT TXD,BDS,0,1,[26] 'Caractère <eof> qui provoque l'envoi du SMS
old=CLK(10) 'Mise à jour de la variable old
RETURN 'Retour au programme d'appel


' FIN DU PROGRAMME
 

im sorry my friend, i cant compile it for you..myb it was written with different software with me..
 
thanks friend for your help,i try to compile by the program MICROCODESTUDIO PROGRAM may be a solution
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top