Writing to Flash or EEPROM

Good Afternoon

I'm trying to store some data (about 2048 bits) to the microcontroller (attiny85) memory, in a way that with will be acessed by the pc while its running. But in a some moments the data must be deleted from the microcontroller.
I was thinking i should use the flash for this job, but since the bootloader is located there i'm afraid i will corrupt it. Any advices on how to preceed?

Thanks
Amaury

The flash is not feasible to store data during program run. It is possible but flash is wearable too quickly. The EEPROM is good for data which are not changing frequently (lifetime 100 000 write cycles). ATtiny85 has just 512 bytes so you have to use external EEPROM if it is the case, or different chip.
For frequent writes SD card is definitely the best solution.

2048 bits will fit in the internal EEPROM of the ATtiny85.

My bad, he wrote 2048 bits == 256 bytes.
:-X

+1 pert

The number of cycles is not a problem, becouse it will b written in max 2 to 3 times, and the constant read from the pc does not count has a cycle (in other words it does not wear it off). The problem is locating the exact size of the bootloader and its location, wich i cannot find anywere (i'm using the digikey usb attiny85).
In another words how can i map the memory???

I don't see any bootloader section in the Attiny85 datasheet.

Thus the bootload code like starts at address 0x00, and goes for 512 or 1024 bytes?

Do some reading here

Thanks i still coulnd find anything relating to the bootloader size. Mine is a Digikey Attiny85 bootloader. I tried to contact them but without success. But regarding flash write/read, rotine i am able to write, but until now i have not figured a way to read. I'm not using any libraries. Just working from datasheet.

"Mine is a Digikey Attiny85 bootloader. I tried to contact them but without success."
Digikey? I didn't know they had bootloaders. Did you find that at the Digikey website somewhere?

Since it's only one flash area, with no designated bootload section, I suspect the flash can be any size.

Pardon mine unexperience but to relieve any wrong thoughts i may have it's a digikey (chip from atmel ofc), attinny85, since it has it's hardware to directly connect to usb port it's possible to communicate with it via usb port (no need for programmer, besides arduino). Let me explain myself, i have the code to store the password in a certain part of the memory, but i want the code be stored in program memory ina way hat when someone try to write in the microchip it will write above it, deleting the password itself. For that i need the bootloader size exactly to delete the selected part. Excuse my unknowledge about bootloaders. But my question resides, "the size and location of the bootloader?".