Author Topic: Monitoring Serial Port using LCD  (Read 9296 times)

Espallator

  • Guest
Monitoring Serial Port using LCD
« on: August 18, 2010, 02:18:21 pm »
Above all, thanks to Bipom for a good job supporting us here!

Ok. Now I am trying to develop a simple monitor to read the
output in a serial port using LCD. I already have something. I have a MiniMax-51/C and LCD242. It works very well if I send manually data from Micro-IDE terminal or Hyperterminal....but, when I try to send data automatically..then..the most of the time,
it doesn\'t catch all the data. I mean, i.e. if I send printf("Connection Established"); my monitor only reads Coob.
If do it again, it reads the same thing.
I am using part of the Bipom LCD and serial code.

Here my Main:

main()
{
      //serinit(SBR_9600);
      serinit(28800);
      InitLCD();
      

      
      for(;;){
            if (flag){
                  SetTopLine();
                  flag = 0;
            } else {
                  SetBottomLine();
                  flag = 1;
            }

            for(i=1; i<25; i++){
                  a = getch();
                  putch( a );
                  WriteData(a);
            }
      }
}

Thanks!

Espallator

  • Guest
Re: Monitoring Serial Port using LCD
« Reply #1 on: August 28, 2010, 07:55:00 am »
Quote

..the most of the time,
it doesn\'t catch all the data. I mean, i.e. if I send printf("Connection Established"); my monitor only reads Coob.
If do it again, it reads the same thing.
I am using part of the Bipom LCD and serial code.


I solved the problem!  ;D
I just deleted the last line of WriteCommon routine
(it was delay(1) ) of  C:\\bipom\\devtools\\MicroC\\Examples\\8051\\tiny\\LCD\\c\\LCD.prj and now
I can read all serial activity of my laptop in my LCD.
« Last Edit: August 28, 2010, 07:55:30 am by Espallator »