The Led Light Technology Engineering Essay


Over the past few years a new light source known as LEDs or light emitting diodes has been introduced into the exterior lighting market. This new light source promises the benefit of long life, low energy, minimal maintenance and flexible lighting output. Comparisons between competing LED manufacturers and traditional HID lantern performances are becoming a bit difficult to decide because this new light source has introduced new terms and uncertainties to the lighting designer/engineers.[1}

This project report does not prescribe a definitive approach but its intent is to help understand the new technology of LEDs, health and safety issues relating to light and to develop a simple cost effective device to demonstrate constant luminescence.

In the electronics industry were LEDs were developed, it was discovered that when a current is passed through a diode light is produced. This technology has been rapidly developing in recent past. Shown below is a graph of the efficiency of various light sources from 1930 to the present day.

Lady using a tablet
Lady using a tablet


Essay Writers

Lady Using Tablet

Get your grade
or your money back

using our Essay Writing Service!

Essay Writing Service

Figure 1: Efficiency in lumens per watt of different light sources from 1930 to present day [1]

If the trend continues possibilities of seeing LEDs capable of producing 170 lumens per watt or more will be short term which could shortly exceed the performance of all HID lamps and could establish LEDs as the premier light source for efficiency. The light intensity produce from a tiny light source is discomforting and can possibly cause disability glare. Regarding laser light the LED as a light source is being addressed by European standards. If there is a continues increase to light output appropriate control of the light will be essential to avoid glare on the highway or at worst damaging the retina of an individual who inadvertently stare at the source for too long.



An LED (Light Emitting Diode) is a unique type of semiconductor diode which like a normal diode consists of a chip of semiconducting material impregnated with impurities to create a p-n junction.[2]. Extensive research of semiconductor materials over recent years has lead to the development of LED's which cover a wide range of spectral wavelengths.[3] LED's do not have filaments that will burn out like an incandescent bulbs and they do not generate or get hot while in use. They are illuminated solely by the movement of electrons in a semiconductor material.


The amount of light emitted by an LED can be expressed with two units. The first is used for light emission in the form of energy, which is a physical quantity while the second is a photometric quantity that takes into account the characteristics of the light as perceived by the human eye.[4] The first is used generally for stipulating the specifications of infrared LEDs. The second is used for visible light LEDs, since the light emitted by the LED is in the wavelengths visible to the human eye; they are used in applications such as LCD backlights.[4]

Actual visible wavelengths vary from person to person depending on the sensitivity of their eyes. The human eye generally perceives light with wavelengths between 380 and 780ns

"This perception by the human eye according to wavelength is referred to as visibility and was agreed upon by the Commission Internationale de l'Eclairage (CIE) in 1924." [4]. The International Committee of Weights and Measures (CIPM) adopted V[λ] as the standard visual spectral sensitivity in 1933 while in 1972, (CIPM) revised the value of V[λ] to be the visible wavelength from 360 to 830nm. Figure 2 shows the spectral luminous efficiency of V[λ].

{4} check diagram


"Luminous flux is the quantity of the energy of the light emitted per second in all directions. The unit of luminous flux is lumen (lm)."[5] It can also be defined as "a beam of radiated light taking the spectral luminous efficiency for humans into account."[4] The major or only difference between "One lumen is the luminous flux of the uniform point light source that has luminous intensity of 1 candela and is contained in one unit of spatial angle (or 1 steradian)."[5]


This can be defined as "The amount of light emitted from an LED per unit solid angle on the optical axis when the LED is taken to be a point of light source."[4]. Candela (cd) is the unit used to express luminous intensity which is a photometric quantity and is part of the International Systems of Units (SI). The candela has a detailed standard which includes the standard light source and the physical conditions of measurement. "1 candela (cd) is the luminous intensity, in a given direction, of a point source that emits monochromatic radiation with a frequency of 540 x 1012 Hz (at a wavelength of 555nm) and that has a radiant intensity in that direction of 1/683 watt per steradian." [4], while the luminous flux per unit solid angle is represented as cd = 1m/sr, if the light source point emits (Ø) lumens into a small spatial angle (β), the luminous intensity is I= Ø/ β.


Lady using a tablet
Lady using a tablet


Writing Services

Lady Using Tablet

Always on Time

Marked to Standard

Order Now

Depending on the application it is very important to control luminous intensity of LEDs. There are two ways of controlling the luminous intensity of LED's and the first is Pulse Width Modulation and the second is Adjusting the value

Pulse Width Modulation

In a wide variety of applications ranging from measurements and communications to power control and conversion Pulse Width Modulation is employed. This is a method of transmitting information on a series of pulses. In other words Pulse width modulation is a technique for controlling analogue circuits with a processor's digital output. This is used to reduce the power delivered to a load without resulting in loss

Controlling the current to the LED modifies the luminous intensity, which however causes the colour of the LED to shift, but with pulse width modulation luminous intensity can be changed without altering or changing the colour of the LED.

Adjusting the Value

According to Nichia Corporation Japan, "changing the current supply to the LED can directly control the luminous intensity."


The amount of light that covers a surface is defined as Illuminance.[5] The unit of illuminance in SI system is lux [lx], if Ø is the luminous flux and S is the area of the given surface then the illuminance E is determined by E= Ø /S


Dominant Wavelength, λd is derived from the CIE Chromaticity Diagram and defines a colour in terms of a single wavelength. It is that single wavelength of light that has the same perceived colour as the LED radiated spectrum. The dominant wavelength of an LED is closely related to the material used to make the LED. The eye's sensitivity to process variations in the color of green, yellow, and amber LEDs as shown

in Figure 8 necessitates color binning by dominant wavelength for these colors. The other colors are not screened for color. The dominant wavelength of an LED cannot be significantly changed by a filter. Table 1 correlates dominant wavelengths with LED materials.

Peak Wavelength, λPEAK

Peak wavelength, measured in

nanometers, is that single wavelength

where the radiant intensity

is at maximum. Peak wavelength is

a characteristic of the LED material

and is not measured on a

production basis. Process variations

are about

±10 nm.














D. H. Sliney

Fallston, MD, USA

The photobiological effects of light on human health is a very active area of

current biomedical research. We do not understand all of the positive and potentially

negative effects of artificial light sources. There are some potentially

very significant health and safety implications from the shorter wavelengths of

new types of energy-efficient and solid-state lighting. Humankind has evolved

under the illumination of sunlight and artificial sources, such as fire and later oil

lamps, which have spectra largely along the Planckian locus and rich in longer

wavelengths. Although we have at least two generations of experience with

fluorescent lighting, which has spectra richer in shorter wavelengths, its use

in homes has traditionally been very limited. We read the evening newspaper

under a tungsten-halogen reading light or dine under dimmed incandescent

lamps. All photobiological effects-including vision-are strongly dependent

upon wavelength and to some extent upon exposure geometry and duration.

It is therefore appropriate, particularly in light of recent discoveries in human

photobiology, to raise a note of caution that new lamps that may be rich in violet,

indigo and blue wavelengths could produce some unexpected biological

effects. The melanopsin chromophore in the photosensitive retinal ganglion

cells undergoes photo-isomerization by short wavelength blue light that leads

to a neural signal from the ganglion cells to several locations in the brain. Less

well understood is that longer wavelengths are necessary to reverse the photochemical

Lady using a tablet
Lady using a tablet

This Essay is

a Student's Work

Lady Using Tablet

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Examples of our work

process to produce the original isomer. It appears that the warm

spectrum of daylight in the early morning and in the evening plays a role, as

does the blue-rich spectrum of midday, in attuning our body rhythms. Does



this mean that an architectural emphasis on day-lighting or spectrally adjusting

solid-state lighting could favor health and well-being? Clearly architects,

lighting designers, and engineers need to be aware of these health and safety

implications. Developers of energy-conservation policies should also be cognizant

of the fact that simple lumens/watt wall-plug efficiency has limitations,

and lighting quality-to include health considerations is important. The photosensitive

retinal ganglion cells provide signaling to several parts of the brain,

controlling pupillary constriction, lid position and other activities. Of course,

the ganglion-cell pathway that permits light to influence our circadian rhythms

and the neuro-endocrine system has received the greatest study.

Beneficial uses of light in phototherapy to correct circadian or mood disorders

must be balanced by a careful review of potential side effects and any actual

retinal hazards. Although the biological effects of ultraviolet radiation have

been studied for decades, debate continues on how to achieve an optimum

balance between preventing excessive exposure that increases risks of delayed

effects upon the skin and eyes, having the benefits of low-level UV in

producing Vitamin D, and possibly obtaining other positive effects for the immune

system. The CIE has produced a number of publications that relate to

all of these effects. It is highly useful to examine how humans are exposed in

their natural environment to learn potentially beneficial applications of artificial


The natural, outdoor light environment undergoes a diurnal spectral cycle as

the sun moves across the sky. This spectral change is not always obvious to

the outdoor observer because the eye has its own selective chromatic adaptation.

It appears that maybe all of the photoreceptors track this change, the

rods and the cones as well as the photosensitive ganglion cells. Depending

upon light level, each type may play some role in providing the brain with more

timing information than we might expect. Certainly the photoreceptive ganglion

cells appear to have the primary role.

With regard to the photobiological safety of lamps and lighting systems, the

proper limitation of the normally trace emissions of ultraviolet radiation from

general lighting sources was the emphasis two decades ago. Recently, with

the advent of bright LEDs, some have raised questions about retinal safety

and the "blue-light hazard." The blue-light hazard is responsible for eclipse

blindness and only is of concern if a viewer stares at a bright light source by

overcoming their natural aversion to very bright light. The discovery that photoretinitis

resulted from blue light explained why the yellow or orange sun was



safe to view at sunset, but dangerous to view when white in appearance and

overhead. Eye movements make the viewing of a welding arc or a CW laser

safer. Lid opening varies with ambient illumination, and this means that the

inferior retina is not exposed in bright light outdoors. Since retinal irradiance is

directly proportional to source brightness (radiance), a radiance map of visual

space leads to a retinal irradiance map-if we consider the changing lids and

pupil plus the spectral properties of the ocular media.

The CIE plays a very important role in exploring the current scientific knowledge

to promote the best applications of lighting, and it has also played a

key role in examining potential limitations, and understanding potential risks.

I am sure that its current work to develop technical reports and guidance to

optimize quality while limiting energy consumption will pave the way for both

realistic and sensible policies by governmental and non-governmental organizations



W. Van Bommel

Van Bommel Lighting Consultant

The review is structured around four questions.

Question 1: Do we have the right focus in product development? From

a society point of view sustainability and in that context energy friendly, long

life product and application design will remain important. The lighting industry

has to focus more on total waste free products as defined in cradle to cradle

design. Futuristic daylight products like transparent OLED windows, transparent

solar windows and translucent concrete, can increase the daylight use in


Question 2: Do we use the right basic information? Good glare restriction in

solid state lighting requires innovative optical designs. Here a totally new glare

evaluation system is needed as the present systems have been developed for

circumstances totally different from solid state lighting. In fixed road lighting,

especially for motorway lighting we base our concepts on visibility of objects

but that concept looses importance because of developments in car systems

themselves. Neurological research is needed to find out if fixed road lighting

can contribute to minimize micro sleeps in night drivers. For lighting in built-up

areas, instead of the luminance concept of road lighting a more three-dimensional

concept is needed.

Question 3: Do we provide the users with the right information? The

changeover to solid state lighting may be slow downed because it is precisely

for solid state lighting that often wrong data are supplied, thus disappointing

new users in their expectations. Statements that for domestic home lighting

the changeover from incandescent lamps into LED-lamps gives a health risk

are shown to be incorrect.

Question 4: Do we address the right public? Most recommendations and

standards on lighting quality are based on people of around 30 years old. With

growing age eyesight deteriorates. It is therefore essential that in lighting recommendations

and standards special sections are going to be incorporated on

the special needs of the elderly. It is shown that the effectivity of LED-lamps is

negatively effected by the blue light loss of the aging eye. 1,6 Billion people in

developing countries have no access to electricity. It is good to see that where

so far only non-profit organizations were offering low-cost solar home lighting

units, larger lighting manufacturers are now developing off-grid concepts for

remote rural areas.




B. Tralau1, P. Dehoff1, C. Schierz2

1Lighting Application Management, Zumtobel Lighting, Dornbirn, AUSTRIA,

2Lichttechnik, TU Ilmenau, Ilmenau, GERMANY


To describe lighting quality is an effort of scientists and designers since many

years [1],[2],[3]. The awareness that next to the photometric criteria which can

be measured and are laid down in the European standard EN12464 [4], further

objective and subjective factors are needed, is raised.

A comprehensive and generally admitted method is the Ergonomic Lighting

Indicator (ELI). ELI is a already introduced and well-known method to evaluate

the lighting quality at a glance [5] and wasdeveloped based on a study of the

Technical University of Ilmenau together with Zumtobel Lighting in Dornbirn.

Five main assessment criteria of lighting quality were defined: visual performance,

vista, visual comfort, vitality and empowerment (see table 1).[6]

ELI criteria and sub-criteria

Assessment criteria Single lighting quality criteria

Visual Performance Illuminance, uniformity of illuminance, colour rendering,

limitation of reflections, limitation of hard shadows,

contrast rendering

Vista Architectural concept, expectation of the user (mental

concept), orientation, hierarchy of perception,

perception from outside, material, environment

Visual comfort Glare control, brightness distribution, modelling,

daylight, sense of security, limitation of flickering

Vitality Wellbeing, activation, stimulation, circadian rhythm,

natural light, limitation of hazards

Empowerment Personal control, light scenes, presence detection,

daylight control, dynamic control, flexibility, privacy



With the help of questionnaires first the requirements for a lighting solution and

then the design or lighting installation will be evaluated and scaled. The result

is display in a kiviatgraph.

But is the described method reasonable and practical enough for the evaluation

of lighting quality? How objective, reliable and valid can the measurement

of lighting quality be?

Therefore the questionnaire is examined critically in an empirical study with the

help of an item analysis and the criteria of a classical test performance as well

as in a field test where different lighting installations were evaluated.

In general, the analysis shows that the evaluation method can almost be termed

as objective and valid, although deficits in details exist:

- Consideration of different user groups

- Adaption and weighting of items for different application areas

- Correction of the phrasing of the questions

- Adaption of the scaling and operationalisation for five ergonomic criteria


Lighting quality is a topic which is important of all steps in a project process

(see table 2). The Ergonomic Lighting Indicator can increase the overall lighting

quality of a project, when it's used over the project process.

By raising the awareness of many quality criteria which influence lighting the

designer has a reasonabe fast working tool for the communication with the

customer which usually is a layman in lighting. In the next steps the customer

requirements can be assess with the help of a questionnaire, followed by a

development of a lighting concept. The lighting concept can be evaluated with

a second ELI questionnaire. Requirements and evaluation can easily be compared.

In end the better fulfilment of the requirements will satisfy the customer

and result in a better lighting.

Project process and use of the Ergonomic Lighting Indicator

But does the result of the ELI evaluation is in accordance with the perception

of the user? Therefore this contribution wants to find an overall assessment

method of lighting quality, transfer the method into a measureable system and

to prove the result with a measuring of a real project.


To achieve the target all single aspects of the Ergonomic Lighting Indicator

are analysed regarding the possibility to calculate or measure values. Also the

criteria are splitted into subaspects for the analysis.

New measure and calculation methods to quantify the ELI aspects have to be

defined based on the experience and research result which exists.

A scaling has to be defined to match the result of a measuring or calculation

with the level of the lighting quality.


The analysis will show the constraints of the determinability of lighting quality

via measuring and calculation. New methods for measuring underline the assessment

of lighting quality. Gaps in the measuring will be found out. As many

aspects as possible were quantified.



Next step is to use the measurement intensively in a real project. Therefore the

lighting quality evaluation has to go along with a whole project process and has

to be proved in the end with the measuring system.

The method in detailed as well as first results will be described in the final




X. M. Chiu, Y. C. Chen

Department of Optics and Photonics, National Central University, Jhongli, TAIWAN


An experimental procedure was developed to evaluate visual comfort when

reading under various illuminance combinations provided by a LED desk lamp

and ambient lighting. Three central illuminance levels with four contrast ratios

were tested. The results showed that visual comfort is not affected by the central

illuminance but depends on the contrast between the central and ambient

illuminance. We concluded that when the central illuminance has reached a

sufficient level for reading, it is more important to find an appropriate lighting

contrast for visual comfort. The comfortable contrasts found in this research

can be a reference for the desk-lamp and lighting designers.


LEDs are a good candidate for next-generation lighting due to their numerous

advantages, such as small volume, long life time, high lighting efficiency and no

mercury pollution. This research aims to find the appropriate illuminance combinations

of a LED desk lamp and ambient lighting based on visual comfort.

Lighting Handbook [1] recommends an illuminance level above 1000 lux for

performing visual tasks on low contrast or very small size objects. Ergonomic

suggests that the illuminance contrast ratio between the major work area and

the surrounding area should not exceed 3:1 [2]. However, no information was

given about the most comfortable contrast for reading. This research intends to

find that ratio. The experimental design and the results are presented herein.


A 4.3W LED desk lamp with color temperature of 3100K was used. Its luminance

was modulated by controlling the input current. An ambient lighting installation

capable of 64 illuminance levels was combined with the LED desk

lamp to generate various lighting conditions. There are three independent variables

in the experiment, including the central illuminance (1000, 1500, or 2000



lux), the contrast between the central and ambient illuminance (1:0, 4:1, 3:1,

or 2:1), and the test time (morning, afternoon, or night). The first two variables

obey the within-subject design to avoid inter-subject variations [3] and the last

one is between-subject. The Latin-square design was utilized to balance the

fatigue and practice effects. The influence of visual comfort on the reading

cognition efficiency was evaluated by a "finding words" method.

36 subjects (20 males and 16 females) participated in the experiment. Their

average age is 22 years old and their visions are all normal or rectified. Under

each lighting condition, the participants searched through the reading material

to label the target word "me" and filled out a questionnaire at the end of each

trial. The experimental data was analyzed in statistical software SPSS.

Questionnaire design

Magnitude estimation in psychophysics was used to evaluate visual comfort.

All the questions were descriptive for the subjects to understand the scenario

and feel its strength. Participants can choose a positive integer within an arbitrary

interval to represent their degree of discomfort under each lighting condition.

A larger integer implies more discomfort.

Reading materials

The reading materials were two-page essays. The word "me" was designed to

appear about the same times in each essay. The articles were given in another

Latin square independent of the Latin square of the lighting combinations.

Subjects could label the target words without understanding the article. The

labeled "me's" were counted by the experimenter after all trials to compute the

labeling accuracy.

Experimental procedure

1. View the illustration film (2.5 min). It gives the details of the experiment and

ensures that every subject receives the same instructions.

2. Warm-up trial with short-time reading (20s) and questionnaire filling. This

helps the subject to become familiar with the experimental procedure. The

data in this session is not included in the analysis.



3. Mid-illuminance adaption (30s). It ensures that every trial starts at the same

illuminance level and avoids the extreme difference between the darkest and

brightest situations.

4. Test-illuminance adaption (30s). This allows the subject to adapt to the test

illuminance before reading.

5. After adaption, the subject is instructed to read the essay and label the "me"

for two minutes.

6. After reading, the subject fills out the questionnaire and returns it to the experimenter

immediately upon completion. The experimenter will then provide

another questionnaire and essay for the next trial. Instantly collecting the questionnaire

prevents the subject to be affected by referring to the answers they

gave in the preceding trials. Also, the experimenter can check if all questions

were answered.


The strength grades from the questionnaire were divided into five categories

as (1) Task performance, (2) Physiological pains, (3) Visual comfort, (4) Fatigue

and (5) Word-finding accuracy. Table 1 shows the significance analysis of the

experiment and posteriori comparisons on the variables that passed the significance

test. The greater sign ">" implies a more comfortable situation.


The experimental results show that visual comfort is not significantly influenced

by the central illuminance but by the contrast. It implies that lighting designers

should pay additional attention to creating comfortable contrast between

the central and ambient illuminance. We also found the word-finding accuracy

is significantly affected by the central illuminance. The performance with

1000 and 2000 lux are better than that with 1500 lux. Hence 1000 lux is the

best choice for energy saving. According to the research results, comfortable

lighting could only be realized when the local and ambient illuminance is appropriately

collocated. Studies with lower illuminance and higher contrast are

in progress.


Luminaires or Lamps?

Designing LEDs into general illumination requires a choice between designing either a complete luminaire based on LEDs or an LED-based lamp meant to install into an existing fixture. Generally, a complete luminaire design will have better optical, thermal and electrical performance than the retrofit lamp, since the existing fixture does not constrain the design. It is up to the designer to decide whether the total system performance of a new luminaire or the convenience of a retrofit lamp is more important in the target application.

Target Existing Luminaires

If the target application is better served by creating a new LED luminaire, then designing the luminaire's light output to match or exceed an existing luminaire has several advantages. First, an existing design is already optimized to target a known application, and can provide guidance for setting the design goals around light output, cost, and operating environment. Second, an existing design is already in an accepted form factor. Switching to the LED luminaire is easier for the end user if the form factors are the same.

Unfortunately, some LED luminaire manufacturers are misreporting or inflating claims of LED luminaire efficacy and lifetime characteristics. The lighting industry saw similar problems during the early years of CFL replacement bulbs. The lack of industry standards and wide variations in early product quality delayed the adoption of CFL technology for many years. The United States Department of Energy is aware that the same standards and quality problems may exist with early LED luminaires and that these problems may delay the adoption of LED light in a similar fashion. In response, it launched the DOE SSL Commercial Product Testing Program (CPTP) to test the claims of LED-luminaire makers. This program anonymously tests LED-based luminaires for the following four characteristics:

Luminaire light output (lumens)

Luminaire efficacy (lumens per watt)

Correlated color temperaure (degrees Kelvin)

Color-rendering index

DOE's CPTP sets a good precedent for LED luminaire design by focusing on the usable light output of a luminaire - not just the light output of the light source.

The Idea of a Lamp May Be Outdated

The long lifetime of LED light may make the idea of a lamp outdated. Lighting-class LEDs do not fail catastrophically like light bulbs. Instead, they can provide at least 50,000 hours of useful lifetime before they gracefully degrade below 70% of their initial light output (also called lumen maintenance). That's equal to 5.7 years if left on continuously!

However, in most lighting situations, the lights are switched off regularly. This off period can extend the lifetime of the LED well past three decades, as shown in Chart 1 (at right). After the years it will take for an LED luminaire to "burn out," LED lighting technology will be brighter, more efficient, and probably offer TCO savings over the older LED luminaire.

Keep in mind how much environmental impact was avoided over that 50,000 hours of LED luminaire lifetime:

At least 25 fewer incandescent bulbs were sent to landfills AND five times less energy used. (About 50% of power in the United States comes from burning coal, which releases mercury into the air)

Or, at least 5 fewer CFL bulbs containing mercury sent for disposal.

As mentioned previously, maintenance avoidance is an important benefit for LED luminaires. Therefore, designing the LED luminaire to deliver maximum lifetime and provide TCO savings is an excellent strategy to overcome the hurdle of the higher initial cost of LED-based luminaires.

Table 1(below) lists a general process for designing high-power LEDs into a luminaire. The rest of the document walks through these design steps in order. To better illustrate these design concepts, this document includes example calcu­lations for an LED luminaire meant to replace a 23-W CFL downlight. This design process is repeatable for all kinds of luminaires and not just the example included.

A device will be made that can demonstrate luminance intensity by detecting the amount of light produced in response to the changing needs of the environment, to maintain the ambient light constant. It will be constructed using a variety of low-cost technologies that are not intrusive and are small in size so it can be used in a wide variety of places.

This Light Dependant Resistor (LDR) will detect light intensity to digital signal and convert it to current, with the instruction in the PIC the current will be converted into a digital number proportional to the magnitude of the current (the analogue to digital converter is responsible for this LEDs will be used to display activity instead of digital numbers) now the higher the intensity of light the lower the led glows but the less intensity the LED brightens up (this process is known as Pulse width modulation, which is a feature in the microchip PIC12F683, which will be used in this application).The main advantage of Pulse width modulation is that the power loss for example in switching devices is very low, so when a switch is off there is practically no current and when it is on there is almost no voltage drop across the switch.

Analogue to Digital Code

TITLE "ADC test1"


LIST P=12F683

temp1 equ 0x20

temp2 equ 0x21

org 0x00

movlw 07h

MOVWF CMCON0 ;switch off the comparators



movlw 0x01

movwf TRISIO ;GP0 input rest outputs

movlw b'01110001' ; internal 8MHz

movwf OSCCON

movlw b'01010001' ;Fosc/16 and AN0 chosen

movwf ANSEL

bcf STATUS,RP0 ;select bank 0


movlw b'00000001' ; Left Justify, Vref set to Vdd

movwf ADCON0

call dly

cnvrt bsf ADCON0,GO

btfsc ADCON0,GO

goto $-1

movlw 0x00

movwf GPIO

movlw .250

addwf ADRESH,W ; Move top

btfsc STATUS,C

bsf GPIO,5

movlw .128


addwf ADRESH,W ; Move top

btfsc STATUS,C

bsf GPIO,4

movlw .64

addwf ADRESH,W ; Move top

btfsc STATUS,C

bsf GPIO,2

movlw .5

addwf ADRESH,W ; Move top

btfsc STATUS,C

bsf GPIO,1

call dly

goto cnvrt


movlw .255 ;delay subroutine

movwf temp1



movlw .255

movwf temp2



decfsz temp2,F

goto inner

decfsz temp1,F

goto outer


enddly return