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.

Help on .bas to .hex.

Status
Not open for further replies.

pieter jamneck

New Member
Hi guys,

Can anyone please explain the right way of converting .bas to hex. and what software to use?

I am busy with a project,i think it is contrast problem. i have the .bas file and changed the value,but cant seem to compile to hex. I am using Microbasic.

Any Help????
 

Attachments

  • pieter lcd.bas
    29.2 KB · Views: 371
Hi guys,

Can anyone please explain the right way of converting .bas to hex. and what software to use?

I am busy with a project,i think it is contrast problem. i have the .bas file and changed the value,but cant seem to compile to hex. I am using Microbasic.

Any Help????
Here is your hex file
Hope you have changed the contrast to 100 as suggested in another post of yours, now you may use 16F628A instead as I made change for chip also
 

Attachments

  • Pieternew.zip
    3.1 KB · Views: 279
Last edited:
Hi, Pieter

it's a PicBasic Pro source file ...

you can buy it here:
**broken link removed**

For the price, you get the PBP compiler and the MCS IDE ...

I've attached the Hex ...

180£ for a single hex ... is somewhat expensive, don't you think ??? ;)

Alain

PS: Hex furnished with the project, no ??? : https://www.8051projects.net/request208.html
 

Attachments

  • pieter lcd.zip
    3.1 KB · Views: 190
Last edited:
Great cow basic is an open source compiler for pic.....
 
hi sarma,
thanks for the hex, but i did not change the contrast.......oops.

can you help me with another .hex please.im still new to mcu's, but like to learn.

THANKS FOR YOUR HELP!!
 
Acetronics,

Many thanks to you,but i did not set the contrast value. It is still set on 10.


Only the hex then i am finished. Im still not very sure of how to compile a code,First step is getting PIC Basic Pro ??
always played around with 555 and other basic electronics. started with the 12f.... but still learning to write code.

Thanks to all.
 
Hi, Pieter

you can directly edit the contrast value in the EEPROM window of your programmer ...

'eeprom parametri configurazione
...
Contrast con 5 'regolazione contrasto display

...

'Regolazione contrasto display
'valori suggeriti $B5 (chiaro) $DF (scuro) ma variano da display a display
eeprom contrast,[$c6] '10 display contrasto

...
read Contrast,dato
' Dato = $c5 'LCD Vop contrast

That means ...

Contrast value is located @ location 5 of the EEPROM and the value, for the day, is $c6 ... just change it, save the modified HEX, and program your Pic.

So simple as that ...

Alain
 
Last edited:
hi Alain,

sorry for the late reply,I was out of town for a few days.

I tried the locate the contrast in the eeprom,but no sucsess.
I am using Winpic 800.
Any advice?

Pieter
 
hi Alain,

sorry for the late reply,I was out of town for a few days.

I tried the locate the contrast in the eeprom,but no sucsess.
I am using Winpic 800.
Any advice?

Pieter

EEPROM tab, first line ... 6 th value ... : C6

Alain
 

Attachments

  • Document.pdf
    113.7 KB · Views: 341
Last edited:
hi alain,

Im stil having problems with my project.Maybe the voltage??

( Is it possible to convert hex back to .bas??)

Thanks for all your assistance

Regards
Pieter
 
The voltage needs to be around 3V. Simple to use 2 dry cells. how do you feel converting to .bas can help you,while , already you have the .bas file with you?

the Nokia3310 displays are piece sensitive. Thus the display contrast changes from piece to piece.
it has a range . Now that you know the contrast value location, in HEX, better try with some sample values 10units step

this can be done by editing the hex under winpic800, and save as a renamed file, every time. one you know the workable range, you can fine tune. All the process takes time
and I fear , there is no shortcut.
 
Last edited:
hi sarma,

My question on the .bas to .hex were purely for information only. I have got a lot of .hex files for a few projects. i would like to edit them in .bas,pbas or txt.

I have changed the values, but I think I was rushing it.As you said "this take time". I will start at the lowest and slowly go upwards.

The reason I thinked it was voltage,I was busy with a other project and connected 4.9 volt to the project (by accident!) and the lcd did same as in this one. As soon as I aplied the right voltage the problem was gone. I will change my power source to 2x 1.5volt cells and play around with the contrast values.

Thanks for your help.

Regards

Pieter (RSA)
 
instead ,
you spend a month and learn PBP, so that you can write you own programs instead of reverse engineering.
as it is not practicable and not healthy either.
 
Hi, Pieter

Is it possible to convert hex back to .bas??)

Decently NO ..., and that is same for every " High level " language ( C, Basic, Pascal ...)

the only thing you can do is retrieve assembler from Hex ... and it's not so simple, as you have to know very well the registers of the used processor.

Buying the Melabs compiler won't help you in making your thermo. work ... if you do no succeed by modifying the C6 value ...
there's no more straight way than the one I gave you ...

BTW, the guy gave the appoximative Contrast range ... in the .bas listing

valori suggeriti $B5 (chiaro) $DF (scuro) ma variano da display a display

"proposed values $B5 ( clear ) to $DF ( dark ), but could vary with display "

Alain
 
Last edited:
Variometer Calibration

Hello all,

First of all I aopologize to introduce a subject that is out of context, but, I was searching in the net a recent post of Alain "Acetroniccs" to try to get the following information.

Alain, I saw in a post in March 2006 about a variometer calibration and the formula that you advise Altitude Pressure relationship - RC Groups . To calibrate a pressure sensor BMP085 is it enough to use the formula you advise to calculate the correct altitude? I did an altimeter with the BMP085 and use the formula below, that is the formula in the spec sheet,
******
temp=(double) pressure/101325;
temp=1-pow(temp, 0.19029);
altitude=(44330*temp);
******

but, I get very large variations in altitude. According to GPS I live 94 meters above sea level, but with the sensor I get 85, 90 or others days 50 or less. According to your post in RCGroups you are an expert in altimeters calibration. Can you please help me on what I have to do to get the altimeter working as it should be.

Thanks in advance.

Regards,
Manuel Silva
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top