Difference between revisions of "Led sensor"

From ArmadeusWiki
Jump to: navigation, search
m
Line 2: Line 2:
  
 
To test this phenomena, I have used a pin of the FPGA, and design a little component/IP that provides the discharging time in a register.
 
To test this phenomena, I have used a pin of the FPGA, and design a little component/IP that provides the discharging time in a register.
 +
 +
= How does it work ? =
 +
 +
Ledsensor ip formed by by four entities :
 +
 +
* '''cnt''' : like «counter» this entity provide counter to measure ledcapacitor discharge, it also provide charge period timing.
 +
* '''led''' : This entity is used to drive the led. It has four signal, one to load capacitor «charge», one to read led value and two others to branch led (cathode and anode).
 +
* '''wbread''' : This entity is Wishbone 16-data bits bus manager.
 +
* '''fsm''' : This is the main component of the IP, this state machine drive the component. The working of the fsm is describe below :
 +
 +
[[Image:ledtouchschema.png|300px|center]]
 +
  
 
= Code =
 
= Code =
Line 7: Line 19:
 
[http://fabienmarteau.free.fr/images/synthesis.tar.gz here]
 
[http://fabienmarteau.free.fr/images/synthesis.tar.gz here]
  
= How does it work ? =
+
 
[[Image:ledtouchschema.png|300px|center]]
+
 
 
= Results =
 
= Results =
  

Revision as of 22:55, 24 September 2008

According to this paper, a simple LED can be a light sensor if used in reverse mode. In fact if LED is used in invert, it becomes a variable capacitance.

To test this phenomena, I have used a pin of the FPGA, and design a little component/IP that provides the discharging time in a register.

How does it work ?

Ledsensor ip formed by by four entities :

  • cnt : like «counter» this entity provide counter to measure ledcapacitor discharge, it also provide charge period timing.
  • led : This entity is used to drive the led. It has four signal, one to load capacitor «charge», one to read led value and two others to branch led (cathode and anode).
  • wbread : This entity is Wishbone 16-data bits bus manager.
  • fsm : This is the main component of the IP, this state machine drive the component. The working of the fsm is describe below :
Ledtouchschema.png


Code

here


Results

With a green standard led, that gives :

Greenplot.png