We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I use evalution version 3.36 of keil compiler. Consider compilable code:
#include <REG52.H> typedef unsigned char BYTE; BYTE BufStart = 0; BYTE BufStop = 0; BYTE IP_ADDR[1]; void send_byte(char c) { while (!TI); TI = 0; SBUF = c; } void main () { // initialization of serial data rate SCON = 0x50; TMOD |= 0x20; TH1 = 243; TR1 = 1; TI = 1; // send addresses of variables to serial send_byte(&BufStop); // 10 send_byte(&BufStart); // 9 send_byte(IP_ADDR); // 8 send_byte(&IP_ADDR[0]); // 8 send_byte(&IP_ADDR[1]); // 9 for (;;); }
evalution version 3.36 Wow! That's circa 1989 or 1990. We've had a lot of releases since then. Jon