QL200 PIC development and LEDs

Here are some more LED examples for use with the QL200 development board

Example 1:

#include <16F877A.h>

//We use an xtal crystal, no watchdog,
//no low-voltage protection and no code protection.
#fuses XT, NOWDT, NOLVP, NOPROTECT
#use delay (clock=4M)

int j;

void main()
{
while(1)
{
//counter example
for (j=0;j<255;j++) { output_c(j); delay_ms(500); } } } Example 2:

#include <16F877A.h>

//We use an xtal crystal, no watchdog,
//no low-voltage protection and no code protection.
#fuses XT, NOWDT, NOLVP, NOPROTECT
#use delay (clock=4M)

int j;

void main()
{
while(1)
{
//counter example
for (j=0;j<255;j++) { output_a(j); output_b(j); output_c(j); delay_ms(500); } } } Example 3:

#include <16F877A.h>

//We use an xtal crystal, no watchdog,
//no low-voltage protection and no code protection.
#fuses XT, NOWDT, NOLVP, NOPROTECT
#use delay (clock=4M)

void main()
{
while(1)
{
//counter example
output_c(0b00000000);
delay_ms(500);
output_c(0b10000001);
delay_ms(500);
output_c(0b11000011);
delay_ms(500);
output_c(0b11100111);
delay_ms(500);
output_c(0b11111111);
delay_ms(500);
output_c(0b11100111);
delay_ms(500);
output_c(0b11000011);
delay_ms(500);
output_c(0b10000001);
delay_ms(500);
}
}

Related posts

PIC16F877 and 74HC595 shift register example

PIC16F877 and LDR example

PIC16f877 and push button example