Pic16f877a

Thread Starter

wailoon86

Joined Sep 12, 2007
1
Hi guys.
I'm new to this website.
Well, I'm basically trying to light up an LED with PIC16F877A using CCS C compiler.
Is my code make sense?
Thanks for your help.
#include <16F877A.H>
#use delay(clock=20000000)
#fuses hs,nowdt,noprotect

void main()
{
set_tris_d(0b00000000);
for(;;)
{
output_high(PIN_B0);
delay_ms(1000);
output_low(PIN_B0);
delay_ms(1000);
}
}
 

nanovate

Joined May 7, 2007
666
Rich (BB code):
#include <16F877A.H>
#use delay(clock=20000000)
#fuses hs,nowdt,noprotect

void main()
{
set_tris_d(0b00000000);
for(;
{
output_high(PIN_B0);
delay_ms(1000);
output_low(PIN_B0);
delay_ms(1000);
}
}
Should set_tris_d() be set_tris_b()?

And you can use the CODE tags to make it more readable ;)
 
Top