Hello
I want reset the EEPROM to 0, when the counter is 9999; But not programming another time the PIC ? utilize flowchart.
EEPROM RESET
Moderator: Benj
-
- Posts: 311
- Joined: Sat Jan 12, 2008 2:08 am
- Has thanked: 104 times
- Been thanked: 47 times
- Contact:
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: EEPROM RESET
Not sure what you mean by that.electron67 wrote: But not programming another time the PIC ?
If you look at the flowchart, you can see how to write 0 to EEPROM, just addresses = 0 to 3 and all bytes = 0
e.g
Add,Bytes
0,0
1,0
2,0
3,0
If I was you I would always check for valid data, then read EEPROM as explained in a previous post.
Martin
Martin
-
- Posts: 311
- Joined: Sat Jan 12, 2008 2:08 am
- Has thanked: 104 times
- Been thanked: 47 times
- Contact:
Re: EEPROM RESET
The problem is that the counter to go 0001.....9998, 9999 and automatic go 0000, 0001....9999, 0000. I maked flowchart (if rojo>9999) go 0000, but not happen this;
Spanish_dude wrote:
if (azul >= 9999)
{
// write 0 to EEPROM on address 2, 3
azul = 0; // reset azul
}
I agree this at flowchart, but I can`t to do work
Spanish_dude wrote:
if (azul >= 9999)
{
// write 0 to EEPROM on address 2, 3
azul = 0; // reset azul
}
I agree this at flowchart, but I can`t to do work
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: EEPROM RESET
If that all you want to do then here is Flowchart to do that.
Since you can get random negative numbers, I have also got EEPROM to set to 0 if rojo or azul <0.
Martin
Since you can get random negative numbers, I have also got EEPROM to set to 0 if rojo or azul <0.
Martin
- Attachments
-
- ContadorLCDv16.fcf
- (14.76 KiB) Downloaded 211 times
Martin
-
- Posts: 311
- Joined: Sat Jan 12, 2008 2:08 am
- Has thanked: 104 times
- Been thanked: 47 times
- Contact:
Re: EEPROM RESET
Martin
Thank you, I break the head and are very easy.
You have some book, CD, or DVD that explain every theme of Flowcode4; I buy Microcontroler System Engineering (Bert Van Dam) and the CD Intro to Micros, but not explain complicaded themes.
Saludos.
Thank you, I break the head and are very easy.
You have some book, CD, or DVD that explain every theme of Flowcode4; I buy Microcontroler System Engineering (Bert Van Dam) and the CD Intro to Micros, but not explain complicaded themes.
Saludos.
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: EEPROM RESET
I also have that book, and a programming course, which not got very far into yet. The way I have learnt the most is by tiral and error.electron67 wrote:Martin
Thank you,
You have some book, CD, or DVD that explain every theme of Flowcode4; I buy Microcontroler System Engineering (Bert Van Dam) and the CD Intro to Micros, but not explain complicaded themes.
Saludos.
I think of a project and try to get flowcode to work exactly the I intended to when I first though of the project.
My advice you be to look at a free course form here:
http://www.matrixmultimedia.com/lc_microcontroller.php
There are flowchart examples from the fourms espicaly from:
http://www.matrixmultimedia.com/mmforum ... m.php?f=26
You can also get flowchart samples from:
http://www.matrixmultimedia.com/Flowcode3a-X.php
Just download a flowchart, Press F8 key to single step. Add variables to the variables window. Single step though flowchart and observe what's going on.
If you get stuck, you can use search, or look here:
http://www.matrixmultimedia.com/mmforum ... =26&t=6936
Or just post a question like you have done.
Most importantly, try your own solutions first.
Martin
Martin