Friday, June 27, 2008

Letters Suspended From Work

Day Fourteenth (14 th) - 06/20/2008

We met with Martin Rinemberg (Student Information) who informed us that he who would take over the PC interface, so the work done in the previous class with Mariano Foullier was discarded. We were testing some prototype programs that Martin brought. He opted to use the language C # (or C Sharp) for programming the interface. The first programs did not work. Martin had to go back and forth from building up in order to test our programs so we devote a class to arm him cable DB-9 invested for the 2 computers can communicate and save having to go to the floor electronics to test their programs. In addition were the rest of the class as they would be discussing with him the data he was to receive, how to interpret and process. The 2 Block
approached Martin saying that he could not communicate the PC's in any way. That is why we open the cable and we realized that we had read the pins backwards. Fixed cable and its programs became operational.

Have To Pee Lots And Stomach Pains

Day Thirteen (13 °) - 13.06.1908 Twelfth Day

We met with Mariano Foullier and try to begin to develop what would be the graphical interface to receive data in a PC. Mariano We recommended using the IDE (Integrated Development Environment) called Microsoft Visual Basic 6.0. We already had prior knowledge of this programming language because we use in our first year of specialization and in the second basic cycle. However, completely unaware management serial port using this language. Mariano showed us how to configure the component that handles such port and made a simple program that allowed us to do what we did with the HyperTerminal so far, but obviously most likely to process the data (functionality that does not have HyperTerminal). We spent the rest of the class testing programs with the interface that we created and trying to process some data. Thing we accomplished successfully. We could display the midpoint voltage of the potentiometer, which had not previously been able to do because he had to multiply the value of byte by the value of Run (0.02 V) and demanded that we use Floating Point system is very complex and demands lots of memory. The calculation error that carry both the measurement of the ADC (CDA) of the PIC and the computer calculation left us with an error of ± 0.04 V or 2 steps, measurement is quite reliable.

Friday, June 20, 2008

Memorial On Wedding Program



In this section we discuss everything about programming the PIC and include the complete list of programs you have loaded (which could be found in the days when they were made). How well clarified
previously, we will schedule our PIC (by choice) in a programming language called BASIC .
programming language is a language that is used to control the behavior of a machine, in our case the PIC. consists of a set of symbols, instructions and rules of syntax and semantics that define its structure, operation, interpretation and meaning of its elements and expressions.

The syntax rules are those that tell us how it should be written a program in this nguaje him. For example:

In C all instructions, declarations and / or functions must end with a semicolon, and control structures and routines mark their start and end with brackets so a good C program could be well:

void main (void) {

char variable;
printf ("Hello world!");
getch ();}
semantics gives the notion of such statements should be written instructions and / or functions. For example:

variables in C are declared as follows: NAME data_type, "so a good variable declaration in C is:

char variable;
programming languages \u200b\u200bcan be classified according to their" level " , where a high level language is one that is closer to human notions of syntax and semantics and a lower level language is one that departs most of these notions. Therefore a lower level language is more difficult to interpret for a human (obviously the best interpretation for the machine). BASIC is a high-level language (the C language is given in the exemplifications also high level but not as much as BASIC). Programming languages \u200b\u200bare translated into machine code (1's and 0's) to then be actually performed by the machine, this sometimes is done through a program called "compiler program" . Ours is the PIC BASIC PRO (PBP). We'll explain the basics of the language applied to programming PIC's.

BASIC COMMENTS: can be made for the programmer or someone who read the program guide, absolutely no bearing on anything in the program, the compiler discards them when they have to translate the program. to make a comment you must specify the start and this is valid for the rest of the line. The onset may be marked (in BASIC) by a semicolon or an apostrophe. Example: INDEX = 0; Pongo index to 0.

VARIABLES: serve to store and manage data can have varying sizes, from one bit to a couple of bytes. Must be declared as follows: NAME SIZE VAR. Example: DOG VAR BYTE . We just created a variable to which the rest of the program as DOG call when we want to use and its size is 1 Byte (8 BIT's).

INPUT / OUTPUT: These are usually pin PIC ports or channels can be named according to their location and position. Example: portb.2 . Where what goes after the dot indicates the port B Bit used (the ports are generally 8 bits, so is 0 to 7). Also you can name them as variables. Example: VAR BUTTON portb.2 . In this way each time you say BUTTON compiler interprets it as the Bit 2 of port B.

CONTROL STRUCTURES: are those that allow us to interpret and compare data and act according to these interpretations. There are several very intuitive and therefore not dwell in each, which are used IF, WHILE and REPEAT-UNTIL and its structure is:

IF (CONDITION) THEN

DECLARATION STATEMENT A Z B

ELSE STATEMENT
1
DECLARATION DECLARATION DECLARATION N 2

ENDIF
Explanation: If it happens running condition A, B and Z. If not, run 1. 2 and N, then ended and the program continues normally. REPEAT


Declaration1
Declaration2
DECLARACIONx
UNTIL (CONDITION)

Explanation: Repeat statements 1, 2 and x until the condition indicated. This condition usually go giving in to the statements in the loop (a variable that increases to a certain value, etc..).

WHILE (CONDITION)
Declaration1
Declaration2
DECLARACIONx
WEND

Explanation: When the condition is executed statements 1, 2 and x, once it no longer meets the condition, exits the loop.
STATEMENTS: are those who work in the program by changing variables, statements and reports, ie the action commands that trigger a sequence of steps in the microcontroller. Example1: Example2 portb.1 HIGH: DOG = DOG +1.

This was the basic introduction that we hope will understand the programs that we will be doing. Below are all the programs made by the group:



this document on Scribd: All programs

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.