Friday, June 6, 2008

How Toknit A Male Beanie

Programming (12 °) - 06/06/1908

continue with the intent to make a program that would handle the EEPROM. First of all we want to clarify that we try to learn the management of this memory because we planned the module mounted on the CAN-SAT not only send their data to land acquisition but also store a few to read once recovered the form ground (in case the RF link with breaking ground for a period of time or for the entire flight). The PIC has 256 EEPROM memory locations so the amount of data that can save quite safely bounded.

Now, continue writing with regard to the day's activity.
during the week and separately investigated in our homes (with HelpTopics of microcode) and discover our error. We were using the incorrect instructions or misinterpreting its operation. We managed to determine the performance of the 3 previous instructions:

EEPROM:
used to store data in compilation times. Tells the memory recorder setee the addresses indicated in the EEPROM with the given values. Done only once (when you program the PIC).

READ:
used to read data at times execution. That is, to read the data stored in the EEPROM and store them in variables that are in the main memory and are erased once you cut the power of the PIC.

WRITE:
Used to write data to runtimes. That is, to store data temporarily stored in variables that are in the main memory and erased once the power is cut PIC.

So we needed were instructions READ and WRITE EEPROM, not because we want to save data will be obtained while the PIC is active (In fact the PIC is the device responsible for collecting the data).

decided that the use of arrays was unnecessary and in fact could be replaced by only 2 variables (remembering that an array is an addressable set of variables and is therefore more memory space using only 2 variables). We made a program using regular variables (of a Byte size or 8 Bit 's) that could be compiled and passed to the PIC. The program went smoothly. Here is the schedule .

is the most complex program so far and consists of several stages to explain:

The PIC is connected to the PC using the cable that we put together and once turned on it sends the following text being read by HyperTerminal :

After pressing a key has 2 secs. Pressing
LEE, IF NO RECORD.
RESTART THE PIC WHEN YOU TURN ON THE LED BY 2 TIME.

This tells the user what to do:

Once the user presses a key on the keyboard (any), the PIC gives you 2 seconds to decide what to do. If you press the button on the Breadboard (connected to PIC) will read what is stored in the first 10 sectors of the EEPROM, if not pressed for 10 seconds to make acquisitions analog midpoint of a potentiometer and saves in the first 10 sectors of the EEPROM. All times are listed in Breadboard by an LED that turns on or off depending on the time and activity. After any activity must disconnect and reconnect power to the PIC, to be reset and thus demonstrate that the stored data were actually stored in the EEPROM (any other information is erased when power cut). When you restart the process begins again allowing acquiring data stored in the previous session or save new.
The program went well and represented the biggest breakthrough to date. We're ready to begin scheduling the final program, ie the one to go really CAN-SAT module.

0 comments:

Post a Comment