Академический Документы
Профессиональный Документы
Культура Документы
Components:
CAP
CRYSTAL
LED-BIBY
RESISTOR
Design:
Component values:
Crystal -> Frequency = 11.059mhz
Cap -> Capacitance = 33p
Resistor -> Resistance (ohm)=100
Code:
# include <regx51.h>
void delay_ms(unsigned int k)
{
unsigned int i,j;
for (i=0;i<k;i++)
{
for (j=0;j<110;j++)
{
}
}
}
void main ()
{
while(1)
{
P1=0XDB;
while(1)
{
delay_ms(3);
P1=~P1 ;
delay_ms(3);
P1=~P1;
}
}
}
STEPS:
Output:
In the design page, right click on the micro controller and select “Edit properties”.
In the program file option, browse and add the hex file of the code. “blinking led.hex”
Run the design.