got interested to test it out, and well I have VERY preliminary results
- all the test setup was done within 30 minutes, so it's just proof of concept:
Test setup1) Xilinx S3 FPGA (a GOP module from oho-elektronik) 2) IOPad oscillator (using 2 io pins, see at the end of posting) 3) green 0805 SMD LED 4) JTAG Frequence meter software and ip-core, one channel connected to the IOPad oscillator (the frequence meter application is the same as at gforge.openchip.org)
first I tried to put the LED between the 'diff' outputs of the iopad oscillator, but that did not have good results, by placing the LED with one terminal on X2 and other one just unused (put pullup enable) FPGA pin I was able to see light influence on the oscillator frequency. the oscillator did run at 35MHz, light from window or then covered up with paper caused a frequence change of 80KHz, well that isnt much but I guess my setup wasnt not the best to get the 'sensor effect' out - still the frequence change was cleary observable.
of course the current test setup is sensitive also to capacitance so using your finger to cover up the LED will have more capacitive impact then light dependant changes. Anyway with proper bias and (series) resistor the light dependancy of an normal LED should be very easy to measure with an FPGA
---------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity xti_oco_io2pin is Port ( X1 : inout STD_LOGIC; X2 : inout STD_LOGIC; EN : in STD_LOGIC; -- fake always high signal CLK : out STD_LOGIC ); end xti_oco_io2pin;
architecture Behavioral of xti_oco_io2pin is