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

查看:1410
本文介绍了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天全站免登陆