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.

Atmega 328 and eeprom

Status
Not open for further replies.

dartvaneri

Newbie level 4
Joined
Jan 14, 2012
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,324
Hello!
How much fit in Atmega 328 eeprom memory data? When i should get there about twenty object data. One object contain next data:
-object width
-object circumference from top
-object circumference from bottom
-object weight
-object name

Fit these data from Atmega 328 eeprom memory? Data are the variables.

Ps. Sorry, but i can't speak/write english good.
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,032
Trophy points
1,393
Location
Greece
Activity points
64,375
According to the datasheet

256/512/512/1K Bytes EEPROM (ATmega48PA/88PA/168PA/328P)

So you have 1024 bytes

What are the byte widths of your object variables?

Alex
 

dartvaneri

Newbie level 4
Joined
Jan 14, 2012
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,324
I am not sure, but most variables contain max two number. example: if object's height is 7cm, so save to variables number 7. I don't know how 'name' variable data save. Hexadecimal number?
Edit. is sensible use a outside memory card, than eeprom memory?
 
Last edited:

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,032
Trophy points
1,393
Location
Greece
Activity points
64,375
If eeprom size is enough then it makes sense to use it instead of an external storage.

The byte size depends on the variable type , for example


1 byte:
signed: -128 to 127
unsigned: 0 to 255

2 bytes
signed: -32768 to 32767
unsigned: 0 to 65535

4 bytes
signed: -2147483648 to 2147483647
unsigned: 0 to 4294967295
float +/- 3.4e +/- 38 (~7 digits)


and there is the object name which depends on what you have defined, how many char do you provide for the name, is it 10 chars , 20 chars...?
 

dartvaneri

Newbie level 4
Joined
Jan 14, 2012
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,324
Okay, thanks.
I think, that I give users write to max 10 chars.
Is MMC good memory card this used?
I not believe, that this purpose need, big memory card, is 32MB memory card suitable?
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,032
Trophy points
1,393
Location
Greece
Activity points
64,375
if you don't want to use the internal eeprom then you can use external ones that can have a higher capacity or even flash memory chips that have even higher capacity.
Why do you want to use a MMC card, do you want to be able to remove the card?

Anyway I haven't used a card so I can't answer if it is good or not, I only know that it can be done.
 

dartvaneri

Newbie level 4
Joined
Jan 14, 2012
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,324
hmm. I not need use memory card, if i use external eeprom memory or flash memory. Is flash memory better than eeprom? What eeprom or flash memory circuit you recommend? Speed not need is very hight. Memory must not come to full.
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,032
Trophy points
1,393
Location
Greece
Activity points
64,375
Why do you want to use an external storage?

You asked for twenty objects, suppose that all the numbers are 4 bytes each which sums to 16 bytes and you have 20 bytes for the name, total 16+20=36 bytes

In a space of 1024 bytes you can fit 1024/36 =28 objects
If you reduce the name length or any of the number types then you can fit more.

---------- Post added at 17:36 ---------- Previous post was at 17:32 ----------

If you want an external storage then these eeproms are popular, they use two wire I2C.

ATMEL
24C02P 256x8 Serial CMOS EEPROM
24C04P 512x8 Serial CMOS EEPROM
24C08 1kx8 Serial CMOS EEPROM
24C16 2kx8 Serial CMOS EEPROM
24C32 4kx8 Serial CMOS EEPROM
24C64 8kx8 Serial CMOS EEPROM
24C128 16kx8 Serial CMOS EEPROM
24C256 32kx8 Serial CMOS EEPROM
24C512 64kx8 Serial CMOS EEPROM


Microchip
24LC08 1kx8 Microchip Serial EEPROM
24LC16B 2kx8 Microchip Serial EEPROM
24LC32 4kx8 Microchip Serial EEPROM
24LC64 8kx8 Microchip Serial EEPROM
24LC128 16kx8 Microchip Serial EEPROM
24LC256 32kx8 Microchip Serial EEPROM
24LC512 64kx8 Microchip Serial EEPROM
 

dartvaneri

Newbie level 4
Joined
Jan 14, 2012
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,324
Because i calculate again, that what i need there, so i get the result, that 1kb not enough. If eeprom would 5kb, it should enough.

Edit. Is this good eproom memory circuit?
24C32 - 24C32 4k x 8 Serial CMOS EEPROM
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top