Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

to convert .BAS File to .HEX File

Status
Not open for further replies.
sir,
i am doing a project and don't have so much time left
so please convert my .BAS file to .HEX file
 

Attachments

  • Edited_Source_Code_for _four_players.bas
    1.5 KB · Views: 316
You do not say which microprocessor this is for. How can anyone decide which compiler to use?

If I try to look at your .bas file, my PC warns that it may be dangerous and full of nasty things.

JimB
 
Jim B is right. We need to know how you wrote your BAS file? What tool did you use? And what microprocessor this is going to be loaded on?

You can include your code directly in your post between [ code] [ /code] tags, without the spaces. Like this:
Code:
Your code here
Etc, etc, etc...
 
Since I don't have that issue, the contents of the file is:

Code:
'****************************************************************
'*  Name    : UNTITLED.BAS                                      *
'*  Author  : [select VIEW...EDITOR OPTIONS]                    *
'*  Notice  : Copyright (c) 2016 [select VIEW...EDITOR OPTIONS] *
'*          : All Rights Reserved                               *
'*  Date    : 26-May-16                                         *
'*  Version : 1.0                                               *
'*  Notes   :                                                   *
'*          :                                                   *
'****************************************************************

Device=16F877A
XTAL= 20
ALL_DIGITAL TRUE

TRISA %00000000
TRISB %00000000
TRISC %00000000
TRISD %00001111

Symbol BUZZER PORTB.7

DelayMS 500
Low PORTA
Low PORTB
Low PORTC

LOOP:
If PORTD.0=1 Then GoTo CONTEST1
If PORTD.1=1 Then GoTo CONTEST2
If PORTD.2=1 Then GoTo CONTEST3
If PORTD.3=1 Then GoTo CONTEST4
GoTo LOOP
CONTEST1:
PORTC=6
High PORTB.0
High BUZZER
DelayMS 2000
Low BUZZER
DelayMS 4000
Low PORTB
PORTC=0
GoTo LOOP
CONTEST2:
PORTC=91
High PORTB.1
High BUZZER
DelayMS 2000
Low BUZZER
DelayMS 4000
Low PORTB
PORTC=0
GoTo LOOP
CONTEST3:
PORTC=79
High PORTB.2
High BUZZER
DelayMS 2000
Low BUZZER
DelayMS 4000
Low PORTB
PORTC=0
GoTo LOOP
CONTEST4:
PORTC=102
High PORTB.3
High BUZZER
DelayMS 2000
Low BUZZER
DelayMS 4000
Low PORTB
PORTC=0
GoTo LOOP

The target is apparently a PIC
Device=16F877A
 
Does anyone recognize which BASIC compiler it was written for?
PIC BASIC, PIC BASIC PRO, ?
 
sir,
i am doing a project and don't have so much time left
so please convert my .BAS file to .HEX file

Come on... do not cheat! The time you spent posting is enough for converting it yourself maybe 20 times.
 
sir,
seriously i don't have time as i am a beginner to PIC microcontroller
only 10 more days left
i am not kidding
seriously
My Device= PIC16F877A
compiler= Proton IDE
 
sourav, once you have the compiler,
it just takes few mS to derive the hex.

don't expect the code to work as you imagine.
many iterations might be needed.
while testing functions.
So, it is not a math or some thing to do a conversion and it just works!! perhaps a senior or proper code written , it might.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top