martes, 14 de junio de 2011

Proteus comberter Analogic Dijital

Using the converter PCF8591, we create a analogue-digital converter.

The converter is 8 bits resolution and communicate with a high-end PIC (18F4550) via I2C.
To schedule use code language 'C ' (SCCS Compiler) and its simulation using Proteus.
The conversion will be displayed in an alphanumeric LCD 2 rows x 16 columns.

   
 .in addition we also know that the line of communication with the PIC will be the I2C bus.
Now we will configure it as simply indicates the PDF, to work with him.

After reviewing the PDF see the need to send 2 bytes ('ADDRESSING'and 'Control ') to work with the PCF8591.



The first byte ('ADDRESSING') after the start we send I2C communication (i2c_start ();). As we can see, the byte consists of a fixed and a programmable part.

The fixed part contains the four bit more weight ('1001').

The programmable part contains the four least significant bits. The first three (A2, A1 and A0) are the analog inputs and the least significant bit, read or write data as configured.








SECOND BYTE ('Control'), configure the device to work mode analog-digital converter, plus both the channel through which to convert, and use the analog input (AIN Or in my case).




The programing:



 


The dowload:
https://sites.google.com/site/franbc0100/CONVERSORA_D.rar?attredirects=0&d=1

No hay comentarios:

Publicar un comentario