Pages: [1]   Go Down
Author Topic: Mechanism for installation specific configurable parameter - EEPROM ?  (Read 313 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 117
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My project involves multiple sensor nodes. The sensors need to behave somewhat differently based on certain parameters that are configured on a per sensor node, including calibration information. One easy way is to create different firmware for each instance.

I am wondering if it would be a good / recommended way, to use EEPROM, to store the configuration values, such that all the sensors are able to run the same firmware. That way, I only need to write the specific words in EEPROM, without touching firmware ?

However, with this approach, I'm running into a bit of problem that on my target uC (attiny85), I shall fall short of needed number of GPIO pins, if I reserve the ISP header pins, for it's subsequent programability (to write to EEPROM). Is this then something, that I should use jumper-pins to shunts to work around ? I.e. when I need to program uC, the jumper-settings are changed to connect uC pins to ISP pins (MISO, MOSI, SCK), and post programming jumpers are reset to allow them to function as GPIO ?

Keeping the sensor device circuit simple and low-cost is a key goal.
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4552
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am wondering if it would be a good / recommended way, to use EEPROM, to store the configuration values, such that all the sensors are able to run the same firmware. That way, I only need to write the specific words in EEPROM, without touching firmware ?

Yes, that's exactly the sort of thing the EEPROM is for.
Logged

No, I don't answer questions sent in private messages...

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

However, with this approach, I'm running into a bit of problem that on my target uC (attiny85), I shall fall short of needed number of GPIO pins, if I reserve the ISP header pins, for it's subsequent programability (to write to EEPROM). Is this then something, that I should use jumper-pins to shunts to work around ? I.e. when I need to program uC, the jumper-settings are changed to connect uC pins to ISP pins (MISO, MOSI, SCK), and post programming jumpers are reset to allow them to function as GPIO ?

You don't need to dedicate the ICSP pins, you can use them as general I/O as well. However:

- If you use them as output pins, then whatever is connected to them must not put more load on them than the programmer can drive, and must tolerate the signals that appear on them during programming.
- If you use them as input pins, then whatever device is attached to them must be able to handle the digital signals that appear on them during programming. For example, a push button connected to ground is OK as long as that button is not pressed during programming. For other devices driving those input pins, you may need to add a series resistor.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Wahiawa, Hawaii
Offline Offline
God Member
*****
Karma: 27
Posts: 582
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is an excellent guide for multiplexing pin usage.  http://www.kanda.com/avr-isp-circuits.html

Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 149
Posts: 2790
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I am wondering if it would be a good / recommended way, to use EEPROM, to store the configuration values, such that all the sensors are able to run the same firmware. That way, I only need to write the specific words in EEPROM, without touching firmware ?

However, with this approach, I'm running into a bit of problem that on my target uC (attiny85), I shall fall short of needed number of GPIO pins, if I reserve the ISP header pins, for it's subsequent programability (to write to EEPROM).
I perceive [ie, am 2nd guessing] from this that you are thinking of connecting an external
EEPROM chip. However, Arduino chips have "internal" EEPROM for what you need, so
#of I/O pins is a separate matter.
Logged

Pages: [1]   Go Up
Jump to: