Following are two hitech C codes for a main program
1st one
2nd one
Can Anybody kindly explain why 2nd cord is not working on the PCB while 1st code is working? thanx in advance!
1st one
Code:
#include <pic.h>
#include "delay.h"
void main()
{
TRISD = 0x00;
while(1)
{
PORTD = 0x01;
DelayMs(255);
PORTD = 0x00;
DelayMs(255);
}
}
2nd one
Code:
#include <pic.h>
#include "delay.h"
void main()
{
TRISD = 0x00;
TRISB = 0x00;
PORTB = 0xFF;
while(1)
{
PORTD = 0x01;
DelayMs(255);
PORTD = 0x00;
DelayMs(255);
}
}
Can Anybody kindly explain why 2nd cord is not working on the PCB while 1st code is working? thanx in advance!