;Start of memory for program.
;Go to Bank 1
;Make all port B output
;Load W with 0000 0010
;Make RA1 input
;Go to Bank 0 – the program memory area.
;Clear flag file
;Clear the display
;Clear the display
; Create 1mS delay
;Clear the “whistle” flag
;Number of loops
;Holds the LOW count
;Test Carry flag. If set C=more than 10h
;Whistle – turn on display
;Whistle – turn off display
EXPERIMENT 12 Light Detection
This experiment detects the presence of light. A photo-darlington transistor is connected to the circuit via a plug and socket and exposed to light. The change in resistance of the photo-darlington transistor creates a voltage change across it and this is amplified by the circuit and delivered to an input of the microcontroller. The program turns on the 8 LEDs when the photo-darlington transistor detects change in illumination.
The photo-darlington transistor is connected to the circuit via a capacitor and only CHANGES in illumination are detected.
If the illumination is decreased, a point will be obtained where the circuit is sensitive to the changes in supply rail voltage. At this point the circuit will start to oscillate or MOTOR-BOAT.
The circuit must be re-designed to prevent this from occurring.
If the photo-darlington transistor is placed in a room with incandescent lighting, the 50 or 60Hz from the light will be detected. These pulses must be dealt with by the program to obtain a reliable HIGH/LOW pulse.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.