
#include <REG52.H>                /* special function register declarations   */
                                  /* for the intended 8051 derivative         */
#include <stdio.h>                /* prototype declarations for I/O functions */
void Main (void)
{
// intialize RXD & TXD (input, output)

//initialize UART
//SCON   = 0x52;         /* initialize UART */
//  	BRGR0  = 0xF0;         /* 9600 baud, 8 bit, no parity, 1 stop bit */
//  	BRGR1  = 0x02;
//  	BRGCON = 0x03;
    SCON  = 0x50;		        /* SCON: mode 1, 8-bit UART, enable rcvr      */
    TMOD |= 0x20;               /* TMOD: timer 1, mode 2, 8-bit reload        */
    TH1   = 0xfd;                /* TH1:  reload value for 9600 baud @ 11.059200MHz   */
    TR1   = 1;                  /* TR1:  timer 1 run                          */
    TI    = 1;                  /* TI:   set TI to send first char of UART    */
//then send this
  printf ("Data Collected for One Day\n");
  while(1); 
 }
