====== PmodALS Reference Manual ====== The Digilent PmodALS (Revision A) demonstrates light-to-digital sensing through a single ambient light sensor. Digilent Engineers designed this Pmod around the [[http://www.ti.com/lit/ds/symlink/adc081s021.pdf|Texas Instruments ADC081S021]] analog-to-digital converter and [[http://www.vishay.com/docs/81579/temt6000.pdf|Vishay Semiconductor's TEMT6000X01]]. {{Digilent Image Gallery | image = {{:reference:pmod:pmodals:pmodals-0.png?direct |}} | image = {{:reference:pmod:pmodals:pmodals-1.png?direct |}} | image = {{:reference:pmod:pmodals:pmodals-2.png?direct |}} | image = {{:reference:pmod:pmodals:pmodals-3.png?direct |}} | image = {{:reference:pmod:pmodals:pmodals-4.png?direct |}} | image = {{:reference:pmod:pmodals:pmodals-5.png?direct |}} }} == Download This Reference Manual== * {{:reference:pmod:pmodals:pmodals_rm.pdf| PDF}} ---- ===== Features ===== * Simple ambient light sensor * Convert light to digital data with 8-bit resolution * 6-pin Pmod port with SPI interface ---- =====Functional Description ===== The %%PmodALS%% utilizes a single ambient light sensor (ALS) for user input. The amount of light the ALS is exposed to determines the voltage level passed into the ADC, which converts it to 8-bits of data. A value of 0 indicates a low light level and a value of 255 indicates a high light level. ---- ===== Interfacing with the Pmod===== The %%PmodALS%% communicates with the host board via the [[pmod:communication_protocols:spi|SPI protocol]] in SPI Mode 3. Since the on-board analog-to-digital converter is a read-only module, the only wires in the SPI protocol that are required are the Chip Select, Master-In-Slave-Out, and Serial Clock lines. The location of each of these lines on the Pmod header are shown in the table below. ==== Pinout Description Table ==== ^ Pin ^ Signal ^ Description ^ | 1 | ~CS | Chip Select | | 2 | NC | Not Connected | | 3 | SDO | Master-In-Slave-Out | | 4 | SCK | Serial Clock | | 5 | GND | Power Supply Ground | | 6 | VCC | Power Supply (3.3V/5V) | **Table 1** Connector J1- Pin Descriptions as labeled on the Pmod The %%PmodALS%% reports to the host board when the ADC081S021 is placed in normal mode by bringing the CS pin low, and delivers a single reading in 16 SCLK clock cycles. The %%PmodALS%% requires the frequency of the SCLK to be between 1 MHz and 4 %%MHz%%. The bits of information, placed on the falling edge of the SCLK and valid on the subsequent rising edge of SCLK, consist of three leading zeroes, the eight bits of information with the MSB first, and four trailing zeroes. An occasional 4th leading zero may be captured if CS goes low to initiate another data transfer before the rising edge SCLK. Any external power applied to the %%PmodALS%% must be within 2.7V and 5.25V; however, it is recommended that Pmod is operated at 3.3V. ---- ===== Physical Dimensions ===== The pins on the pin header are spaced 100 mil apart. The PCB is 0.8 inches long on the sides parallel to the pins on the pin header and 0.8 inches long on the sides perpendicular to the pin header. ---- ===== Additional Information ===== The schematics of the %%PmodALS%% are available {{reference:pmod:pmodals:pmodals_sch.pdf|here}}. Additional information about the %%ADC%% including communication modes and specific timings of the chip can be found by checking out its datasheet [[http://www.ti.com/lit/ds/symlink/adc081s021.pdf|here]]. Similarly, the datasheet for the ambient light sensor can be found [[http://www.vishay.com/docs/81579/temt6000.pdf|here]]. More specific information about how to use the %%PmodALS%% can be found by checking out our [[pmod:pmodals:start#additional_resources|user guide]]. Example code demonstrating how to get information from the %%PmodALS%% can be found [[pmod:pmodals:start#example_projects|here]]. If you have any questions or comments about the %%PmodALS%%, feel free to post them under the appropriate section ("Add-on Boards") of the [[https://forum.digilent.com/|Digilent Forum]].