Digole
Digital Solutions
iDigole Buyer ProtectioniDigole Buyer
Protection
My shopping cart
0 Items:
Secure Checkout
Top Rated Plus
Visit Our Live Auctions
99.9% Customer's Satisfaction
 
Forum : Digole Serial Display :

 Search Forum.. 
 Creat New Topic   Reply 

Random X,Y at higher Baud Rate, Need Help !!!

Service,

Here's a simple program that displays a loop count at the top of the screen and text from a different font lower on the screen.

When the program runs and communication to the Digole display is set at 9600 baud, everything looks fine.

Change the communication Baud rate to the display to either 19200 or 38400 and things get strange;

The loop counter shows that something is locking up and text displays randomly around the screen.

Can you help figure this one out, please?  Thanks.

MELABS PBP CODE;


  PAUSE 1000                                                 '   delay one second
    PORTC.3=1                                                '    SET SEROUT2 PIN HI
    DB=76                                                          '   76=9600    28=19200    4=38400  SET BAUD RATE FOR SEROUT2
    loop_counter=0
  
  '   SEROUT2 PORTC.3,76,["SB38400",0]       '   set baud rate to 38400    THIS LINE REMMED OUT FOR 9600 BAUD
   
    PAUSE 100
  
   SEROUT2 PORTC.3,DB,[27,28,0]        '      CLEAR SCREEN

 MAIN:
   
     loop_counter = loop_counter + 1
 
       SEROUT2 PORTC.3,DB,[27,10,10,0]                '  SET FONT
       SEROUT2 PORTC.3,DB,[27,3,10,12,0]            '  SET X,Y  ETP
       SEROUT2 PORTC.3,DB,[27,1,DEC loop_counter,32,32,32,0]            ' display count
 

       SEROUT2 PORTC.3,DB,[27,10,18,0]                 '  Set font
       SEROUT2 PORTC.3,DB,[27,3,10,40,0]              '  SET X,Y,VIA ETP
       SEROUT2 PORTC.3,DB,[27,1,"Font 18",0]         '    Display text
       SEROUT2 PORTC.3,DB,[27,3,10,55,0]              '     SET X,Y,VIA ETP
       SEROUT2 PORTC.3,DB,[27,1,"ABC 123",0]      '     Display Text

GOTO MAIN

found it

I found the problem....

The program was looping too fast.

I inserted a pause 100 and all baud rates work now.  The display just needs a little time to digest the commands.

 

Thanks for listening

Copyright Digole Digital Solutions, 2008-2017. All rights reserved.
Powered by Victor Sun