You are on page 1of 2

LAB 2 SUMMARY

Gkhan Demirkran

ISIS TUTORIAL for AT89C51

1-Build the circuit above. Double click on AT89C51. And choose your hex file to load.

LAB 2 SUMMARY

Gkhan Demirkran

2-Run your simulation.

You can change time/div setting to see the square wave. The code we loaded into AT89C51 is below. This code toggles the P1.5 pin with a time delay using time mode. Which creates a square wave.
#include <reg51.h> void T0M1Delay(void); sbit mybit=P1^5; void main(void){ while (1) { mybit=~mybit; T0M1Delay(); } } void T0M1Delay(void){ TMOD=0x01; TL0=0xFD; TH0=0x4B; TR0=1; while (TF0==0); TR0=0; TF0=0; }

You might also like