hassankhan
New Member
just few mins before i saw there is just 0.27 volts drop across led,what is it?plz tell
regards
Hassan
regards
Hassan
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#include <htc.h>
__CONFIG (FOSC_HS & CP_OFF & WDTE_OFF & PWRTE_ON );
#ifndef _XTAL_FREQ
// Unless already defined assume 4MHz system frequency
// This definition is required to calibrate __delay_us() and __delay_ms()
#define _XTAL_FREQ 4000000
#endif
void init(void)
{
// port directions: 1=input, 0=output
TRISB = 0b00000000; //set's portb to output
RB0 = 0; //starts RB0 off
}
void main(void) //main code atfer here
{
init(); //runs startup code
while (1){ //loop
RB0 = 1; // turns led on
__delay_ms(1000); //delay
RB0 = 0; // turns led off
__delay_ms(1000); // delay
}
}
:02000000D62BFD
:1007AC008301DD2B83168601831206100800D823E3
:1007BC00DF2B8312061406308E0013308D00B130FF
:1007CC008C008C0BE72B8D0BE72B8E0BE72BEE2B7A
:1007DC008312061006308E0013308D00B1308C0061
:1007EC008C0BF62B8D0BF62B8E0BF62BFD2BDF2BA0
:0407FC00DF2B0028C7
:02400E00F2FFBF
:00000001FF
Burt i loaded that file on winpic800 the picture i got,is given below,plz tell me is it fine?
View attachment 60798