mega8's EEPROM failed at client site

Go To Last Post
18 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I used mega8 with 8 mhz internal osc, with 32.768Khz crystal for timer, LCD, ADC inputs and 4 keys.
Everything worked very well at my clients place.
But when the device is installed at end-user's factory, mega8's EEPROM is corrupted after the first run.
First run was OK. but later eeprom's data is courrupted......
Any remidies........for this.............How to avoid it.............

YB

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

External Low Voltage Indicator (LVI) attached to reset. My designs never leave the bench without one.

Good quality power supply. I typically ise an IDEC supply with internal line filtering.

Good ground connections.

Good input interface design. I.E. input protection and filtering that exceeds the worst case noise problems that you think you would ever encounter.

A good understanding ot the environment the product will be going into, before the design is started and comitted to.

Consideration for temperature extremes, also before the design process procedes.

Lately, I have moved to optically isolated inputs allowing complete isolation between the real world and the circutry on the controller PCB. Input range is 4 -24 VDC so it covers a wide range of interface possibilities.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

microcarl wrote:
External Low Voltage Indicator (LVI) attached to reset. My designs never leave the bench without one.

You mean a "reset supervisor"? e.g. STM809L? I've never heard one called that.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

g_i_jim2000 wrote:
microcarl wrote:
External Low Voltage Indicator (LVI) attached to reset. My designs never leave the bench without one.

You mean a "reset supervisor"? e.g. STM809L? I've never heard one called that.

Check out Panasonic MN13881-U5 and Motorola MC34064P-5.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Using checksums or CRCs are a great help too. We use two copies of the data in our external EEPROMS. If the checksum doesn't match for the frist set, the second is checked. If it is correct we over write the first copy. If both are wrong then we halt. That has never happened in over 15 years!

Go electric!
Happy electric car owner / builder

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

Is it the whole EEPROM that got corrupted or was it a single location(byte)?

Most of us tend to stay away form the fist byte in the EEPROM.

Ken

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am yet to receive the instrument. So writing now based on what client has told me over phone.
1. It seems one byte of internal eeprom has corrupted.
2. I have used internal ADC. Reading ADC values and displaying them to LCD is a continous process (loop). He said instrument worked fine only ONE time. later the converted values were shown as wild characters on LCD.
Important to mention that the instrument was tested at my clients site and he was 100% satisfied with it. But at his end-users place with lots of motors and other equipments around, this instrument workd only once properly, later could not perform the task as expected.

My simple questions are:
1. is this hardware design fault?
or a software problem.

2. it seems that internal eeprom's byte is corrupted and also program counter is missing some lines in between. What could be the cause of it.

3. As instrument was tested at my clients place and my palce too, and failed at installation site, it shows its a noise problem, is there are list of DO's and DONT's to avoid noise problems with AVRs?

YB

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Perhaps you should take the time to research your chosen platform before creating sub-standard products. That's not an insult, but a constructive criticism.

Also, don't cut-and-paste code. Not only does it violate copyright in many instances, it means that you do not know what exactly is going into your program, thus makes problems hard to troubleshoot.

AVRs can have their first EEPROM location, address 0, corrupted at power-on unless you have either the BOD enabled, or an external reset IC.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ye, I do cut and paste. But the instrument has worked 100% perfectly andwas upto clients satisfaction.
Dean, as you know i am new to AVR, i post my queries here. And guys like you help me with concepts and code. So whats wrong if I copy the code with the copyright notice in my code as it is.

Quote:

AVRs can have their first EEPROM location, address 0,

Not 0th location but 2nd (01h) courrupted.

Quote:
you have either the BOD enabled, or an external reset IC.

No, i havnt used BOD or any external reset circuit.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Enabling BOD will solve your problem.
In addition, we:
- never use EEPROM location 0
- always set EEAR to 0 after every access to the EEPROM

In my experience EEPROM usage is only reliable with BOD.

/Martin.

/Martin.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Enabling BOD will solve your problem

mtaschl:
Apart from BODEN do i have to program BODLEVEL?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

Without knowing what your code does & no schematic to go by.
I just pitching in the dark here.

Quote:
Not 0th location but 2nd (01h) courrupted

How many time do you write the EEPROM section or that particular location 2?
The EEPROM do have a limited life of so many writes.
You may need to refer to the datsheet.

Ken

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Reading it once instruments starts and write whenever user changes the parameter.
Roughly 5 times a day.....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yellowboy_75 wrote:
Ye, I do cut and paste. But the instrument has worked 100% perfectly andwas upto clients satisfaction.
Dean, as you know i am new to AVR, i post my queries here. And guys like you help me with concepts and code. So whats wrong if I copy the code with the copyright notice in my code as it is.
...

Hmmm.... 100% perfectly up to clients satisfaction? Yet it doesn't work. (OK it worked once.) Nice reputation you are building for yourself there.

Cutting and pasting code and asking what's wrong if you include the copyright notice indicates you might not understand what you are doing legally or professionally. If you appropriate code to "save time" you might not know exactly what the code does or how it can fail, but that is your choice to make when delivering your product.

S, G,

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Someguy22 wrote:
yellowboy_75 wrote:
Ye, I do cut and paste. But the instrument has worked 100% perfectly andwas upto clients satisfaction.
Dean, as you know i am new to AVR, i post my queries here. And guys like you help me with concepts and code. So whats wrong if I copy the code with the copyright notice in my code as it is.
...

Hmmm.... 100% perfectly up to clients satisfaction? Yet it doesn't work. (OK it worked once.) Nice reputation you are building for yourself there.

Cutting and pasting code and asking what's wrong if you include the copyright notice indicates you might not understand what you are doing legally or professionally. If you appropriate code to "save time" you might not know exactly what the code does or how it can fail, but that is your choice to make when delivering your product.

S, G,

Bingo, the point I was trying to make.

If you are making a product professionally, you should at least know the basics of what you are doing. While I would now trust myself to write firmware for non-critical but commercial products (toys, clock-related apps and the like) I wouldn't even think of trying to write a POS system, where the failure of the device would result in major lost income. For example one of the users here (Microcarl?) works at a place where every minute the factory line is down several thousands dollars worth of revenue would be lost. I'd trust Microcarl's code and expertise infinitely more than a hacked-together job.

If you wish to get into the business, learn what there is to learn. Copying others code - and making money of other's expertise - is a terrible thing to do, not to mention illegal depending on the copyrights. Most people here (myself included) post code and provide help to teach you so you can write your own code, not so you can charge others for it!

I've said it before, but I'll say it again. Cut-and-paste code in an application where you have no idea how said code works is a terrible idea. You do not know of the potential failure points, and you cannot add/change/fix the code properly without introducing new faults.

Learn first, charge later.

- Dean :twisted:

EDIT: This would probably have been better as a PM. Sorry for the derail!

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I dont mind for this open message.
Dean, try to understand the difference between Indian Economy and AUS/Europe economy.
You guys have enough time and money to play around. We dont have money, time, resources to live lavishly in professional and personal matters.
e.g. You can buy a laptop at the age of 14, you get a abcminiboard as gift at the age of 12, whereas an avarage Indian can buy a laptop only after age of 30. Fine there are rich people too in India, but theri kids are not eager to PUT efforts the way you have taken to master some technology.
But people like me are from average income group families where day to day earning is important apart from mastering the technology.

I have learn more than 20 software technologies, 1 controller (8051) on my own and have developed my own company from $0. Now as AVR is hot in market, at the same time I dont have time left from my daily activities, no developer wants to work for a startup company like ours, so option remains is cut ->understand -> paste rather than Learn - > test ->write.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

Sure we much be rich.(Well I'm not)
eg: A traffic warden who hold a sign of STOP & GO earns double my wage. No brain for him, but mine is running overtime likes all other technician. I might consider a career change.

Agreed(Dean).
Never be sorry about derailing.
But straight to the point is what needed to remind them of their own action.

I would be very worried if that happen to my area where highly specialise research experiment is an ongoing process.
Like for example, interfacing to $1,000,000 machine is not just a walk in the park but have to understand it operation & make sure my black box does not interfere or fail or damage this expensive equipment. It must be reliable & reproducible at all time. Everything must be factored into the design as what safeguards are to be implemented & protection & safety & legally accepted by certain standard applicable to what country is to be use in. This does not happen over night as others experience members know what I am talking about.

Cut & paste, no way.

I want to have control of my written code.

Ken

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Apart from BODEN do i have to program BODLEVEL?

Just ensure, that VCC never falls below the selected BOD treshold during proper operation (pay attention to the tolerance of BOD and the voltage regulator).
/Martin

/Martin.