Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

Variable flashing LED using PIC18F242

Variable flashing LED using PIC18F242

A simple project to get to know the 18F242. A flashing LED with the frequency controlled by a variable resistor. Turn left to increase the flashing frequence, turn right to reduce.
The code is very comparable to that used for a 16F877. Note however that this time the resolution is set to ‘low’ and the sample is also taken in low resolution (PIC_ADC_read_low_res (0, resist)). That’s because this PIC is 16 bit, so high and low byte this time really means something.

Everything is relative of course. Low res means 255 steps. The variable resistor applies a voltage between 0 and 5 volts. In 255 steps this means 0.02 volts resolution, impressive!!

Visit Here for more.

 

More Articles to Read

Estimating Power for ADSP-BF561 Blackfin® Processors
Estimating Power for ADSP-BF561 Blackfin® Processors
Teach Your Arduino to Switch Itself Off!
Teach Your Arduino to Switch Itself Off!
Control a tracked robot with your mind (or joystick)
Control a tracked robot with your mind (or joystick)
A 400W (1kW Peak) 100A electronic load using linear MOSFETs
A 400W (1kW Peak) 100A electronic load using linear MOSFETs
Shirt Pocket Transceiver with the Si5351 and OLED
Shirt Pocket Transceiver with the Si5351 and OLED
All metal C930e webcam
All metal C930e webcam
The Soldering Tools That Make Your Life Easier
The Soldering Tools That Make Your Life Easier
App note: Operation evaluation of ultra low ON resistance MOSFET supporting quick charge for 1 c ...
App note: Operation evaluation of ultra low ON resistance MOSFET supporting quick charge for 1 cell Lithium ion battery protection
Synthesized Sidetone
Synthesized Sidetone
App note: Application precautions: Power MOSFET application notes
App note: Application precautions: Power MOSFET application notes

Top




Shares