ive got this code right here. Im just starting wioth c programing but i dont find
command in the command list of C. Im using dev C++, and i cant quite understand the meaning of init in this program. What's the function of it. and also
what does this stands for?
i slightly understand the other commands aside from those two. tnx for any reply. More power allaboutcircuits!.
Rich (BB code):
init
Rich (BB code):
TRISB = 0b00000000
Rich (BB code):
#include <htc.h>
__CONFIG(FOSC_XT & WDTE_OFF & PWRTE_OFF & BOREN_OFF & LVP_OFF & WRT_OFF);
void init(void)
{
// port directions: 1=input, 0=output
TRISB = 0b00000000;
}
char counter;
void main(void)
{
counter = 0;
init();
while (1){
PORTB = counter;
_delay(10000);
counter++;
}
}