Professional Documents
Culture Documents
Isis Tutorial For At89c51
Isis Tutorial For At89c51
Gkhan Demirkran
1-Build the circuit above. Double click on AT89C51. And choose your hex file to load.
LAB 2 SUMMARY
Gkhan Demirkran
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; }