Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Writing Singles type variables to EEPROM

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
MadMax

Bascom Member



Joined: 24 May 2005
Posts: 53
Location: Kingston, Ontario, Canada

canada.gif
PostPosted: Tue May 08, 2007 2:38 am    Post subject: Writing Singles type variables to EEPROM Reply with quote

Can someone explain to me how conversions are performed by Bascom when writing a Single type value to EEPROM.

For example the decimal value 0.1 is stored in EEPROM as: CDCCCC3D

I can't figure out what the conversion is.
I'd like to write a VB program to read an EEPROM file, convert and display the decimal values.

I've searched the forums, but not had any luck finding an answer.

Any help would be greatly appreciated!

Best,
Max
Back to top
View user's profile Visit poster's website MSN Messenger
ex4

Bascom Member



Joined: 13 Jan 2006
Posts: 1062
Location: indonesia

indonesia.gif
PostPosted: Tue May 08, 2007 12:52 pm    Post subject: Reply with quote

doing it is rather easy Very Happy , first i'd like to ask :
do u use i2c eeprom or internal eeprom??
basically write or read any kind of variable in bascom is doing it byte by byte, not as the whole var. use overlay structure on single or any other var that contain more than 1 byte
Back to top
View user's profile Visit poster's website AIM Address Yahoo Messenger
MadMax

Bascom Member



Joined: 24 May 2005
Posts: 53
Location: Kingston, Ontario, Canada

canada.gif
PostPosted: Tue May 08, 2007 1:42 pm    Post subject: Reply with quote

Hi ex4,

I'm using internal EEPROM.

Quote:
use overlay structure on single or any other var that contain more than 1 byte


Would you mind explaining what you mean here by overlay structure? I'm not familiar with this.

Thanks,

Max
Back to top
View user's profile Visit poster's website MSN Messenger
ex4

Bascom Member



Joined: 13 Jan 2006
Posts: 1062
Location: indonesia

indonesia.gif
PostPosted: Tue May 08, 2007 1:55 pm    Post subject: Reply with quote

btw, do u want to write/read eeprom using avr or do the write and read using vb with pc as the host???
Back to top
View user's profile Visit poster's website AIM Address Yahoo Messenger
MadMax

Bascom Member



Joined: 24 May 2005
Posts: 53
Location: Kingston, Ontario, Canada

canada.gif
PostPosted: Tue May 08, 2007 2:05 pm    Post subject: Reply with quote

I'm going to download the EEPROM from the Atmega128 using the AVRISP. Then just post process the .hex file using VB.
Back to top
View user's profile Visit poster's website MSN Messenger
oe9vfj

Moderator



Joined: 17 Jun 2004
Posts: 269
Location: Austria, Hard

austria.gif
PostPosted: Tue May 08, 2007 2:18 pm    Post subject: Reply with quote

BASCOM handles and stores floating point numbers (SINGLE, DOUBLE) in the format according to IEEE 754. Check http://en.wikipedia.org/wiki/IEEE_754
_________________
regards Josef

DOS - File System for BASCOM-AVR on http://members.aon.at/voegel
Back to top
View user's profile Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum