Subscribe
 


Variable flashing LED using PIC18F242



Variable flashing LED using PIC18F242
Related Videos

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!!

Authored by Bert van Dam at Lonely Nights, Added: Jun 26, 2006




http://members.home.nl/b.vandam/lonely/pagina18.html

Unsorted Pool