Arduino:将数据存储在EEPROM中的轻量级压缩算法 [英] Arduino: Lightweight compression algorithm to store data in EEPROM

查看:285
本文介绍了Arduino:将数据存储在EEPROM中的轻量级压缩算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 ATmega168 存储大量数据到我的Arduino上 ATmega328 微控制器,但遗憾的是只有256 KB / 512 KB的EEPROM存储空间。

I want to store a large amount of data onto my Arduino with a ATmega168/ATmega328 microcontroller, but unfortunately there's only 256 KB / 512 KB of EEPROM storage.

我的想法是利用压缩算法来减小大小。但是,我对压缩算法的了解相当低,我对即用库的搜索失败。

My idea is to make use of an compression algorithm to strip down the size. But well, my knowledge on compression algorithms is quite low and my search for ready-to-use libraries failed.

那么,是否有一个很好的方法来优化存储大小?

So, is there a good way to optimize the storage size?

推荐答案

您可能会看到 LZO 算法,其设计是轻量级的。我不知道AVR系统是否有任何实现,但这可能是您可以自己实现的。

You might have a look at the LZO algorithm, which is designed to be lightweight. I don't know whether there are any implementations for the AVR system, but it might be something you could implement yourself.

您可能会误认为存储量可用于您的芯片上的EEPROM;根据数据表我有EEPROM大小是:

You may be somewhat misinformed about the amount of storage available in EEPROM on your chip though; according to the datasheet I have the EEPROM sizes are:

ATmega48P:256

ATmega88P:512

ATmega168P:512 < br>
ATmega256P:1024

ATmega48P: 256
ATmega88P: 512
ATmega168P: 512
ATmega256P: 1024

请注意,这些值在字节中,而不是你在问题中提到的KB。这不是任何措施,shitload。

Note that those values are in bytes, not KB as you mention in your question. This is not, by any measure, a "shitload".

这篇关于Arduino:将数据存储在EEPROM中的轻量级压缩算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆