Hi All, I have a problem with this code: This simple code sends 0-255 with 9600 baudrate to pc and P2 port My problem is in loop runtime . program crashes when arrived to line :P2=i. so we see '0' only on hyperterminal . I changed type of 'i' to int , but the result remains . All The Best Aziz #include <w78e65.H> #include <stdio.h> main() { unsigned char i; TMOD=0x20; SCON=0x52; TH1=0xfa; TR1=1; for(i=0;i<=255;i++) { printf("%d",i); P2=i; } } /**************************************/
Dear Aziz. Ooops. At P2 is high addres for external memory CODE, or RAM. If have ext. CODE or RAM then program must crash if You change state P2 ...... Eduard Jadron
Dear Eduard, No ex. chip has applied . The design is a simple & bare circuit !